Geometry Data Extraction System


I design and develop the Geometry Data Extraction System  to hit the pain point of getting simplified and filtered geometry data and POI data for researchers, which lets users to download a package of formatted geometry data in a range which is selected with a bounding box. Geometry data source is downloaded from an open source project called OpenStreetMap. The system stores the geometry data in PostgreSQL database, and the front-end interface is written in HTML, CSS and JavaScript; Back-end is in PHP. The system also use Bootstrap framework and jQuery library for responsive web development. The map layer uses Leaflet framework, an open source JavaScript Library for mobile-friendly interactive maps.

The front-end functional capability enables user to type in location and search it, view the searching result, select a bound box and filter the column of exported data. The system uses osm2pgsql tool, and POSTGIS API to get access to the geometry data stored PostgreSQL database from server. The query results will be formatted to.XML, .CSV or .JSON according to user’s requirements.

The system also solves a problem of converting Mercator projection to Latitude and Longitude coordinate. I figure out the difference between PostgreSQL and other object-relational database, how POI data is stored in the database, how to increase the system effectiveness, robustness, efficiency and how to improve the user experience.

Here is the source code on github.




System Architecture Diagram

System Architecture Diagram



User click “select area” button to choose an area defined by a bounding box. Exported geometry data will be those POI data in the chosen box area.

choose bounding box

Choose a bounding box

Then user choose the source table, file format and column to format and polish the table. In some cases, they don’t need all the data in one selected area. For example, it’s likely that someone just interested in highway data near a selected area. The system help him to prune those “useless” before downloading, sparing the band width and storage.

filter and format the table

Filter and Format data

Below are the exporting data, in JSON, CSV or XML format.

result - json


result - xml