[GRASSLIST:5708] Re: Creating DTM from shapefiles

Māris Nartišs maris.nartiss at gmail.com
Thu Feb 10 07:05:47 EST 2005


Hi,

Seems, that joining two vector data sets (shapefiles) in Grass is
"mission impossible".

> What happens if you append 2 files with attribute tables that have different
> formats?
Actualy for me, lamer, they look like same:

v.db.connect map=augstump driver=dbf
database=/home/maris/Test_in_grass/testlocation/testmapset/dbf/
key=cat layer=1 -c
INTEGER|CAT
DOUBLE PRECISION|AUGST

v.db.connect map=izol_p driver=dbf
database=/home/maris/Test_in_grass/testlocation/testmapset/dbf/
key=cat layer=1 -c
INTEGER|CAT
DOUBLE PRECISION|AUGST


And v.append error:

v.append vect1=augstump vect2=izol_p vmerged=augstump_izol_p
vtype=point vlayer=1
Exporting 74 points/lines...
74 features written
Exporting 172640 points/lines...
172640 features written
Datum 'unknown' not recognised by GRASS and no parameters found. Datum
transformation will not be possible using this projection information.
Over-riding projection check.
Proceeding with import...
Layer: augstump_izol_p
DBMI-DBF driver error:
Column 'CAT' already exists (duplicate name)
Cannot create table.
Error in db_execute_immediate()
Cannot create table: create table augstump_izol_p (cat integer, CAT
integer, AUGST double precision)

_______________________________________
I know what I want, but duno how to get it.
My idea: 2 vect. data sets with 2 dbs. Take first of them, get max cat
num. Take second one and increase cat by first max cat num. Append
second to first w/o problems (ie. cat 2 >> 1), cuz cat nums not
owerlap. Wola. One data set containing data from both input sets.
Is it possible in Grass? Or I need to start to study ArcInfo?

Oh, yeah. That datum thing. As v.append has problems with db, i dont
think, that setting other datum will help.
Anyway, heres msg. from v.in.ogr:
"GRASS_INFO_WARNING(2915,1): Datum 'GRS_1980' not recognised by GRASS
and no parameters found. Datum transformation will not
be possible using this projection information.
Projection of input dataset and current location appear to match.
Proceeding with import..."


Any ideas, links to docs/tutorials/man pages welcome.

Maris.

On Tue, 08 Feb 2005 00:16:53 -0700, Michael Barton
<michael.barton at asu.edu> wrote:
> M?ris
> 
> Thanks for trying v.append. Your test seems to answer one question I have:
> What happens if you append 2 files with attribute tables that have different
> formats? V.append (ogr2ogr that is) will make a new table with ALL the
> fields of both tables and attempt to fill them from each table as
> appropriate. However, v.append only really makes sense if you have identical
> attribute tables for the two files you are trying to merge. In your case,
> you have fields with different names in each of the two files.
> 
> With respect to the first error, it looks like you don't have a datum
> specified and ogr2ogr wants one. Could you try it with 2 files that DO have
> a datum specified (the SAME datum) and have identical attribute table
> formats (same field names and field formats)?
> 
> 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>




More information about the grass-user mailing list