[GRASSLIST:5657] Re: Creating DTM from shapefiles

Maciek Sieczka werchowyna at pf.pl
Sun Feb 6 18:32:33 EST 2005


Guys

Michael is right. I'm sorry for my messing. Indeed only the cats are
preserved in 5.4 v.patch. And indeed v.patch works the same in 5.7/6.0. When
I wrote that labels are preserved by v.patch in 5.4 I was wrong. Patching
cats is all I could do and why I came to conclussion that I managed to patch
labels  once - I don't know. Obviously it mixed somehow in my mind and I
wanted to be  the wise ass. That was dumb not to doublecheck what I was
writing about before posting to the list. I hope I won't be taken as dumb in
general, though :).

Thanks for the sript Michael. Haven't tried it yet. Does it let me to patch
points and lines?

Maciek

P.S.
Anyway, there could be some note in the v.patch manual regarding it's
current limitations and eventual alternatives. Whom should I bother with 
this?

----- Original Message ----- 
From: "Michael Barton" <michael.barton at asu.edu>
To: "Maciek Sieczka" <werchowyna at pf.pl>; "Maris Nartiss"
<maris.nartiss at gmail.com>; <GRASSLIST at baylor.edu>
Sent: Sunday, February 06, 2005 7:09 AM
Subject: [GRASSLIST:5654] Re: Creating DTM from shapefiles


> 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




More information about the grass-user mailing list