-
Notifications
You must be signed in to change notification settings - Fork 96
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
Updated set.rs
docs to be more consistent with those in predicates.rs
.
#394
Conversation
src/vector/ops/set.rs
Outdated
/// `Some(geometry)` if both Geometries contain pointers. | ||
/// `None` if either geometry is missing the GDAL pointer, or there is an error. | ||
/// * `Some(geometry)`: a new `Geometry` representing the computed union | ||
/// * `None`: when the union was not able to be computed |
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.
I'm really frustrated by this, as the C/C++ docs say:
a new geometry representing the union or NULL if an error occurs.
which would imply to me that we should be returning Result<Geometry, GDALError>
, except I'm not finding any evidence that an error message is ever posted.
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.
It might be a moot point. I suspect it's impossible to get a GEOS-less GDAL unless you're compiling it yourself, but then not everyone might know that GEOS is important to have when you're using vector data.
Also, I wonder if we should mention SFCGAL, which is required for some geometry types.
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.
🤔
/// `Some(geometry)` if both Geometries contain pointers | ||
/// `None` if either geometry is missing the GDAL pointer, or there is an error. | ||
/// * `Some(geometry)`: a new `Geometry` representing the computed intersection | ||
/// * `None`: when the geometries do not intersect or result could not be computed |
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.
Along with this, frustrated to see the overloading of Option
to handle both the empty geometry case as well as the error case. Not sure if we should try to fix this on the Rust side.
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.
when the geometries do not intersect
At least GEOS (didn't test with SFCGAL) returns an empty geometry (not NULL
) here.
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.
Thank you for testing that!!
Co-authored-by: Laurențiu Nicola <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
CHANGES.md
if knowledge of this change could be valuable to users.Context: #379 (comment)