Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
If it's ok to lose the roads entirely--or have them merged with adjacent features--you might be interested in cleaning the raster before the conversion: see gis.stackexchange.com/questions/41064. But this begs a more important question: why convert from raster to vector at all? Is that really necessary? –  whuber Nov 14 '12 at 22:06
    
Have you tried running Simplify Polygon, or Generalize after converting to polygons? Admittedly, the linework already looks pretty basic, but you never know what those tools might do. –  Baltok Nov 14 '12 at 22:52
    
I can't lose the roads entirely, although their exact shape is not important. I am using these polygons in conjunction with census data to place structures, so that structures will be placed in urbanized areas or near roads instead of out in the middle of a forest. See another question of mine (gis.stackexchange.com/questions/38999/…) for details. –  Eric W. Nov 14 '12 at 22:57
    
I don't have a license for Simplify Polygon or Generalize, unfortunately. –  Eric W. Nov 14 '12 at 23:01
    
Placing structures--depending on the criteria used--might be more easily done with raster data rather than vector data. Maybe you could say a little more about the structure placement process? –  whuber Nov 14 '12 at 23:40
show 3 more comments

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
I discovered the buffer-and-convert trick yesterday while playing around trying to solve this myself. I can expand the raster by 1, then run raster-to-poly with simplification and get a pretty decent approximation of the features. It's even better if I resample the raster to a higher resolution first, but that increases my storage quadratically for an already large data set, not to mention takes a while. I think expand-1-and-simplify should be sufficient for my purposes. –  Eric W. Nov 15 '12 at 16:28
    
If you want to use the resample method, remember that you only need the resampled raster temporarily. If you set out your process in a ModelBuilder tool and mark the resampled raster as 'intermediate', Arc should clean up afterwards and delete it automatically (saves you having to do it manually and you can reuse your tool). –  MappaGnosis Nov 16 '12 at 10:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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