Friday 23 June 2017

qgis - Finding polygons without right angles using Open Source GIS or ArcGIS for Desktop?


Now we are digitizing some buildings in specified area.


The obligatory rule for this work - in most cases buildings should have right angles.


We are using QGIS with CAD tools for this work but sometimes we make mistakes and create polygons with an irregular shape.


Does anybody know how can we find such polygons without right angles using open source GIS or ArcGIS?



Answer



I don't know of an existing tool to do this but you can write one in ArcPy or using GDAL/OGR along the following lines:



  • For each polygon...


    • Get the geometry

    • Follow the winding of the polygon and calculate the internal angle at each vertex

    • If any angle is not 90 degrees, add the FID/OID (or some other attribute) to a list of rejects



  • Print the list of rejects


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...