<div dir="ltr">So ogr2ogr is doing the reprojection correctly, but writing the wrong coordinate system string to the resulting MapInfo file. Is that correct? I'm not a developer and I have not looked at the source code, so I am guessing, but there might be a look up table defining the MapInfo coordinate system string for a matching proj4text string. You might look in the source code for that, or you might want to file a ticket.<div><br></div><div>Best regards,</div><div>Rich</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 2:35 AM, Jonathan Beliën <span dir="ltr"><<a href="mailto:jbe@geo6.be" target="_blank">jbe@geo6.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="FR-BE" link="blue" vlink="purple"><div class="m_8760422574878889473WordSection1"><p class="MsoNormal">Any idea about this topic<span style="font-family:"Times New Roman",serif"> </span>?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks<span style="font-family:"Times New Roman",serif"> </span>!<span style="font-family:"Times New Roman",serif"> </span>:)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Jonathan Beliën<u></u><u></u></p><p class="MsoNormal">GEO-6<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="FR">De :</span></b><span lang="FR"> gdal-dev [mailto:<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@<wbr>lists.osgeo.org</a>] <b>De la part de</b> Jonathan Beliën<br><b>Envoyé :</b> mardi 9 mai 2017 10:21<br><b>À :</b> 'GDAL List' <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><br><b>Cc :</b> <a href="mailto:mitab@egroups.com" target="_blank">mitab@egroups.com</a>; 'Hellemans, Philippe' <<a href="mailto:phe@geo6.be" target="_blank">phe@geo6.be</a>></span></p><div><div class="h5"><br><b>Objet :</b> Re: [gdal-dev] ogr2ogr mapinfo reporjection<u></u><u></u></div></div><p></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hello Richard,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">When I look at the resulting MIF file in a text editor, the coordinates are indeed correctly transformed but the header is <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><i>CoordSys Earth Projection 3, 104, "m", 4.36748666666667, 90, 51.1666672333333, 49.8333339, 150000.013, 5400088.438<u></u><u></u></i></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">instead of<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><i>CoordSys Earth Projection 3, 1019, "m", 4.3674866667, 90, 49.8333339, 51.1666672333, 150000.01300000001, 5400088.4380000001 Bounds (0, 0) (300000, 300000)<u></u><u></u></i></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks for your help<span style="font-family:"Times New Roman",serif"> </span>!<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Jonathan Beliën<u></u><u></u></p><p class="MsoNormal">GEO-6<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span lang="FR">De :</span></b><span lang="FR"> Richard Greenwood [<a href="mailto:richard.greenwood@gmail.com" target="_blank">mailto:richard.greenwood@<wbr>gmail.com</a>] <br><b>Envoyé :</b> mardi 9 mai 2017 01:32<br><b>À :</b> Jonathan Beliën <<a href="mailto:jbe@geo6.be" target="_blank">jbe@geo6.be</a>><br><b>Cc :</b> <a href="mailto:mitab@egroups.com" target="_blank">mitab@egroups.com</a>; GDAL List <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>>; Hellemans, Philippe <<a href="mailto:phe@geo6.be" target="_blank">phe@geo6.be</a>><br><b>Objet :</b> Re: [gdal-dev] ogr2ogr mapinfo reporjection<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">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?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Mon, May 8, 2017 at 7:39 AM, Jonathan Beliën <<a href="mailto:jbe@geo6.be" target="_blank">jbe@geo6.be</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal">Hello everyone,<span style="font-family:"Times New Roman",serif"> </span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I struggle to reproject GeoJSON file to TAB (or MIF) file.<u></u><u></u></p><p class="MsoNormal">The source projection is EPSG:4326 and the destination projection is EPSG:31370 (Belge 1972 / Belgian Lambert 72 <span style="font-family:"Times New Roman",serif">–</span> Belgium<span style="font-family:"Times New Roman",serif"> </span>: <a href="http://epsg.io/31370" target="_blank">http://epsg.io/31370</a>)<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">When I try the following command, the coordinates seems to be transformed but the <span style="font-family:"Times New Roman",serif">« </span>coordsys<span style="font-family:"Times New Roman",serif"> »</span> header in the TAB (or MIF) file is wrong (WGS84 <span style="font-family:"Times New Roman",serif">–</span> Non Earth)<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">ogr2ogr test.mif test.json -f "MapInfo File" -dsco FORMAT=MIF -s_srs EPSG:4326 -t_srs EPSG:31370<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">If I understood correctly what I read on the Internet, that<span style="font-family:"Times New Roman",serif">’</span>s because Mitab does not recognise <span style="font-family:"Times New Roman",serif">« </span>EPSG:31370<span style="font-family:"Times New Roman",serif"> » </span>;<u></u><u></u></p><p class="MsoNormal">I tried to replace <span style="font-family:"Times New Roman",serif">« </span>-t_srs EPSG:31370<span style="font-family:"Times New Roman",serif"> »</span> by <span style="font-family:"Times New Roman",serif">« </span>-t_srs "31370.txt"<span style="font-family:"Times New Roman",serif"> »</span> where <span style="font-family:"Times New Roman",serif">« </span>31370.txt<span style="font-family:"Times New Roman",serif"> »</span> contained the WKT definition of EPSG:31370<span style="font-family:"Times New Roman",serif"> </span>;<u></u><u></u></p><p class="MsoNormal">I saw in the ogr2ogr documentation that there is a <span style="font-family:"Times New Roman",serif">« </span>MITAB_BOUNDS_FILE<span style="font-family:"Times New Roman",serif"> »</span> parameter but did not find out how to use it (<a href="http://www.gdal.org/drv_mitab.html" target="_blank">http://www.gdal.org/drv_<wbr>mitab.html</a>)<span style="font-family:"Times New Roman",serif"> </span>;<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I also searched in <span style="font-family:"Times New Roman",serif">« </span>/ogr/ogrsf_frmts/mitab/<wbr>mitab_spatialref.cpp<span style="font-family:"Times New Roman",serif"> »</span> to see if <span style="font-family:"Times New Roman",serif">« </span>Belgian Lambert 1972<span style="font-family:"Times New Roman",serif"> »</span> existed and it does<span style="font-family:"Times New Roman",serif"> </span>:<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">{ 0, 1019,"Belgian 1972 7 Parameter", 4, -99.059, 53.322, -112.486, -0.419, 0.83, -1.885, 0.999999, 0},<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">So I suppose it should be possible to create a MapInfo file projected in <span style="font-family:"Times New Roman",serif">« </span>Belgiam Lambert 1972<span style="font-family:"Times New Roman",serif"> »</span> but I do not understand how<span style="font-family:"Times New Roman",serif"> </span>?!<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Any help or idea is welcome<span style="font-family:"Times New Roman",serif"> </span>!<br>Thanks a lot<span style="font-family:"Times New Roman",serif"> </span>!<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Jonathan Beliën<u></u><u></u></p><p class="MsoNormal">GEO-6<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div></div><p class="MsoNormal"><br>______________________________<wbr>_________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><u></u><u></u></p></blockquote></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div><div><p class="MsoNormal">Richard W. Greenwood, PLS<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a><u></u><u></u></p></div></div></div></div></div></div></div><br>______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Richard W. Greenwood, PLS<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>
</div>