[gdal-dev] ogr2ogr convert geojson to MapInfo tab
Maxime Demers
burton449geo at gmail.com
Fri Sep 18 06:08:31 PDT 2015
Hi Even,
I just proceeded to test the conversion from geojson to mapInfo tab with
the latest build. The result is not good.
geojson file:
{
"type":"FeatureCollection",
"crs":{
"type":"name",
"properties":{
"name": "EPSG:3857"
}
},
"features":[
{
"type":"Feature",
"geometry":{
"type":"LineString",
"coordinates":[[-7551132, 6293816],[-7560916, 6260489]],
},
"properties":{
"id":36
}
}
]
}
I try to convert that geojson to mapInfo tab with this command:
ogr2ogr -f "MapInfo File" -s_srs EPSG:3857 -t_srs EPSG:3857 -a_srs
EPSG:3857 test.tab lines.geojson
gdalsrsinfo -o proj4 test.tab
>>> '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs '
ogrinfo -ro -al test.tab
INFO: Open of `test.tab'
using driver `MapInfo File' successful.
Layer name: test
Geometry: Line String
Feature Count: 1
Extent: (-7560915.990000, 6260488.990000) - (-7551132.000000,
6293815.990000)
Layer SRS WKT:
PROJCS["unnamed",
GEOGCS["unnamed",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563],
TOWGS84[0,0,0,0,0,0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1.0]]
id: Integer (0.0)
OGRFeature(test):1
id (Integer) = 36
Style = PEN(w:1px,c:#000000,id:"mapinfo-pen-2,ogr-pen-0")
LINESTRING (-7551132.0 6293815.99,-7560915.99 6260488.99)
On Thu, Sep 17, 2015 at 12:30 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
> Le jeudi 17 septembre 2015 18:21:24, Maxime Demers a écrit :
> > Hi Even,
> >
> > Sorry to reply you in a new thread. I have realize my mail-list settings
> > was set to not send me replies. I have found your reply in the archive.
> >
> > Thank you for your answer. I am a bit desapointed that no solution exists
> > for now, and I dont think I would be able to test with the trunk version
> > because I am on windows and dont know how to build gdal from sources.
>
> There are daily builds of trunk at :
> http://gisinternals.com/development.php
>
> So have a look tomorrow (look for rows with a revision number > 30500,
> sometimes some targets are stuck with older revisions)
>
> >
> > Do you have an idea, if the solution could be merged into a binary
> release
> > for windows soon?
> >
> > Salutations,
> >
> > Maxime Demers
> > <http://www.lastfm.fr/user/burton449>
> >
> > >* 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?*
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
--
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/20150918/00a176e1/attachment-0001.html>
More information about the gdal-dev
mailing list