Work · a global geodata provider
Population statistics for any polygon a user can draw
The problem
Demographic data existed as national tables and raster files. Answering "how many people live inside this shape" meant a GIS specialist, a desktop tool and a manual export, so a question that took a customer ten seconds to ask took days to answer — and could not be sold as a product.
The approach
A PostGIS service behind a versioned REST API. A user draws a boundary or uploads a shapefile, the parts are unioned into a single signature polygon, and population figures are computed against it — totals, density, growth rate, household size and age bands from 0–4 upward — then returned through the API or exported as KML. The work runs as Celery jobs with their own status rows, so the client polls rather than holds a connection open.
What was technically hard
A shape a user draws is not a shape a database likes. Uploaded shapefiles arrive with 3D coordinates that have to be flattened before PostGIS will accept them, in whatever projection the source happened to use, and with parts that overlap each other. Every boundary is normalised and unioned before anything is computed against it, and each recomputation bumps a revision counter with a database-level increment, because the same target group can be edited by two people while a job for the previous version is still running.
One decision we made, and why
The service refuses a query whose area exceeds a configured limit, and says so with its own status rather than failing. An unbounded polygon over a global dataset is not slow, it is effectively infinite — and a job that never finishes looks identical to one that is still working. Naming the refusal turned a hang into an answer a customer could act on.
More work
- Reconciliation that reports breaks the day they happen →
Time to detect a reconciliation break fell from weeks to one day.
- Machine data that arrives twice, late, or not at all →
Shift totals now reconcile to the plant's own counts.
- A training record registry auditors can trust →
$ tell us what you're building and where it's stuck
Book a 30-min discovery call
We reply within one business day.