[gdal-dev] Closing disconnected contours
Chaitanya kumar CH
chaitanya.ch at gmail.com
Mon Feb 25 21:41:17 PST 2013
zeta,
Are the lines in topo.tif contour lines? How did you generate them?
On Tue, Feb 26, 2013 at 12:20 AM, zeta <otrov at hush.ai> wrote:
> Chaitanya kumar CH wrote:
> >
> >zeta,
> >
> >The gaps are likely caused by pixels with no data. A simple method is to
> >run gdal_fillnodata.py on the original raster and then create the
> contours.
> >
> >http://www.gdal.org/gdal_fillnodata.html
>
> Thanks Chaitanya,
>
> that's excellent news, as I previously searched for algorithms about curve
> reconstruction, and none seemed easy for implementation. I was driven by
> approach using Delaunay Triangulation, referenced to Amenta "The crust and
> the beta -skeleton: Combinatorial curve reconstruction" and plastically
> explained i.e. here:
> http://valis.cs.uiuc.edu/~sariel/research/CG/applets/Crust/Crust.html but
> I thought to look for shortcut if possible, without reinventing
> implementation.
>
> I tried the script, and I get some gaps filled, but most aren't. I used
> -md parameter of 20px, but changed that value from 10 to 300 without
> significant improvement. Then I used mask file, which I assume works as in
> OpenCV Inpaint function, by using mask as a helper for gap detection, but
> without success.
>
> I'm attaching example image, and mask image, which I used to test the
> script, in a hope that someone can tell me if better results are possible.
>
> Thanks
--
Best regards,
Chaitanya kumar CH.
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130226/3e796eb5/attachment.html>
More information about the gdal-dev
mailing list