-
Notifications
You must be signed in to change notification settings - Fork 347
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
Fix the user data of geometry in voronoi diagram. #115
Conversation
(1) Use a heap vaiable to replace a local variable; (2) Set user data for polygon of voronoi diagram.
|
Thanks for the fix, @whuaegeanse . Would you consider adding a test case in https://github.com/libgeos/geos/blob/master/tests/unit/triangulate/VoronoiTest.cpp ? |
|
OK, I will add one. |
|
and memory management will be ugly,i mean,caller should free memory libgeos allocated |
|
@kenash54845 Yes, you are right. The user data is a pointer, which can not store a pointer of the local variable. Any solution to fix this? |
|
libgeos wont fix this,i guess |
|
@kenash54845 I will add a test for this and have to modify some other tests. |
|
@whuaegeanse have u tested whether userdata is null or not? here is code snippet i m using for test |
|
OK, I see two PRs for this, which one is going forward? |
|
Returning the coordinate through |
|
Could do. Still leaves us w/ the C API to deal with, in case anyone is hoping to get access to those coordinates through that route... |
|
I think this is a worthy goal, but this approach isn't it. Something that uses @dbaston's std::pair return idea and also figures out how to expose that via the CAPI would be a complete solution. |
(1) Use a heap variable pointer as user data of polygon of voronoi diagram;
(2) Set user data for polygon of voronoi diagram.