2

I have the following shapefiles (click here to download them):

  1. parcels polygon
  2. parcels point
  3. streets/row polygon
  4. streets line

I use QGIS to manually identify polygon parcels with street corners (street junctions) on them. I would like to know if there is a plugin or algorithm to provide such a solution to identify all parcel polygons that are on street junctions. That is those polygons that are on the corner of the street line.

For example, the parcels mark in the red box below have corners. So, they are selected for export.

enter image description here

This could be done a manual visual inspection of the parcels. However, I am looking for an automated in QGIS.

4
  • 1
    Please decide which of the GIS products mentioned you want to ask about. By asking about more than one you are effectively asking multiple questions which goes against the Tour. You should then describe not just what you want to do, but precisely what you have tried and where you are stuck trying that.
    – PolyGeo
    Mar 12, 2019 at 10:05
  • Use select by expression to select parcels that intersect more than one street polygon.
    – csk
    Mar 12, 2019 at 20:36
  • What about the case where a street bends sharply around a property - would you select that (since it's on a 'corner')? Or is it only where there are two different streets making the corner?
    – Simbamangu
    Mar 13, 2019 at 6:18
  • @Simbamangu, my interest is where two streets met.
    – Umar Yusuf
    Mar 13, 2019 at 8:38

1 Answer 1

1

In PostGIS, you could select the PIN code (I assume this is the unique ID for parcel?) where the parcel intersects more than one buffered street line (buffered far enough to cross the street):

SELECT sbuff.pin, sbuff.touch FROM 
    (SELECT b.pin, count(a.code) as touch
        FROM street_lines a, parcel_polygon b
        WHERE st_intersects(st_buffer(a.geom, 0.00015, 'endcap=flat'), b.geom) 
        GROUP BY b.pin) AS sbuff
    WHERE touch > 1

Giving:

pin         touch
2823059034  8
1423901050  2
1432700720  2
1423500560  2
1433200140  2
...

Note:

  • This doesn't reproject the layers to UTM so dimensions are in decimal degrees - the 0.00015 approximates a 15m buffer;
  • Performing st_intersects without a spatial index is super slow, better to create a new indexed buffer layer and use that.
  • You probably want endcap=flat but should experiment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.