[GRASS-user] How to extract one single contour.

Marcello Gorini gorini at gmail.com
Sun Jul 31 20:55:51 EDT 2011


Dear all,

I am interested in extracting the longest -1,000 meter contour from a
bathymetric DEM and to save it in a text file as points.

By doing:

r.contour in=my_dem out=contour levels=-1000
v.to.points in=contour out=contour_points dmax=my_resolution
v.out.ascii in=contour_points out=contour_points.txt fs=" " dp=4

... I get a text file with the contour points, however, it includes many
different isolated contours, all with the same category (1).

Since I need only the longest, I believe I need to separate the different
contours, maybe assigning different categories somehow, then maybe updating
the database with v.to.db using option=length and then v.db.select the
longest contour.

But I am not very used to working with vectors, so I don't know if that's
the correct approach (nor how to accomplish it), so I would appreciate very
much any help.

Many thanks.

Marcello.


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-one-single-contour-tp6639491p6639491.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list