[gdal-dev] ogr2ogr mapinfo reporjection

Richard Greenwood richard.greenwood at gmail.com
Mon May 8 16:32:27 PDT 2017


When you say that the coordsys header is wrong, are you looking at it in
MapInfo or in a text editor? If you look at the MIF file coordinates in a
text editor do they look like they have been correctly transformed, and it
is just the header that is wrong?

On Mon, May 8, 2017 at 7:39 AM, Jonathan Beliën <jbe at geo6.be> wrote:

> Hello everyone,
>
>
>
> I struggle to reproject GeoJSON file to TAB (or MIF) file.
>
> The source projection is EPSG:4326 and the destination projection is
> EPSG:31370 (Belge 1972 / Belgian Lambert 72 – Belgium :
> http://epsg.io/31370)
>
>
>
> I searched forums and mailing lists and saw that there was some issues
> with reprojection using Mitab but that it is supposed to be fixed.
>
>
>
> When I try the following command, the coordinates seems to be transformed
> but the « coordsys » header in the TAB (or MIF) file is wrong (WGS84 –
> Non Earth)
>
>
>
> ogr2ogr test.mif test.json -f "MapInfo File" -dsco FORMAT=MIF -s_srs
> EPSG:4326 -t_srs EPSG:31370
>
>
>
> If I understood correctly what I read on the Internet, that’s because
> Mitab does not recognise « EPSG:31370 » ;
>
> I tried to replace « -t_srs EPSG:31370 » by « -t_srs "31370.txt" » where
> « 31370.txt » contained the WKT definition of EPSG:31370 ;
>
> I saw in the ogr2ogr documentation that there is a « MITAB_BOUNDS_FILE »
> parameter but did not find out how to use it (http://www.gdal.org/drv_
> mitab.html) ;
>
>
>
> I also searched in « /ogr/ogrsf_frmts/mitab/mitab_spatialref.cpp » to see
> if « Belgian Lambert 1972 » existed and it does :
>
>
>
> { 0,    1019,"Belgian 1972 7 Parameter",   4, -99.059, 53.322, -112.486,
> -0.419, 0.83, -1.885, 0.999999, 0},
>
>
>
> So I suppose it should be possible to create a MapInfo file projected in
> « Belgiam Lambert 1972 » but I do not understand how ?!
>
>
>
> Any help or idea is welcome !
> Thanks a lot !
>
>
>
> Jonathan Beliën
>
> GEO-6
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170508/d673c648/attachment.html>


More information about the gdal-dev mailing list