-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failure with OrientedEnvelope #10
Comments
Thanks, will try to replicate. |
I stepped through the function on my new server, and an old server running 2.0 r9605 from SVN, where the test passed. Stepping through manually, I get the same answer on both - the answer I get on my new server. But, looking closely at all the steps, I can see what's going on. Both return values have the same ST_Area, showing that there is not a unique solution. Thinking about it, it's obvious that this is the case: consider a regular polygon with N sides, there will be N solutions, unless some are equal. e.g. an equilateral triangle has three OrientedEnvelopes, and a circle will have infinitely many OrientedEnvelopes. This linestring happens to trigger that case. When I step through by hand, I get slightly different rounding behavior, so it picks a different solution. The problem is the comparison
As to why does it trigger that case? I believe any right-angled triangle will, but haven't gone through a geometric proof. Any isosceles certainly will. This case happens to be a 1-5-sqrt(26) right-angled triangle. We should probably change the test so that we test a shape with a unique solution. There's also another issue - should we guarantee a particular solution when there are multiple valid ones? |
ping @ajashton |
PostGIS full version is
POSTGIS="2.1.7 r13414" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 1.11.2, released 2015/02/10" LIBXML="2.9.2" LIBJSON="UNKNOWN" RASTER
, PostgreSQL is 9.4.4 server and clientThe text was updated successfully, but these errors were encountered: