[Gdal-dev] Translationproblem from PostGIS to MapInfo using ogr2ogr

Fischer, Andreas andreas.fischer at kreis-unna.de
Tue Nov 8 07:01:30 EST 2005


Dear list,
I'm using the ogr2ogr tool to convert PostGIS-data to MapInfo tab or
MIF-Files. The projection in the Database is EPSG:31463. The output-format
is supposed to be the same. 
So I did use the following command. (I used -dsco "FORMAT=MIF", because the
conversion to MapInfo tab did not work well and I could take a look at
parameters in the files)
ogr2ogr -f "MapInfo File" test "PG:dbname=geodaten user=user host=host
port=port" -sql "Select * from test_tabelle" -dsco "FORMAT=MIF" -nln mi_test
-a_srs "EPSG:31463" 

The result is not the one I expected, because MapInfo does not show the
expected projektion (GK, DHDN Zone3). Instead it shows Longitude/Latitude,
even thought the Coordinates are o.k..
So I took a look at the MIF-File and found the following line:
CoordSys Earth Projection 8, 104, "m", 9, 0, 1, 3500000, 0 Bounds(-30000000,
-15000000) (30000000, 15000000)
When I change this line to the following, the import of the MIF-File to
MapInfo worked fine. It has the right projection und the geometries of the
features are exact. This line is the same as in mapinfow.prj for this
projection and without Bounds-Clause the result was very precise
CoordSys Earth Projection 8, 1000, "m", 9, 0, 1, 3500000, 0

So does anyone know about the right parameters to give with ogr2ogr to get
the right line in the MIF-File? Or does anyone can help me otherwise to get
MapInfo-Files from PostGis-tables without manual work.
Thanks a lot
Greetings
Andreas Fischer


Kreis Unna
Dezernat III - Projektteam GIS
Platanenallee 16
59425 Unna

(02303) 27-2507
andreas.fischer at kreis-unna.de



More information about the Gdal-dev mailing list