Export error when there are invalid polygons in the overlapping frames (shapely.errors.TopologicalError)
See original GitHub issueMy actions before raising this issue
- Read/searched the docs
- Searched past issues
Expected Behaviour
Export of the datasets should go through without any issues.
Current Behaviour
When there are invalid polygons in the overlapping frames, a notification pops out stating the export cannot be done, and an api call error stating:
shapely.errors.TopologicalError: The operation 'GEOSIntersection_r' could not be performed
Therefore blocking the export.
(in frames that have no overlapping, the invalid polygon does not block the export)
Possible Solution
- ignore the invalid polygon when calculating similarity
- add validity check in the UI to prevent any creation of invalid polygon in the first place
Steps to Reproduce (for bugs)
- create a new task.
- set the overlap size to an integer that is greater or equal to 1.
- in the overlapping frames, draw an invalid polygon (self-overlapping polygon).
- save and export the task.
Context
We need the exported points’ coordinates for further ML model training.
Your Environment
- Operating System and version (e.g. Linux, Windows, MacOS): MacOS 11
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Export error when there are invalid polygons in the ... - GitHub
Export error when there are invalid polygons in the overlapping frames (shapely.errors.TopologicalError) #2851. Closed. 2 tasks done.
Read more >python - Polygon intersection error in Shapely: "shapely.geos ...
The documentation says that: A valid Polygon may not possess any overlapping exterior or interior rings. Keep in mind that since the first...
Read more >Export a list of invalid geometries using Python
A valid Polygon may not possess any overlapping exterior or interior rings. A valid MultiPolygon may not collect any overlapping polygons.
Read more >Shapely Documentation - Read the Docs
Shapely is a BSD-licensed Python package for manipulation and analysis of planar geometric objects. It is using.
Read more >SMS:Bugfixes SMS - XMS Wiki
13376 SMS crashes when selecting Convert|Map→2D Mesh on a mesh generator coverage with an invalid polygon. 13347 Map to 2D mesh doesn't assign...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello! this is fixed via PR 2852 😃 I believe it is already merged to develop.
At least it has to be possible to export the annotations in any case. I’m currently in the situation that I can’t export my annotations because of this. I have a larger image dataset with polygon track annotations and a segment overlap of 2. Whenever I try to export any kind of annotation format I get the mentioned
GEOSIntersection_r
error. I triple checked every overlapping frame for “false” annotations, however didn’t find any that look suspicious to me. It would also help, if at least the frame number where the error occurs would be mentioned in the error message.I also tried to change the frame range of each segment to not include any overlapping frames numbers anymore, however to no avail.
How can I get to my annotations bypassing the web interface or this error in overlapping frames?