[GRASS-user] Extracting attributes

Jorge Echeverri jorge.echeverri at Stein.de
Mon Mar 19 13:11:37 EDT 2007


Hi,

I imported this file with v.in.ascii:
#'X_COORDINATE', 'Y_COORDINATE'
L 2 3
3400630.04 5718486.603
3400639.238 5718515.776
1 3
2 4
3 10
L 2 3
3400639.238 5718515.776
3400648.641 5718546.057
1 3
2 4
3 10
L 2 3
3400648.641 5718546.057
3400665.041 5718562.99
1 3
2 4
3 10
An created the vector map: koord_grass3
Then I connected to a database with this result:
GRASS 6.2.1 (luenenxy):~ > db.connect -p
driver:dbf
database:/home/jorge/GrassGIS/luenenxy/jorge/dbf/
schema:GIS_Darstellung
group:(null)

I connected layers 1 and 2 with Attributes 'Baujahr' and 'MTiefe'
respectively

GRASS 6.2.1 (luenenxy):~ > v.db.connect map=koord_grass3
table=GIS_Darstellung database=/home/jorge/GrassGIS/luenenxy/jorge/dbf
key=Baujahr layer=1
WARNUNG: The table <GIS_Darstellung> is now part of vector map
         <koord_grass3> and may be deleted or overwritten by GRASS
modules
WARNUNG: Select privileges were granted on the table
GRASS 6.2.1 (luenenxy):~ > v.db.connect map=koord_grass3
table=GIS_Darstellung database=/home/jorge/GrassGIS/luenenxy/jorge/dbf
key=MTiefejahr layer=2

When I check the columns I get the surprise that not all data types are
what they should be.
GRASS 6.2.1 (luenenxy):~ > v.db.connect -c map=koord_grass3
DOUBLE PRECISION|SECTION_ID
CHARACTER|X_ANFANG
DOUBLE PRECISION|Y_ANFANG
DOUBLE PRECISION|X_ENDE
DOUBLE PRECISION|Y_ENDE
DOUBLE PRECISION|BAUJAHR
CHARACTER|LAENGE
CHARACTER|GEBIET
CHARACTER|MTIEFE
DOUBLE PRECISION|KNUTZUNG
CHARACTER|MATERIAL
DOUBLE PRECISION|PART
DOUBLE PRECISION|PBREITE
DOUBLE PRECISION|PHOEHE
DOUBLE PRECISION|ANALYSIS_C
DOUBLE PRECISION|ID_INSP
CHARACTER|INSPDATE
I guessed something went wrong while exporting the data from MySQL but I
carefully repeated the export and got again the same problem below when
I run execute v.extract

GRASS_INFO_WARNING(10627,1): Die Vektorkarte 'koord_grass3_Baujahr'
existiert bereits und wird überschrieben.
Erzeuge Topologie ...
Registriere Linien...
3 primitives registriert 
Building areas: 


0 Flächen erstellt 
0 Inselflächen erstellt
Füge Inselflächen hinzu:
Füge Zentroide hinzu:

Die Topologie wurde erstellt.
Anzahl von Knoten     :   4
Anzahl von Primitives :   3
Anzahl von Punkten    :   0
Anzahl von Linien     :   3
Anzahl von Boundaries :   0
Anzahl von Zentroiden :   0
Anzahl von Flächen    :   0
Anzahl von Inseln     :   0

GRASS_INFO_MESSAGE(10627,2): Schreibe Attribute...

GRASS_INFO_MESSAGE(10627,3): Layer 1

GRASS_INFO_ERROR(10627,4): Column 'BAUJAHR' is not integer

Any suggestions?

Thanks in advance

Am Montag, den 19.03.2007, 18:03 +1200 schrieb Hamish: 

> Jorge Echeverri wrote:
> > 
> > So I guess, I have to import the line geometry like
> >
> >  #'X_COORDINATE Y_COORDINATE'
> > L 2 1
> > 3400630.04 5718486.603
> > 3400639.238 5718515.776
> > 1 2
> 
> if you comment out a line, the hash (#) mark should be the first
> character on the line, no spaces.
> 
>  
> > Or from the example in v.in.ascii manual is still not so clear what
> > the line below the data means???
> > 
> > ORGANIZATION: GRASS Development Team 
> > DIGIT DATE: 1/9/2005 
> > DIGIT NAME: - 
> > MAP NAME: test 
> > MAP DATE: 2005 
> > MAP SCALE: 10000 
> > OTHER INFO: Test polygons 
> > ZONE: 0 
> > MAP THRESH: 0.500000 
> > VERTI: 
> 
> (you skip the above with the -n flag)
> 
> 
> I don't know much about multi-layers, so can't answer those questions.
> 
> 
> Hamish

-- 
Jorge Echeverri, BSc Civ. Eng.
S & P CONSULT GMBH
Technologiequartier
Konrad-Zuse-Str. 6
D-44801 Bochum, Germany
Geschäftsführer: Dipl.-Ing. Robert Stein
Registergericht: Amtsgericht Bochum HRB 10769


Phone:    +49(0) 234 51 67 193
Fax:      +49(0) 234 51 67 109

Email:    jorge.echeverri at stein.de
Internet: www.stein.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070319/4ad3c7a5/attachment.html


More information about the grass-user mailing list