0

I want to convert OSM street blocks for a given area into polygons in QGIS (see image). I can of course manually draw lines with OSM as a base layer, and then convert these lines into polygons. However, this is a very tedious job. Is there a better way of getting this done ?

enter image description here

5
  • Can you use something like the Overpass API online to query OSM for the raw data? Or get a raw OSM file from somewhere like GeoFabrik and extract the buildings layer? I assume your image above is from OSM raster tiles?
    – Spacedman
    Nov 14, 2021 at 16:03
  • The image is a manaul drawing. I can get the exepcted result on screen by buffering the street lines and afterwards creating a symmetric difference with the area. But the result returns a single multipolygon image that cannot be split up into the individual polygons. At least, not as far as I know.
    – EricBHK
    Nov 14, 2021 at 16:27
  • Ah, I thought the grey was building outlines. You only have road centerlines? So you need to buffer out the road width? Hmmm. But you can do Multipolygon-to-Polygon in QGIS, I'm sure...
    – Spacedman
    Nov 14, 2021 at 16:39
  • You might get the result by using OSM land use types. e.g. in my neighbourhood, landuse=residential and landuse=commercial would work pretty well (they don't overlap roads, so they model the idea of a "street block" quite well). wiki.openstreetmap.org/wiki/Key:landuse Nov 14, 2021 at 20:39
  • @alphabetasoup : I tried your solution, but since I am working mostly with developing countries, landuse is hardly or not at all available in OSM for these areas
    – EricBHK
    Nov 15, 2021 at 9:49

1 Answer 1

1

Okay, I figured it out. Here is the sequence of actions in order to obtain the proper result :

  1. first, buffer your lines
  2. next, create a symetric difference
  3. finally, use 'multiple to individual'

This will get you the individual street blocks, each as a single polygon

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.