Opened 15 years ago

Closed 15 years ago

#2911 closed defect (invalid)

Random read is not supported by OGR for this layer

Reported by: jmpmcmanus Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

v.external produces the following message:

Random read is not supported by OGR for this layer, cannot build support.

when accessing data from a postgres-postgis database. This message occurs when GRASS builds the topology.

A previous discussion on this problem is in the mail list archive:

http://www.mail-archive.com/grassuser@grass.itc.it/msg00882.html

I'm using GRASS 6.3, installed through Fedora software management system. I'm using 64bit machine.

Jim

Change History (7)

comment:1 by Even Rouault, 15 years ago

I've commited in trunk (r16652) a fix because previously the PG driver used to return false on lyr.TestCapability(OLCRandomRead) if the datasource was opened in read-only mode.

Could you confirm that it helps solving your issue ?

comment:2 by jmpmcmanus, 15 years ago

I found that this change did not resolve the Random read problem. Sorry about the delay in my reply.

Possibly it is the way I'm configuring gdal? Here is how I'm doing it:

CFLAGS="-fPIC" ./configure --prefix=/usr/local --with-python --with-php=/usr/bin/php-config --with-hdf5=/usr --with-netcdf=/usr/local/netcdf --with-static-proj4=/usr/local --with-pg=/usr/local/pgsql/bin/pg_config --with-curl=/usr/bin/curl-config --with-geos=/usr/local --with-geotiff=internal --with-libtiff=internal --with-grass=/usr/local/grass-6.4.0RC2 --without-xerces --with-libz=internal --with-pcraster=internal --with-jpeg=internal --with-png=internal --with-gif=internal --with-cfitsio=/usr/include/cfitsio

OGR is working other than this one issue.

Jim

comment:3 by Even Rouault, 15 years ago

Hum, then you'll have to give us a way how to reproduce your issue with pure OGR utility or C API calls or a small OGR python script and a small database, without GRASS preferably as I don't know how to use it and I'd like to be sure that's not a GRASS issue.

comment:4 by jmpmcmanus, 15 years ago

I think it may be a GRASS problem, because I use OGR to access postgres/postgis database, with MapServer and don't have this problem. It may not be doing the same thing a v.external, but it is similar. I can also switch the database from dbg to a merror pg database with GRASS. I'm only having problems accessing vector data in postgres, using v.external. Could it be a problem with the vector data I produce with shp2pgsql? The people in the "previous discussion" were also using shp2pgsql. It stores the vector data in a column named the_geom. Possibly it is looking for another column name?

If you do not think this is it I will try and reproduce the problem using just ogr.

comment:5 by Even Rouault, 15 years ago

I've just inserted a shapefile with shp2pgsql and made some calls with GetFeature() to trigger random access, but got no problems

comment:6 by Even Rouault, 15 years ago

jmpmcmanus, do you have found a way of reproducing your issue without using GRASS ?

comment:7 by jmpmcmanus, 15 years ago

Resolution: invalid
Status: newclosed

No I have not found a way of reproducing the error without GRASS.

Note: See TracTickets for help on using tickets.