[Gdal-dev] Ogr2ogr crashes for MiF/Mid

Frank Warmerdam warmerdam at pobox.com
Wed Feb 15 08:45:29 EST 2006


Marc Jacquin wrote:
> Hi all,
> 
> Ogr2ogr seems to be a convenient tool for transforming WKT geometries into
> other formats like Shape files or MapInfo files.
> 
> But ogr2ogr crashes when using MapInfo File output, runs OK for the same
> command line with ESRI Shapefile output.
> 
> ogr2ogr -f "MapInfo File" d:/temp/aaaa.mif PG:"user=xxx dbname=postgres
> host=localhost port=5432 password=zzzz" -sql "select
> Geomfromtext('POLYGON((-15 -15, -15 15, 15 15,15 -15,-15 -15))')"
> 
> It runs OK too with the name of a table instead of the SQL statement.

Marc,

I was able to reproduce your problem and found introducing at least one
attribute column avoided the problem:

ogr2ogr -f "MapInfo File" out.mif PG:dbname=warmerda -sql "select 1 as id, 
Geomfromtext('POLYGON((-15 -15, -15 15, 15 15,15 -15,-15 -15))')"

If you could file a bug against GDAL/OGR on this issue I will look into
fixing it.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list