-
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
Add M-dim bindings #600
Add M-dim bindings #600
Conversation
} | ||
Ok(wkb) | ||
} | ||
|
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.
Maybe instead of a separate function, modifying the original wkb
/wkt
methods would be nicer, though that would be a breaking change.
Quick r? @weiznich if you have time. |
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.
Looks ok for me beside the inconsistencies around the index type. Those are not critical, but it would be nice to see them addressed.
Co-authored-by: Laurențiu Nicola <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
I noticed those, but they match the existing But in #581 I went the other way around ( |
Altered Geometry Debug Impl. Co-authored-by: Laurențiu Nicola <[email protected]>
Should I just harmonize all these methods to use |
I mean, |
We could do a checked conversion from |
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.
LGTM with one last nit. No strong opinion on the i32
/ usize
thing though 🤷.
PS: please squash at the end. |
IMHO it makes more sense to go with |
Yeah, the GDAL functions log an error and return 0 (for let points = todo!().
for (idx, p) in points.into_iter().enumerate() {
geom.set_point_2d(idx as i32, p); // ugly, annoying for a new Rust user, and Clippy complains on clippy::pedantic
} It's not too bad, though, more of a paper cut. |
Something should probably be done, though it's starting to feel more out of scope for this PR. Otherwise, we can create a new Error type (the IntConversionError is too vague), make all the get/set methods fallible and accept usize/u32/whatever instead. |
Yeah, okay, let's leave them like this or use |
This was probably a larger can of worms than we thought, eh?
Never mind, that messed with way too much for this PR. |
I feel like I have nothing else to add, so feel free to send it whenever. |
Yeah, can you please squash everything together? |
There, pretty sure I've squashed everything now |
That was cute 😂, but for future reference: https://www.baeldung.com/ops/git-squash-commits. |
Ye, realized that, apologies. Pretty sure this was also my first PR merge so now I know, and knowing is half the battle etc. |
It was really well-done, I wouldn't have guessed, good job! 😀 |
CHANGES.md
if knowledge of this change could be valuable to users.This PR seeks to add bindings for GDAL functions relating to higher-dimension geometry, in particular Measured geometry, with some other minor fixes/additions.
Added methods for
Geometry
:add_point_zm
add_point_m
set_point_zm
set_point_m
get_point_zm
get_point_vec_zm
iso_wkt
iso_wkb
Considering renaming
get_point_vec_zm
toget_point_zm_vec
, though neither exactly roll off the tongue.Also modified the Debug impl. for
Geometry
to use iso_wkt in cases of measured geometry.