Markus N wrote: > I have an unsubmitted module "v.centerline" which extracts > the centerline from irregular vector polygon(s). Perhaps this > approach could be used here as well. It works like this > (I would be pleased to make this script available to a user > who wants to make it "production ready" as I don't find the time):
is the prototype working well? or is it still at the theoretical/ experimental stage? I have thought about this problem a lot, it is related to the classic "river mile" problem which requires defining the center line of the river in a non-arbitrary way. the basic idea is to combine both parallel lines into a single map, run v.buffer to enclose them both, then get a big mosquito to pull all the volume out of the buffer until it is thinned to a single line. for two parallel lines it is not so bad, but when you get splits and convergences and islands it gets ugly. actually the raster tools are pretty good for it but they don't work well when the length:width ratio are so very different as they are for a road or a river. maintaining a similar digitization scale/vertex resolution as the original polygon is another tricky but not critically important final detail. > - skeletonize (v.net.spanningtree) > - TODO: extract longest line (no idea) this is an approach I have not considered. will take a little thinking about. but if v.net.spanningtree solves the worst part of the problem then I think the longest line should not be so hard to solve with one of the v.net tools. there is a bit in the archives, as well as a user donated v.centerline module, http://thread.gmane.org/gmane.comp.gis.grass.devel/36271/focus=36290 http://thread.gmane.org/gmane.comp.gis.grass.devel/36294 More on the difficulties of the river mile problem and ideas about it: http://thread.gmane.org/gmane.comp.gis.grass.user/22063/focus=22097 see also: http://article.gmane.org/gmane.comp.gis.grass.devel/11504 http://thread.gmane.org/gmane.comp.gis.grass.user/24385 http://thread.gmane.org/gmane.comp.gis.grass.user/42693/focus=42722 http://search.gmane.org/?query=river+mile&group=gmane.comp.gis.grass.user regards, Hamish _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
