ImportShapefile not working with linestrings
Description
Hi,
I tried to use OgrDataSource ImportShapefile. I implemented the example found in Mapwindow link. The result is that points are integrated but not linestrings. Layer is created but is empty. There is no invalid geometry in the file. I'm using the very last version of Mapwingis from github.
Thanks,
Olivier
Environment
Activity
Hi,
I did another test with a huge polygon layer (1 257 866 feats) it took several minutes, ended without error, layer. created with coorect columns names but. empty.
I noticed also that the geometry field is renamed to wkb_geometry even if the initial file was geom or the_geom.
Olivier
I tried debugging the C++ code and saw the exception is thrown in WriteRecord().
I'm not sure why. Do you have some ideas? I'll commit my unit tests.
I just tried with the shapefile send by Olivier and I can import them, but no features are imported.
So that is strange.
I also extended my earlier unit test to use GetBuffer and sf.SaveAs and with my point data I have no problems, but with my lines and polygons SaveAs throws an error.
I need to dive into the C++ code to look for the problem.
I updated the code of the unit test in my previous comment.
I've just created a small test and I have no problems importing point, linestring nor polygon shapefile.
Here's my code:
Perhaps you can share you shapefile?