OpenStreetMap

Assumptions: - You’re working with a district shapefile having village polygons, and you want to add the village boundaries to OSM. (Find+replace the terms as appropriate for your use case) - Instead of separate polygons, you want each shared boundary between say 2 villages to be loaded on JOSM as a LINE shape, so that you can add it as a Way and then include it in the respective Relations of each village - So this process will help you convert those polygons into these common boundary lines

  1. Load shapefile zip (having .shp etc) on mapshaper.org
  2. console -> type “innerlines”, press enter. Shape changes to just the inner common boundaries
  3. export, choose shapefile format (not geojson, its useless). rename it to “innerlines”

  4. open QGIS, load both the original shapefile and this innerlines shapefile there

  5. original shapefile : Dissolve (vector -> geoprocessing tools -> dissolve)
  6. On the dissolved layer: Processing Toolbox -> Polygons to Lines
  7. now you have the external boundary of the district.

  8. Processing Toolbox -> Split with lines :: input layer: external boundary, split layer: innerlines
  9. Now we have a new layer “split” having the external boundary also cut up wherever internal boundary line hits

  10. Processing Toolbox -> Merge vector layer :: choose the split-up external boundary, and the innerlines layer in input field
  11. Change Destination CRS to EPSG:4326
  12. Set the merged output to save as file, save as a geojson
  13. Now you have a .geojson file having all boundaries in neat segments that you can add directly as Way in JOSM
Location: Shaniwar Peth, Pune, Pune District, Maharashtra, 411002, India

Login to leave a comment