[Gdal-dev] ogr2ogr and MapInfo

Frank Warmerdam warmerdam at pobox.com
Thu Nov 10 09:28:06 EST 2005


On 11/10/05, Fischer, Andreas <andreas.fischer at kreis-unna.de> wrote:
> Dear list,
> I still did some experiences getting PostGIS-data to MapInfo MIF-files.
> Everything works well whenn (!)  I drop the Bounds-Clause in the MIF-File
> before importing it to MapInfo. Now I'd like to know if there is a
> possibility to avoid ogr2ogr writing this clause at the end for the CoordSys
> line. To get a MIF-file imported this clause is not nessesary and dropping
> this clause increases the precision of my data. Now I have to drop this
> clause manualy after creating the MIF-file and therefore I can't get the
> conversion done automatically.
>
> In the documentation to the different formats I found the following:
>
> "We should fix the driver at some point to set valid default bounds for each
> projection, but for the time being, the MapInfo driver sets the following
> default bounds when a new layer is created: For a file in
> - LAT/LON (geographic) coordinates: BOUNDS (-180, -90) (180, 90)
> - For any other projection: BOUNDS (-30000000, -15000000) (30000000,
> 15000000) "
>
> And that is what it does with my MIF-File. The line looks as follows:
> "CoordSys Earth Projection 8, 104, "m", 9, 0, 1, 3500000, 0
> Bounds(-30000000, -15000000) (30000000, 15000000)"
>
> Does this mean that this functionality is fixed in the source code of the
> programm? May this be changed by myself or has anyone another idea to
> workaround this problem? Conversion would be perfect than!
> Thank you for your help!

Andreas,

I would have no objection to adding a layer creation option
which would disable the bounds.  Do you have any idea
why the bounds are causing the import into mapinfo to fail?
Does your data fall outside the indicated bounds?

Re-reading your message I get the impression that dropping
it just improves the precision the data is imported with in
MapInfo, is that right?

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