-
Notifications
You must be signed in to change notification settings - Fork 200
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
Easy methods to convert a Geometry to the underlying type #184
Conversation
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.
minus my comment about naming, lgtm! 👌
} | ||
|
||
/// If this Geometry is a LineString, then return that LineString, else None. | ||
pub fn as_linestring(self) -> Option<LineString<T>> { |
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 don't feel strongly about this, but should this be as_line_string
since the struct is called a LineString
(and not a Linestring
)? if we end up doing this, it would make as_multi_line_string
a little verbose 😅
So if this is good, can it be merged? Should I do it? |
@rory i think it's mergeable, though i didn't merge it earlier in case you had any thoughts about this comment here |
Ah yes, sorry. I'm not fussed about the wording change. Obviously I have mentally been using |
I don't feel strongly either, so I'm fine with it as is. Can you try approving this pull request with bors? I'm curious why the other one you approved didn't work |
bors r=frewsxcv |
Build succeeded |
Added a few
.as_point()
etc. methods to "unwrap"Geometry
s. It helps with ergonomics