[gdal-dev] Issues with MapInfo Conversion to GeoJson using ogr2ogr

Even Rouault even.rouault at spatialys.com
Fri Aug 19 06:49:14 PDT 2016


Le vendredi 19 août 2016 12:52:01, Suman Humagain a écrit :
> Hi Rahkonen,
> 
> I created other mapinfo files and found that this issue occurs in the
> mapinfo files where the polygons are combined after they are drawn. And
> the uncombined polylines are working fine. So i don't think there is any
> way we can restore the combined files into the previous state during
> ogr2ogr conversion. Can we do anything like that? I have attached both
> files with this message.

test.TAB is reported as 2 line objects (that happen to cross)
test._combine.TAB is reported as one single multilinestring object. The 
multilinestring being made of 4 lines, that correspond to the 4 segments 
resulting of the intersection of the 2 lines from test.TAB
So at first sight, there's no evidence that the OGR MITAB reader would do wrong 
things. Doesn't MapInfo expose those objects the same way on reading ?

I'm not sure about what restoration you would like : like starting from the 
multilinestring made of 4 lines and creating 2 separate lines ? Could 
certainly be done with some code (or perhaps some clever Spatialite/PostGIS 
SQL), but I can't think of an existing straighforward way of doing that.

> 
> Thanks.
> 
> On 17 August 2016 at 03:41, Rahkonen Jukka (MML) <
> 
> jukka.rahkonen at maanmittauslaitos.fi> wrote:
> > Suman Humagain wrote:
> > > Hi folks,
> > > 
> > > I am converting the Mapinfo files to GeoJson format using the ogr2ogr
> > 
> > tool.
> > 
> > > The things are working great and its converting fine but i am getting
> > > different polylines than i have drawn in the mapinfo. Some extra
> > 
> > polylines
> > 
> > > are created in the intersections. If there is of the two polylines are
> > > intersected in the MapInfo, during ogr2ogr conversion, we can find 4
> > > polylines in the GeoJson file. Am i missing something here or it the
> > > way ogr2ogr is designed.
> > > 
> > > Thanks in advance.
> > 
> > Please attach a small MapInfo file that can be used for reproducing the
> > issue.
> > 
> > Thanks in advance.
> > 
> > -Jukka Rahkonen-
> > 
> > > --
> > > *Suman Humagain*
> > 
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list