1

I'm trying to find a way to represent San Francisco's list of softstory buildings on OSM as building polygons. The city of San Francisco produces a list of addresses as a Fusion table. The points produced in Fusion are not what I need though.

I am looking for a way to build a thematic map of the buildings that need to be retrofitted. I'm playing with QGis, importing the building features using TurboPass but I'm not sure which features I need to import. At first I tried using MMQGIS geolocation thinking that I could just select building's polygons that included the points but many of the points end up in the middle of a road or far from the actual building.

What OpenStreetMap tags and keys should I query and import in QGis to get the full addresses of buildings?

  • Welcome to GIS SE! As a new user be sure to take the Tour where you will see that there should be only one question asked per question under our focussed Q&A format. – PolyGeo Jul 8 '18 at 6:16
  • 2
    Note that address data in OSM can be just nodes, without connection to the surrounding building. And some buildings have no address information at all (until someone adds it). – AndreJ Jul 9 '18 at 6:41
1

1. Download all building polygons within the extent of the address point layer.

The QuickOSM plugin allows you to use the extent of a layer in a query. enter image description here

2. Optional. If the building polygon layer from step 1 is an extremely large layer, it may slow down or even crash QGIS. If this seems like it won't be a problem for your system, skip to step 3.

  • Buffer the address point layer. For buffer distance, estimate the maximum distance between address points and their corresponding building polygons.

  • Use the Select by location tool to select building polygons that intersect the buffer.

  • Save the selected building polygons as a new layer. Use this layer instead of the original building polygons layer.

3. Do a nearest neighbor join between the address points layer and the building layer from step 1.

  • Use the NNJoin plugin.
  • Input layer: building polygons
  • Join layer: address points enter image description here

At the end of step 3, you have a new building layer. Each building polygon has two new attributes: 1) "join_address_field" = the address of its nearest point; and 2) "distance" = the distance to that point.

4. Use the Select by expression tool to select the building with the lowest distance for each address.

"distance" = minimum( "distance" ,group_by:= "join_address_field" )

If your address is broken up into multiple fields, use concat("join_addressfield1", "join_addressfield2", ...). Substitute the name of your address field(s).

5. Save the selection as a new layer. Inspect and correct any errors.

In theory you could correct errors before saving the selection, but in practice it's easy to mess up a selection and lose all the work you put into correcting the selection.

  • 1
    Thank you! I ended up using a different approach: I found another source of building footprint for San Francisco in its open data repository. That source comes with the same building ID used in the point data I needed to transform into polygon. datasf.org/opendata – Stefano Maffulli Jul 22 '18 at 22:17

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.