[postgis-users] Using OGR2OGR to export postgis data to other mapinfo

Frank Warmerdam warmerdam at pobox.com
Wed Jun 11 06:03:32 PDT 2003


Obe, Regina DND\MIS wrote:
> Is it possible to use OGR2OGR to export postgis spatial data to mapinfo
> format.
> 
> I tried (I think the latest build of OGR2OGR) and when I do -- 
> 
> 1) It exports the whole database - can't figure out how to specify just one
> table
> 2) It doesn't create the .tab file just the dat files, id and .map files for
> each pg table (although I did exit out before it reached completion for the
> whole database).
> 
> The syntax I was using is 
> 
> ogr2ogr -f "MapInfo File"  test PG:dbname=dnddts
> 
> 
> As a work around - I've been using pgsql2shp to dump to shape and then using
> OGR2OGR to dump the shape to mapinfo format.  It would be nice to skip that
> additional step.

Regina,

You can list the layers (tables) you want to translate on the ogr2ogr 
commandline.  If you don't list any it assumes all layers should be
translated.   I presume some files were missing because you terminated
the program before completion.

eg.

ogr2ogr -f "MapInfo File" test PG:dbname=dnddts myfeattable

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 postgis-users mailing list