You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the geo_types::LineString in a geo_types::Polygon is supposed to have its first and last coordinates be the same. (I believe this is what the docs mean by "closed". Is that correct?)
I have found a case where poly1 and poly2 both satisfy that condition, but poly1.intersection(&poly2) does not.
Is this a bug? Or am I just doing something wrong?
To my knowledge the first and last point of a polygon has to be the same. I can try to take a look why this is not the case in this example. Chances are though, that it might be a bug with the algorithm itself.
Have just checked this with the original version as well?
The intersection points in the result are correct, there are just in the wrong order. This seems to be a rounding issue (i.e. 631 instead of 531 works correctly).
As far as I can tell, the
geo_types::LineString
in ageo_types::Polygon
is supposed to have its first and last coordinates be the same. (I believe this is what the docs mean by "closed". Is that correct?)I have found a case where
poly1
andpoly2
both satisfy that condition, butpoly1.intersection(&poly2)
does not.Is this a bug? Or am I just doing something wrong?
Cargo.toml
main.rs
Output:
The text was updated successfully, but these errors were encountered: