Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Mapnik to read GeoJSON rather than OGR #58

Closed
springmeyer opened this issue Jan 13, 2015 · 1 comment
Closed

Use Mapnik to read GeoJSON rather than OGR #58

springmeyer opened this issue Jan 13, 2015 · 1 comment
Assignees

Comments

@springmeyer
Copy link
Contributor

We should start using new mapnik.Datasource({'type':'geojson'.... instead of 'type':'ogr'.

Using 'type':'geojson' triggers using https://github.com/mapnik/mapnik/tree/master/plugins/input/geojson instead of https://github.com/mapnik/mapnik/tree/master/plugins/input/ogr. We use the Mapnik OGR plugin currently in Omnivore because when @GretaCB started mapnik-omnivore the native Mapnik GeoJSON plugin still had a few bugs. But those bugs are now long ago solved and this GeoJSON plugin is in heavy use for the Mapbox Static Maps Overlay API (https://www.mapbox.com/developers/api/static/#overlay) without any reports of problems.

The advantage of the Mapnik native GeoJSON plugin is that is it faster and uses less memory.

With a 100 MB GeoJSON of US county boundaries I've seen OGR uses > 2 GB and takes > 6 seconds to open the file (even before tile rendering). Mapnik's native GeoJSON plugin requires just 1-200 MB and reads the same file in .8 seconds. (@artemp also has ideas to speed up GeoJSON reading even more: mapnik/mapnik#2636).

@springmeyer
Copy link
Contributor Author

done in #67 by @rclark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants