albertferras / simplipy

plugin for qgis to simplify geometries with multiple constraints and advanced options.
21 stars 1 forks source link

Skip/Ignore invalid geometries from input - Crash at "fill db" Task #37

Open ab-tools opened 7 years ago

ab-tools commented 7 years ago

Hello,

first thanks for this great plug-in!

I'm trying to simplify a shapefile, but it constantly crashes at 65 % of the "fill chain db" task: simplipy1

Although the shapefile is a bit bigger (about 150 MB) I successfully used simplify already for much bigger shapefiles: As long as there is enough memory that's not a problem.

You can download the shapefile here to reproduce the problem yourself: http://www.ab-tools.com/temp/africa-lakes.zip

Do you have an idea what causes the issue with the shapefile above?

Best regards and thanks in advance Andreas

ab-tools commented 7 years ago

Just wanted to add that I've implemented a work-around myself now by just returning an empty Geometrie in case of such an error.

I think it makes sense to handle such situations gracefully, because if you have a shapefile with 150 MB or more you really don't care if one of the Geometries is invalid and therefore ignored. :-)

So a warning about this issue should be enough I think and then just skip it.

albertferras commented 7 years ago

Hi @ab-tools , thanks for the bug report! Your suggestion is definitely good and makes sense. I will include it in the next simplipy version :)

ab-tools commented 7 years ago

Perfect, thanks - looking forward to the next version then when I can throw away my ugly work-around again (Python is really not "my language"). :-)