[GRASS-dev] v.external and attributes problem

Markus Neteler neteler at osgeo.org
Tue Dec 22 06:03:12 EST 2009


Hi,

I have tried to use v.external with attributes but some error occurs:

GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
v.external ~/data/maps/vmap0_europe_shape/builtupa_europe_wgs84.shp
out=vmap0_cities layer=builtupa_europe_wgs84
Building topology for vector map <vmap0_cities>...
Number of nodes: 28575
Number of primitives: 28619
Number of points: 0
Number of lines: 0
Number of boundaries: 14409
Number of centroids: 14210
Number of areas: 14409
Number of isles: 14409
Number of areas without centroid: 199
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
d.vect builtupa_europe_wgs84
ERROR: Vector map <builtupa_europe_wgs84> not found
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
d.vect vmap0_cities
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
v.select vmap0_cities^C
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
d.vect vmap0_citie^C
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
v.db.select vmap0_cities | head
id|f_code|nam|tile_id|fac_id
1|AL020|TORSHAVN|1|2
2|AL020|LERWICK|1|3
3|AL020|HONNINGSVAG|2|2
4|AL020|DYFJORD|2|3
5|AL020|HAMMERFEST|2|4
6|AL020|BATSFORD|2|5
7|AL020|VADSO|2|6
8|AL020|TROMSO|2|7
9|AL020|TROMSO|2|8
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
d.vect vmap0_cities disp=attr attrcol=nam
ERROR 1: SQL: Failed to identify field:=
DBMI-OGR driver error:
Cannot select:
select nam from builtupa_europe_wgs84 where  = 0

ERROR: Unable to open select cursor: 'select nam from builtupa_europe_wgs84
       where = 0'
GRASS 6.4.0svn (latlong_wgs84):~/data/maps/world_natural_earth_1km >
v.db.connect vmap0_cities
ERROR: For defining a new connection you have to specify these parameters:
       driver, database, table [, key [, layer]]


d.what.vect -x
Building spatial index...
 100%

Buttons
 Left:  what's here
 Right: quit

7:35:20.215633E(E) 47:33:32.722372N(N)

vmap0_cities in PERMANENT  Centroid
Layer: 1
category: 4527
driver: ogr
database: /home/neteler/data/maps/vmap0_europe_shape/builtupa_europe_wgs84.shp
table: builtupa_europe_wgs84
key column:
ERROR 1: SQL: Failed to identify field:=
DBMI-OGR driver error:
Cannot select:
select * from builtupa_europe_wgs84 where  = 4527

WARNING: Cannot open select cursor
Cannot open select cursor:<BR>'select * from builtupa_europe_wgs84
where  = 4527'<BR>on database
'/home/neteler/data/maps/vmap0_europe_shape/builtupa_europe_wgs84.shp'
by driver 'ogr'<BR>Done.

Is that intentional?

Markus


More information about the grass-dev mailing list