[Gdal-dev] OGR PostGIS driver problems on x86_64

Mateusz Loskot mateusz at loskot.net
Fri Mar 23 05:55:19 EDT 2007


Edzer J. Pebesma wrote:
> 
> I'm running debian testing ("etch") on a x86_64 architecture; when I
> run
> 
> ogr2ogr -overwrite -f "PostgreSQL" "PG:dbname=postgis" meuse.shp
> 
> it gives me a segmentation fault. [...] Is this a known problem? How
> can I (help to) resolve this?

Edzer,

I don't suppose it's a known problem.

Please, could you submit a bug report about this problem:

http://bugzilla.remotesensing.org/enter_bug.cgi?product=GDAL&component=OGR_SF

> A related but less serious issue is that the layer name is ignored:
> on the 32 bits architecture
> 
> ogr2ogr -overwrite -f "PostgreSQL" "PG:dbname=postgis" meuse.shp mmm
> 
> will not add a table; after removing mmm table meuse will be written,
>  after renaming the shapefile into mmm.shp (etc) mmm will be written.
> A layer name different from the shapefile name causes it not to be 
> written; no layer name will result in the shapefile name being
> written. Is this documented behaviour?

Are you trying to overwrite layer name from "meuse" to "mmm"
and you expect to achieve this by specifying layer name after
meuse.shp file ?

If my diagnosis is correct, then you are misusing the ogr2ogr utility.
Please, refer to the manual:

http://gdal.org/ogr/ogr2ogr.html

and read about -nln option.

Also, in the PostgreSQL driver manual:

http://gdal.org/ogr/drv_pg.html

you can find example showing how to import data with custom layer name
specified, still using -nln option.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list