[gdal-dev] ogr2ogr mapinfo reporjection
Jonathan Beliën
jbe at geo6.be
Mon May 29 01:35:36 PDT 2017
Any idea about this topic ?
Thanks ! :)
Jonathan Beliën
GEO-6
De : gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] De la part de Jonathan Beliën
Envoyé : mardi 9 mai 2017 10:21
À : 'GDAL List' <gdal-dev at lists.osgeo.org>
Cc : mitab at egroups.com; 'Hellemans, Philippe' <phe at geo6.be>
Objet : Re: [gdal-dev] ogr2ogr mapinfo reporjection
Hello Richard,
When I look at the resulting MIF file in a text editor, the coordinates are indeed correctly transformed but the header is
CoordSys Earth Projection 3, 104, "m", 4.36748666666667, 90, 51.1666672333333, 49.8333339, 150000.013, 5400088.438
instead of
CoordSys Earth Projection 3, 1019, "m", 4.3674866667, 90, 49.8333339, 51.1666672333, 150000.01300000001, 5400088.4380000001 Bounds (0, 0) (300000, 300000)
Thanks for your help !
Jonathan Beliën
GEO-6
De : Richard Greenwood [mailto:richard.greenwood at gmail.com]
Envoyé : mardi 9 mai 2017 01:32
À : Jonathan Beliën <jbe at geo6.be <mailto:jbe at geo6.be> >
Cc : mitab at egroups.com <mailto:mitab at egroups.com> ; GDAL List <gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org> >; Hellemans, Philippe <phe at geo6.be <mailto:phe at geo6.be> >
Objet : Re: [gdal-dev] ogr2ogr mapinfo reporjection
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 <mailto: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 <mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Richard W. Greenwood, PLS
www.greenwoodmap.com <http://www.greenwoodmap.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170529/d671769a/attachment.html>
More information about the gdal-dev
mailing list