[GRASS5] v.external FID problem: PostGIS/OGR

Markus Neteler neteler at itc.it
Wed May 18 11:16:15 EDT 2005


Hi,

I tried to connect to a PostGIS map which I created last year, but:

v.external   dsn="PG:host=myserver user=postgres dbname=spearfish" layer=streams output=pgstreams
ERROR 1: ERROR:  Attribute "fid" not found

DBMI-OGR driver error:
Cannot select:
select FID from streams where FID = -1

Building topology ...
WARNING: Random read is not supported by OGR for this layer, cannot build
         support.


Here I found a reference to OGC_FID

 http://grass.itc.it/pipermail/grass5/2004-May/014395.html
 http://www.gdal.org/ogr/drv_pg.html
 "If there is an "ogc_fid" field, it will be used to set the feature
  id of the features"

Obviously there is no ogc_fid column
spearfish=# \d streams;
           Table "public.streams"
 Column |         Type          | Modifiers
--------+-----------------------+-----------
 cat    | integer               |
 label  | character varying(10) |

but once v.external was functional (maybe dynamic creation of ogc_fid?).

Does anyone have insights if OGR changed?

Thanks

 Markus




More information about the grass-dev mailing list