[postgis-users] Using OGR2OGR to export postgis data to other mapinfo
Obe, Regina DND\MIS
robe.dnd at ci.boston.ma.us
Wed Jun 11 07:16:22 PDT 2003
Thanks that worked and dumps out the tab file now. Now I feel kind of stupid
for such a simple solution.
There is one other problem, which I haven't figured out why it is happening.
For certain tables with spatial fields, it doesn't generate anything. I
thought maybe it had to do with the geometry_columns table not having a
record for a particular table - but doesn't work for some of those either.
I'm still trouble-shooting that.
It also doesn't seem to work for views - even if I put in an entry in
geometry_columns, although this could be related to problem above.
Now my final question -- If I have two spatial fields in a table -- is there
anyway to denote which spatial field to dump out or would I need to
explicitly specify it in the
-select option field list?
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Wednesday, June 11, 2003 9:04 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Using OGR2OGR to export postgis data to
Obe, Regina DND\MIS wrote:
> Is it possible to use OGR2OGR to export postgis spatial data to mapinfo
> 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
> 2) It doesn't create the .tab file just the dat files, id and .map files
> each pg table (although I did exit out before it reached completion for
> 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
> OGR2OGR to dump the shape to mapinfo format. It would be nice to skip
> additional step.
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.
ogr2ogr -f "MapInfo File" test PG:dbname=dnddts myfeattable
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
postgis-users mailing list
postgis-users at postgis.refractions.net
More information about the postgis-users