Sunday, 30 August 2015

snapping - Tracing Boundary Around a Polygon Shapefile in QGIS


I'm looking to create a boundary around this shapefile of street blocks to have show the city limits in QGIS.


enter image description here


I tried this solution, (Settings > Snapping Options and enabling the "Avoid Int." checkbox, then adding a feature to the polygon via the editor tool) but couldn't get it to work. It is supposed to snap to the outermost parts of the polygon if I interpret it correctly...


Ideally, the solution would create a polygon that removes the spaces but keeps the outermost parts of the polygon. I believe there is a similar tool in ArcGIS called the Trace Tool if that helps. I'm hoping to get around tracing these by hand via the Snapping Tool.



Thanks everyone,


Zach



Answer



I'm not aware of a tool that does this operation specifically. What I've always done is a buffer/negative buffer. Measure the widest of your road allowances (white areas you want to fill in). Then buffer the layer by just over half of that distance (e.g. if road allowance is 20m, buffer by 11m). Then do a negative buffer on that result by the same amount. It's not ideal in that you end up with 'rounded' closures at the ends of the road allowances. See example below.


The original features, with approx 11m gaps: The original image - with approx 11 m 'gaps'


Buffered by 6 meters: Buffered by 6 m


The final result: The final result - notice the rounded 'nubs'


If that's not good enough for you, take a look at "alpha shapes", or consider going to a raster model and using something like a 'grow' command (GRASS' r.grow command can be used in QGIS via Sextante/Processing).


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...