GeoJSON
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.
Read more about GeoJSON at https://geojson.org/, or GeoJSON in Wikipedia (and JSON for an introduction to the JSON base format).
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)
- Overpass turbo - Has an export function to copy the result of an query as geoJSON to the clipboard or save it to a file
- 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
Authoring GeoJSON
- 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
- https://help.github.com/articles/mapping-geojson-files-on-github/
- 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.
See also
- awesome-geojson – A collection of applications, tools, libraries, documentation, etc. dealing with GeoJSON data.
- osm-countries-geojson – Countries GeoJSON based on OpenStreetMap data, automatically updated.
- OSM-Boundaries - Extract Administrative boundaries such as country borders, state borders or equivalents from the OpenStreetMap databases.