-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
ST_Voronoi - trac #2259 #73
Conversation
| @@ -13,8 +14,7 @@ | |||
| #include "CUnit/Basic.h" | |||
| #include "cu_tester.h" | |||
|
|
|||
| #include "liblwgeom.h" | |||
| #include "liblwgeom_internal.h" | |||
| #include "../liblwgeom_internal.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the internal header needed for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the test files include liblwgeom_internal.h instead of liblwgeom.h. This one had both for some reason (redundant since liblwgeom_internal.h includes liblwgeom.h), so I removed one to match the general convention of the others.
|
About the NULL handling, I think you should consider them equal to parameter omission. If tolerance is "unknown", we take it as we decide (using the default). If return type is "unknown", same thing, we decide. |
|
Unscientific benchmarks on random points seem to show the performance degrading much more rapidly than in JTS : N= 1000 N= 10000 N=100,000 N=1,000,000 I noticed that while JTS is spending all of its time in Vertex::isCCW, GEOS seems to be spending its time on std::list::size. @strk Should the QuadEdgeSubdivision class be keeping track of its own quadEdges size, so it doesn't have to repeatedly call std::list::size which is apparently O(n) with gcc? |
|
Oh, and this is the backtrace from the hotspot: |
|
Opened a GEOS PR for this: [https://github.com/libgeos/geos/pull/55] Updated timings below. N= 1000 N= 10000 N=100,000 N=1,000,000 N=10M |
|
Committed to trunk at r14467 |
Currently missing documentation, since I thought there might be some discussion of the function signature that could affect this.
Currently the function returns NULL if args 1, 3, or 4 are NULL. Having this behavior for arg 1 seems normal, but I'm not sure about 3 or 4. Maybe it should produce an error instead?
The default clipping behavior seems a bit odd, where the user-supplied clipping envelope is ignored if it is smaller than the GEOS auto-generated clipping envelope (which is itself larger than the envelope of the input geometry). One option would be to perform a subsequent clip with ST_Difference internally, if the result envelope is larger than the user's envelope. Or just call it an "expansion envelope" instead of a clipping envelope.