Ticket #2294 (new defect)

Opened 4 months ago

Last modified 4 months ago

ogr2ogr postgresql to interlis 1

Reported by: mjurce Assigned to: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: blocker Keywords:
Cc: pka, rouault

Description

When exporting a postgresql db to Interlis 1 with FW-Tools 2.0.6: /home/postgres/FWTools-1.2.1/bin_safe/ogr2ogr -f "Interlis 1" /home/postgres/tmp/ PG:dbname=mydb

Error: ./ogr2ogr: line 9: 5710 Segmentation fault $FWTOOLS_HOME/bin/basename $TARGET "$@"

Attachments

points.zip (0.6 kB) - added by rouault on 03/27/08 14:24:10.

Change History

03/27/08 14:23:08 changed by rouault

  • cc set to pka, rouault.

Your commandline looks very suspicious. You're mentionning FWTools 2.0.6 but your executable path is in FWTools-1.2.1. It's the first thing to check.

I've run the following on a shape file with latest svn-trunk :

apps/ogr2ogr -f "Interlis 1" ~/gdal/tmp points.shp
ERROR 4: Failed to create /home/even/gdal/tmp:
Is a directory
Interlis 1 driver failed to create /home/even/gdal/tmp

The error message is expected as directories are not supported as a target for Interlis 1. However I'm not clear why you get the crash. I'm attaching the shapefile I have mentionned, so you can test if it still crashes with it as input of ogr2ogr.

03/27/08 14:24:10 changed by rouault

  • attachment points.zip added.

03/28/08 03:31:56 changed by mjurce

Ok, excuse me, the comamndline correct was

/home/postgres/FWTools 2.0.6/bin_safe/ogr2ogr -f "Interlis 1" /home/postgres/tmp/mydb.itf PG:dbname=mydb.

I reported it wrong in first message. I made tests with previous versions, with FWTools-1.2.1 the conversion is working but generates only tables with geometries columns.

The conversion from your file points.shp to Interlis 1 is working with FWTools 2.0.6 too.

03/28/08 14:38:49 changed by rouault

So, my guess is that it's the input part of the processing done by ogr2ogr that is wrong, not the output part.

Does an ogrinfo on your PG database work ? And a translation to Shapefile ? Attaching a debugger on your commandline or running Valgrind on it could help too to narrow your problem.