[GRASS-user] v.in.org shp vs postgis - troublesome behavior with cnames

Enrico Gallo enrico.gallo at gmail.com
Tue Jul 21 17:56:29 EDT 2009


Dear list,

I am using v.in.org in order to import spatial data stored both in
SHAPEFILE and PostgreSQL+PostGIS
I am using grass 6.2.3 on Ubuntu Intrepid, dbf driver

Data have the same attribute structure;
when importing SHAPEFILE dbf, fields are loaded in dbf order
when importing POSTGIS data, fields are loaded sorted by name and not
as in SQL declaration order

so, if you need to change column names, you have to change also cnames
option order

eg:
attributes:
- id_structure
- id_structure_old
- element
- color
- notes

shp/dbf: cnames=cat,id_str,id_str_old,element,color,notes

postgis: cnames=cat,color,element,id_str,id_str_old,notes

I don't know if this behavior (due to different import strategies) is
a feature or a bug...
if you have many columns to manage, I could be a little troublesome...

any case, a hint on manual could be useful...

Regards,

Enrico Gallo


More information about the grass-user mailing list