3

I am trying to render this output from open street map into geojson to add into a map. I only need to export the data one time. How do I do that? OSM lists it as a use case. I see a js library to do this (but I need a backend solution). It also seems like you can export it as geojson from the api somehow. How do most people usually do this?

  • [out:json] gives overpass json not geojson. But there is an option in overpass turbo to export as geojson. – neogeomat Mar 12 '14 at 5:08
  • Please keep in mind that this isn't an appropriate way to add a OSM map, this only makes sense e.g. if you filter to highlight roadnetwork etc. Please refer www.switch2osm.org – Mapper Mar 12 '14 at 8:52
  • You might want to think about marking some of the questions that you've got answers to as "answered". – BradHards Mar 13 '14 at 9:07
4

There are many ways

  1. overpass turbo has on option to export as geojson.
  2. JOSM also has option to export as geojson.
  3. OpenLayers can directly read OSM format to be displayed in map. (you can also use it to convert to geojson but the above methods are much easier.
1

Please see the page about converting map data between formats in the OSM wiki. It lists two converters, OSM2GEO and osmtogeojson. The second one seems to support more features and is the one used by overpass turbo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.