E.g. covered_by returns false for LINESTRING(0 0,0 0) and POLYGON((0 0, 0 2, 2 2, 2 0, 0 0)). I suppose the library does not guarantee a sensible result since is_valid is false for that linestring with failure_wrong_topological_dimension. If possible I think it would be great if the library could give less surprising results though, even for such invalid linestrings.
Seems like mjacobse@0fe1eac could indeed be a quick fix, the
"on corner" and "on edge" test cases now pass where they wouldn't before. Though I do not quite understand how this fits into the "no turns" case and what should be done with the interrupt flags.
Feel free to close this as wontfix if such degenerate linestrings are just not intended to be supported. Otherwise I'd be happy to discuss the potential fix further.
E.g.
covered_byreturnsfalseforLINESTRING(0 0,0 0)andPOLYGON((0 0, 0 2, 2 2, 2 0, 0 0)). I suppose the library does not guarantee a sensible result sinceis_validisfalsefor that linestring withfailure_wrong_topological_dimension. If possible I think it would be great if the library could give less surprising results though, even for such invalid linestrings.Seems like mjacobse@0fe1eac could indeed be a quick fix, the
"on corner" and "on edge" test cases now pass where they wouldn't before. Though I do not quite understand how this fits into the "no turns" case and what should be done with the interrupt flags.
Feel free to close this as wontfix if such degenerate linestrings are just not intended to be supported. Otherwise I'd be happy to discuss the potential fix further.