-
Notifications
You must be signed in to change notification settings - Fork 59
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 quick_collection function and revise docs. #122
Conversation
@@ -163,6 +170,7 @@ where | |||
) | |||
} | |||
|
|||
#[cfg_attr(docsrs, doc(cfg(feature = "geo-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.
what does this do?
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's a docs.rs directive that calls something out as only being available if a specific feature (in this case geo-types
) is enabled. I can't find the docs for it anywhere now (of course), but it's used in quite a few places.
bors r+ |
122: Add quick_collection function and revise docs. r=urschrei a=urschrei The `quick_collection` function is essentially a port of the functionality provided by @lelongg's https://github.com/lelongg/geo-geojson crate: it accepts an arbitrary `geojson::GeoJson` object, and produces a `geo::GeometryCollection` for users who just want to process their geometries using `geo`'s functionality (I suspect this is the primary use case for a lot of users). The docs have been revised to add more detail about the structure of the crate, how to get started etc, and details about what `quick_collection` does and how it works. They now explicitly point out that you **must** enable the `geo-types` feature in order to use the conversion traits and `quick_collection` – I'm on the fence as to whether this should all just be enabled by default. As I point out, `quick_collection` potentially sacrifices a little performance due to the use of `clone()` and creating new `Vec`s. I don't think we can do much about the latter, but if anyone wants to have a look at the clone() stuff feel free. Co-authored-by: Stephan Hügel <shugel@tcd.ie> Co-authored-by: Stephan Hügel <urschrei@gmail.com>
Build succeeded |
The
quick_collection
function is essentially a port of the functionality provided by @lelongg's https://github.com/lelongg/geo-geojson crate: it accepts an arbitrarygeojson::GeoJson
object, and produces ageo::GeometryCollection
for users who just want to process their geometries usinggeo
's functionality (I suspect this is the primary use case for a lot of users).The docs have been revised to add more detail about the structure of the crate, how to get started etc, and details about what
quick_collection
does and how it works. They now explicitly point out that you must enable thegeo-types
feature in order to use the conversion traits andquick_collection
– I'm on the fence as to whether this should all just be enabled by default.As I point out,
quick_collection
potentially sacrifices a little performance due to the use ofclone()
and creating newVec
s. I don't think we can do much about the latter, but if anyone wants to have a look at the clone() stuff feel free.