[GRASS-user] Re: How to extract one single contour.
Marcello Gorini
gorini at gmail.com
Mon Aug 1 11:20:58 EDT 2011
Also, even when I zoom in to extract only one contour, the exported points
are not always in order in the file, in a way that when I use it to plot in
another program as a line, it connects the points in a wrong way.
How can I export contours in an amenable way to use in other programs, such
as Matlab, for instance?
Thanks in advance.
Marcello.
Marcello Gorini wrote:
>
> 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-tp6639491p6641376.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list