[gdal-dev] ogr2ogr convert geojson to MapInfo tab

Maxime Demers burton449geo at gmail.com
Thu Sep 17 07:14:28 PDT 2015


Hello,

I encounter a problem using ogr2ogr (from gdal 1.10) when trying to convert
a geojson to MapInfo Tab. The output MapInfo tab does not include the
projection wich is defined in the geojson as EPSG:3857 so srs is defined as
WGS84 as default.

I think its a known problem with MapInfo Tab (mitab driver) but I dont know
if a solution exist. Anybody can help?

See;

geojson file

{
   "type":"FeatureCollection",
   "crs":{
      "type":"name",
      "properties":{
         "name": "3857"
      }
   },
   "features":[
      {
         "type":"Feature",
         "geometry":{
            "type":"LineString",
            "coordinates":[[-7551132, 6293816],[-7560916, 6260489]],
         },
         "properties":{
            "id":36
         }
      }
   ]
}

ogr2ogr -f "MapInfo File" output.tab line.geojson


gdalsrsinfo -o proj4 output.tab

>>> '+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '




-- 
Stack Overflow: http://stackoverflow.com/users/1914034/burton449
GIS Overflow: http://gis.stackexchange.com/users/14426/burton449
LastFm: http://www.lastfm.fr/user/burton449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150917/6d396724/attachment.html>


More information about the gdal-dev mailing list