Re: [GRASS-user] Elevation profile from intersecting shapefiles‏

georgew gws293 at hotmail.com
Wed Dec 3 01:25:01 EST 2008


Micha, I followed your instructions with the following results:
----
Import data from 2 shapefiles, Contour (layer 1)and Track (layer 2): (no
problems reported)
v.in.ogr dsn=/home/george/GRASSDATA/ output=testvectmap min_area=0.0001
snap=-1 
----
Display vector map: (no problems, map displayes correctly)
d.vect map=testvectmap at testvector color=0:0:0 lcolor=0:0:0
fcolor=170:170:170 display=shape type=point,line,boundary,area
icon=basic/circle size=5 layer=-1 lsize=8 xref=left yref=center llayer=1
----
Convert vector to raster and thin: (no problems reported)
v.to.rast input=testvectmap at testvector output=testrastmap use=attr
type=point,line,area layer=1 column=ELEVATION value=1 rows=100000 
r.thin input=testrastmap at testvector output=thinrastmap iterations=200
----
Display raster map (PROBLEM:only displays large, brightly coloured
rectangles, no contours
d.rast map=testrastmap at testvector -o
----
At this point I stopped as I got the impression something was already wrong
but could not work out what.
Also, should I not rasterize the track data as well?
Any help would be appreciated. If you require the source shapefiles I have
no problems sending them to you.

Micha Silver wrote:
> 
>   
> Yes. 
> I think you should be looking at converting the shapefile contour lines
> to a raster....
> 
> v.in.org to import the contour lines and tracks into grass 
> v.to.rast and r.thin to convert the contour lines to a raster map. 
> r.surf.contour to create an elevation surface from the rasterized
> contours 
> r.profile to get the elevations along the tracks. 
> 
> Post back with specific questions if you hit a snag. 
> 
> Regards, 
> Micha 
> 
> ___________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 

-- 
View this message in context: http://www.nabble.com/Elevation-profile-from-intersecting-shapefiles%E2%80%8F-tp20744104p20803902.html
Sent from the Grass - Users mailing list archive at Nabble.com.



More information about the grass-user mailing list