[OSM-dev] Planet file with preprocessed lines/polygons

Nick Whitelegg nick.whitelegg at solent.ac.uk
Tue May 16 08:09:30 UTC 2017

.. one caveat though is that it doesn't do relations: only nodes and ways (linear and polygon).

It was really written for the Freemap site so doesn't cover all use cases, but may be interesting.


From: Nick Whitelegg
Sent: 16 May 2017 09:07:57
To: dev at openstreetmap.org
Subject: Re: [OSM-dev] Planet file with preprocessed lines/polygons

Hello Christoph,

I do have some code which gives GeoJSON from a standard OSM PostGIS database as a web service, if you're interested.

This code is available as part of the Freemap repository:


Not sure if you understand PHP but the files you're interested in are in the "ws" directory, tsvr.php (which takes in tile x,y,z parameters) and bsvr.php (which takes in a bounding box of arbitrary projection, plus input and output SRIDs (projection identifiers).

Let me know if you're interested in this and would like to install it on your server.


Nick Whitelegg
Senior Lecturer in Computing (Internet)  | School of Media Arts and Technology
Southampton Solent University  | RM424 | East Park Terrace | Southampton SO14 0YN
T: 023 8201 3075 | E: nick.whitelegg at solent.ac.uk<mailto:nick.whitelegg at solent.ac.uk> | W: solent.ac.uk<http://www.solent.ac.uk/>

From: Christoph Lingg <christoph at lingg.eu>
Sent: 15 May 2017 18:11:59
To: jukka.rahkonen at latuviitta.fi
Cc: dev at openstreetmap.org
Subject: Re: [OSM-dev] Planet file with preprocessed lines/polygons

>> A huge file containing all osm items as geojson would be my dreamcase.
>> Does this exist?
> It could rather be a nightmare. GeoJSON can't be indexed spatially nor by attributes so if you would like to work only on small area of interest or to find just certain features you would still need to parse the whole huge GeoJOSN file.

I agree that GeoJSON is not the format you would like to query your data. I wanted to refer to the way the data is available for download. To put it into other words: instead of raw xml (like now) a precomputed GeoJSON. Packing all OSM objects into a feature collection would be again a night mare as you need a huge amount of RAM. But having one GeoJSON object per line could work much better and would allow the creation of an OSM object stream easily. Without downloading the entire dataset on disk first.

dev mailing list
dev at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20170516/305af68f/attachment-0001.html>

More information about the dev mailing list