[gdal-dev] Contour Gaps

zeta otrov at hush.ai
Mon Feb 25 23:57:31 PST 2013


> Lots of assumptions, lots of dependencies on how convoluted the contours
> are, the ratio of the gap length to contour spacing (in
> the horizontal plane) etc. and how much automation and inspection you
> can tolerate. Do you have Z values for the contours? Or any common
> attribute which shares across the gaps?

Michael,

in my previous discussion with Chaitanya I attached sample images. Although I can label Z values, as can be seen from those sample images, it will requite too much manual work because of the gaps, which is just the same as if I use the time to close gaps manually.

I thought that there is some general approach to solve this problem, and that gdal list is where I can be advised like couple of times before.

I'll do more searching and if nothing comes out, I'll take the image with gaps through python/scipy, and then:
 - do spline fit on existing lines and connect all gap points within certain radius,
 - find some sweet spot depending on connected curves direction angle and connection line direction angle
 - decide which connection line to keep

If this approach fails for some reason, there is backup plan to tangle myself with Voronoi diagrams and Delaunay triangulations, which I hope would require less time than doing vectorization by hand.



More information about the gdal-dev mailing list