1

I am using OpenStreetMap's Nominatim to find out boundary geometry of single cities: Helsinki

That polygon however contains the sea area and I would like to exclude that.

So where could I get city boundaries containing only land area or a coastline geometry so I could exclude sea area from the city boundary polygon.

1
  • If it's open data that you seek then I think the place to ask will be the Open Data Stack Exchange.
    – PolyGeo
    May 30 at 2:12
1

I'm afraid you have to do it manually as OSM has an own feature for the Gulf of Finland, but it does not include the waters near Helsinki: those you want to get rid of. If you click with the query features tool on the OSM Website to these waters, no element for this water body is shown.

So what you can do (I did it in QGIS using the QuickOSM Plugin). I uploaded the resulting layer if you want to use: download Geopackage file, 1.2 MB.

  1. Download Helsinki including the water bodies, as you already did.

  2. Download the coastline with the key/value: natural=coastline. Keep lines (we'll nedd it in step 3) as well as polygons (we'll need them in step 7).

    Showing the QuickOSM Pugin dialog where you can set the paramenters for the query. I limited the query to the extent of the Helsinki-polygon downloaded in step 1: enter image description here

  3. Select all features in the resulting line layer, than Merge them.

  4. Menu Vector / Geometry Tools / Multipart to singleparts

  5. Use Menu Processing / Toolbox / Split with lines where you set the Helsinki-Polygon as input-layer and the singlepart lines from step 4 as Split layer.

  6. Now select the polygon that represents the water body and delete it. The result is the pink polygon you can see in the following screenshot. However, as you can see, the islands are missing (mostly). So one next step (after the screenshot) is necessary.

enter image description here

  1. Use Menu Vector / Geoprocessing tools / Union and select both the layer from step 6 as well as the polygon layer from step 3 and run the tool. The resulting polygon now looks as follows (the download-link above). It consists of several features, you might want to dissolve it.

enter image description here

0

The HERE Maps API contains information about the administrative boundaries of Helsinki without the sea, but with freshwater bodies. You can retrieve this information using the API request. Or use applications, wrapping this API. For example, in your Google Sheet with my Maps for Sheets add-on paste the following formulas into cells A1, A2 =geoShape("Helsinki") =gsDownload(A1, "Helsinki.geojson") and click on the received URL to download the city boundaries in GeoJSON format. To insert the coordinates of boundary geometry directly into the spreadsheet use the formula =geoGetCoords(A1) This task can be completed during the trial period for free and without using your own API keys.

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.