simplipy icon indicating copy to clipboard operation
simplipy copied to clipboard

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

Open ab-tools opened this issue 9 years ago • 3 comments

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 avatar Feb 10 '17 13:02 ab-tools

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.

ab-tools avatar Feb 12 '17 10:02 ab-tools

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 :)

albertferras avatar Feb 15 '17 09:02 albertferras

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"). :-)

ab-tools avatar Feb 15 '17 09:02 ab-tools