[Gdal-dev] Re: [postgis-users] OGR2OGR conversion from PostGIS to MapInfo issue

Mateusz Loskot mateusz at loskot.net
Mon Oct 15 10:35:21 EDT 2007


Obe, Regina wrote:
> Thanks Mateusz,
> 
> I tried using a view and that seemed to work and the fields now have the
> right length and I can resave the file in mapinfo.  The only trick was
> that I had to manually insert an entry for my view into the
> geometry_columns table for it to work.

Regina,

Yes, unfortunately I don't see any shortcut for that.

> My final command shell call looks like this
> 
> ogr2ogr -f "MapInfo File" -a_srs "EPSG:2249" update PG:"host=zdnd1
> dbname=dnddts" "UPDATE" vwupdate -nln "UPDATE"

BTW, UPDATE is a reserved keyword in SQL standards, fortunately it's
not considered as reserved in PostgreSQL, but sometimes (using different
versions, moving data between DBMS, etc.) you may encounter problems.

http://www.postgresql.org/docs/8.2/interactive/sql-keywords-appendix.html

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



More information about the Gdal-dev mailing list