Closed systemed closed 10 years ago
Richard,
Is the ugliness only apparent when you zoom in to the scale of individual pixels? It is my guess that this is the case. There is currently no option in gdal_trace_outline to do this directly. If your goal is to have a polygon that looks nice at this level of detail, then here is a proposed solution (untested):
If the ugliness is apparent at larger scales (not just at the scale of a couple of pixels) then something is wrong and you should send me a portion of your image that reproduces the problem.
There is a program called "potrace" (http://potrace.sourceforge.net/) that creates artistically nice looking vector images from bitmaps. I have never used it, but there is a possibility that it may work well for your purposes.
On 07/15/2013 10:28 AM, Richard Fairhurst wrote:
gdal_trace_outline is a godsend but tends to produce very jagged edges from SRTM data. Applying the Douglas-Peucker simplification results in sharp bends at corners and unnatural-looking shapes. Turning this off produces sawtooth edges.
It would be good to have more 'natural'-looking smoothing, similar to the output produced (in raster form) by gdaldem.
There are some ideas in this thread http://osgeo-org.1560.x6.nabble.com/gdal-dev-gdal-polygonize-and-polygon-edges-td5035292.html (which is how I found gdal_trace_outline!). Right now I'm using a combination of ogr2ogr and Mapnik's line-smooth, which produces reasonable results, but it would be better to have it in gdal_trace_outline.
— Reply to this email directly or view it on GitHub https://github.com/gina-alaska/dans-gdal-scripts/issues/2.
gdal_trace_outline is a godsend but tends to produce very jagged edges from SRTM data. Applying the Douglas-Peucker simplification results in sharp bends at corners and unnatural-looking shapes. Turning this off produces sawtooth edges.
It would be good to have more 'natural'-looking smoothing, similar to the output produced (in raster form) by gdaldem.
There are some ideas in this thread (which is how I found gdal_trace_outline!). Right now I'm using a combination of ogr2ogr and Mapnik's line-smooth, which produces reasonable results, but it would be better to have it in gdal_trace_outline.