Jump to navigation Jump to search
GeoJSON is file format for representing geodata as JSON. In this format, every Feature element has
- a geometry of type Point, LineString, Polygon, MultiPoint, MultiLineString, or MultiPolygon,
- and additional properties.
Converting between OSM data and geoJSON
TODO: list more options
- JOSM – Allows you to save to GeoJSON and re-open from it. Simply set the file extension to ".geojson" in the save dialog (Note: JOSM currently does not save projection information, and will not warn you when opening GeoJSON files with weird projections and assumes WSG-84)
- osmium-tool has an export functionality which allows to transform OSM data to GeoJSON.
- ogr2ogr – General tool for conversion between many geo data formats including GeoJSON and OSM XML (supported from version 2.4 and up)
- osmtogeojson - Specialized tool to convert OSM data to GeoJSON
- osm2geojson - OSM XML (and Overpass XML/JSON) to GeoJSON converter on Python
- minjur – Osmium-based converter of OSM data to (line delimited) GeoJSON
- Help question: Software/Libraries to Convert OSM Data to GeoJSON (without using API)
- BBBike.org extract service offers GeoJSON for an area of your choosing, updated weekly
- geojson.io - website for authoring and sharing GeoJSON files (on an OpenStreetMap base map!)
- geojsonlint.com - website that checks validity of GeoJSON data
- GeoJSON Point Editor - for, well, editing point-only GeoJSON files.
Displaying GeoJSON on a map
- Leaflet supports adding a GeoJSON layer
- Mapbox GL supports adding a GeoJSON source (JS, Android, iOS, macOS)
- Mapbox Static API supports adding a GeoJSON overlay (Java, Swift/Objective-C/AppleScript)
- OpenLayers supports adding a GeoJSON layer
- Guru Maps supports both GeoJSON and MapCSS
- geojson-renderer is a command line that renders geojson on top of configurable map tiles. It supports PNG, SVG and HTML as output formats.