SHP to OSM conversion and upload - help!

Hi there, we are working on a city mapping project where cities are providing their own shape files with their exact boundaries and we want to use OSM to display - I have found very dated explanations of how to convert Shp to Osm and then needing some kind of approval to upload - is this still the case? Is there a new updated way to do this that is a simple convert + upload? Thank you for advising!

Yes, there are Import Guidelines and Automated Edit Guidelines. You can find these on the Open street map wiki.

The first question though is why you want to upload these into OSM. If the aim is to be able to display them in some tool you are using then you could hold that data separately and display it over the top of an OSM base map.

Perhaps you could expand a bit on what you are trying to do.

2 Likes

There is an open data extension for the JOSM editor that can load SHP files into a layer. From there it is easy to copy the feature(s) you desire into the OSM editing layer.

The few times I have done this, usually to get official park boundary polygons into OSM, there was still some manual work to set the appropriate tagging and conflate with other data already existing in OSM. So it is not just a “load the SHP file and upload it” type of operation, there is some work involved in making sure it fits into existing OSM data.

Yep, quite a few steps required hence the Import Guidelines are in place and require community discussion. Happy to help with the first step being to confirm that the data makes sense being in OSM. I’m not sure it does because I am not sure what “exact boundaries” mean. If it means the administrative boundaries then these are already in OSM. If it is some boundary of the “extent” of the city then I’m not sure there is any such thing that is well defined.

@kcs165 If you are referring to administrative boundaries in Great Britain:

As Rob says, they are already in OSM.

The authoritative source for these boundaries is the Ordnance Survey open data.

Here there is a version of the data which is much easier to use, gpx files of individual boundaries. They are regularly updated by Colin Smale.

If you have noticed that the boundaries in OSM are slightly misaligned, yes indeed many are. If you would like to realign some of them, that would probably be most welcome. But it is a fiddly process. In places, the boundaries are attached to other objects and you would first need to detach the boundaries from those other objects. This is to avoid moving those other objects when you realign the boundaries.

I definitely recommend against using the JOSM opendata plugin to open shapefiles. This is for two reasons:

  1. The Ordnance Survey shapefiles are in British National Grid (BNG) projection and the plugin makes an approximate conversion to WGS84. This results in misalignment. Any shapefiles supplied by councils are also likely to be in BNG projection.
  2. The plugin simplifies all the outlines during the import.

If you wish to get shapefiles into JOSM, I recommend using QGIS (free and open source software). Use QGIS to convert from British National Grid to WGS84. It is possible to get an accurate conversion this way. Then export the data in geojson format. JOSM can open geojson files without the need for a plugin. (This avoids issues with simplification; QGIS is also affected when writing certain formats other than geojson, at least it was when I tested it in 2020.)

2 Likes