Sunday, 2 September 2018

arcgis desktop - Smoothing raster features into polygon



I have raster data representing urbanized areas, which I'd like to trace and convert to a polygon.


Raster


Using ArcMap's Raster to Polygon tool, I'm able to get something close to that.


Unsimplified:


Unsimplified


Simplified:


Simplified


However, you can see that there are many diagonal lines (roads) which create chains of polygons that share a corner.


This ups my polygon count significantly - these raster datasets are being processed at the state level. Is there an Arc or GeoTools tool to smooth out these lines and create fewer polygons? It's okay if the result loses some precision. In the end, I'm looking for something similar to what I get with the simplified polygon, just with adjacent polygons joined.



Answer




Your question is a common one (e.g. this question) and the answer depends very much on the tools you have available and the degree to which you can accept loss of precision and generalization.


One simple approach is to buffer your polygons and then de-buffer the result by the same or similar amount. You need to use your judgement on how much to buffer by to avoid joining polygons that should remain separate. You will reduce your polygon count and raster 'look' of your data but at the expense of an increased vertex count.


Alternatively you can look at pre-processing the raster. Caution is needed here so as you don't do something that invalidates any statistics, but it looks like you are just wanting to extract features. Again this depends on your licence but you could change the resolution of your raster and then use nibble or clean as per my suggestions in the previous thread cited above. This sounds legitimate for your use case.


If you don't have access to Spatial Analyst and can't install QGIS, GDAL or similar FOSS GIS, then the buffer-debuffer trick works reasonably well.


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