[GRASSLIST:5654] Re: Creating DTM from shapefiles

Michael Barton michael.barton at asu.edu
Sun Feb 6 01:09:33 EST 2005


Maciek and Maris,

V.patch DOES work in GRASS 5.7/6.0. However, it works like it did in GRASS
5.4. That is it simply combines vectors and their cat file. It does not
combine any attribute tables they may have.

I've written a simple script, using ogr2ogr, v.in.ogr, and v.out.ogr that
seems to do this. However, I haven't had much chance to test it yet. If
you'd like to give it a try, I attach it here.

Michael
____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>


> From: Maciek Sieczka <werchowyna at pf.pl>
> Date: Thu, 3 Feb 2005 19:07:16 +0100
> To: Maris Nartiss <maris.nartiss at gmail.com>, <GRASSLIST at baylor.edu>
> Subject: [GRASSLIST:5626] Re: Creating DTM from shapefiles
> 
> From: "Maris Nartiss" <maris.nartiss at gmail.com>
>> Hi,
>> 
>> I'm beginner with Grass and I have beginners problems :)
>> 
>> I have 2 shape files one with lines and second with points. Both of
>> them have HEIGHT parameter in attribute tables (lines - int, points -
>> float (double precision)). To do some modeling, I need to create
>> surface from those files.
>> I read some docs and understood, that best surface creation algorithm
>> in Grass it RST.
>> Now I have Q - how to combine both source vector data layers to feed
>> them to v.surf.rst?
>> I was trying 2 solutions, but, due to lack of knowledge, both of them
>> where dead ends.
>> 1) Using v.patch to combine both vector data sources
> 
> v.patch in 5.7/6.0 is not operational yet. You'll find some workarounds in
> recent archives of grass5 list. You can also try patching two such vector
> layers (points and lines) with v.patch in Grass 5.4/5.5. It should preserve
> labels of both input layers properly. But always check whether the labels
> were really preserved as they should. It happened to me with one particular
> dataset that they were not for some reason (though maybe it was the dataset
> fault). If all is ok then import into 6.0 with v.convert.
> 
>> 2) Convert lines to points and then combine them with v.patch
>> both worked fine but when I used d.what.vect I got only "Database
>> connection not defined".
> 
> v.patch doesn't output any database - so there is nothing to be connected.
> Moreover the vector layer resulting from v.patch in 5.7/6.0 has all the cats
> of the input layers preserved, so you result in having lots of features with
> the same cat, thus it is not virtually possible to prepare an appropriate
> database manually. All you get in an output of that v.patch is a vectorial
> drawing actually.
> 
>> Any ideas, links to howtos etc. welcome.
>> 
>> Maybe as a newbie with some ArcView background I'm unable to
>> understand some Grass specific things, who cause my problems, but
>> currently Grass docs aren't very helpful, mainly cuz they a bit
>> outdated :(
> 
> v.patch manual should contain some remarks on these issues until it's fixed
> IMHO.
> 
>> TNX for reading this,
>> Maris.
> 
> Cheers
> Maciek 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.append
Type: application/octet-stream
Size: 1935 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050206/30f4319f/v.obj


More information about the grass-user mailing list