Skip to content

Commit

Permalink
fixup! Revamp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Apr 11, 2022
1 parent da37a54 commit 03a5de1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! geojson = "*"
//! ```
//!
//! If you want to use GeoJSON as input to or output from a geometric processing crate like
//! If you want to use GeoJSON as input to or output from a geometry processing crate like
//! [`geo`](https://docs.rs/geo), see the section on [using geojson with
//! geo-types](#use-geojson-with-other-crates-by-converting-to-geo-types).
//!
Expand All @@ -42,15 +42,15 @@
//! field or any other properties you'd like associated with the `Geometry`.
//! 3. A [`FeatureCollection`] is a list of one or more `Feature`s.
//!
//! Because [`Feature`] and [`FeatureCollection`] are more flexible, bare [`Geometry`] GeoJSONs are
//! rarely encountered in the wild. As such, conversions to [`Feature`] from [`Geometry`] or
//! [Geometry `Value`](Value) objects are provided via the [`From`] trait.
//! Because [`Feature`] and [`FeatureCollection`] are more flexible, bare [`Geometry`] GeoJSON
//! documents are rarely encountered in the wild. As such, conversions from [`Geometry`]
//! or [Geometry `Value`](Value) to [`Feature`] objects are provided via the [`From`] trait.
//!
//! *Beware:* A common point of confusion arises when converting a [GeoJson
//! `GeometryCollection`](Value::GeometryCollection). Do you want it converted to a single
//! [`Feature`] whose geometry is a [`GeometryCollection`](Value::GeometryCollection), or do you
//! want a [`FeatureCollection`] with each *element* of the
//! [`GeometryCollection`](Value::GeometryCollection) converted to it's own [`Feature`], potentially
//! [`GeometryCollection`](Value::GeometryCollection) converted to its own [`Feature`], potentially
//! with their own individual properties. Either is possible, but it's important you understand
//! which one you want.
//!
Expand Down Expand Up @@ -133,7 +133,7 @@
//!
//! let mut properties = serde_json::Map::new();
//! let key = "name".to_string();
//! let value = "Fireston Grill".to_string();
//! let value = "Firestone Grill".to_string();
//! properties.insert(key, serde_json::to_value(value).unwrap());
//! ```
//!
Expand Down Expand Up @@ -179,7 +179,7 @@
//! Value::GeometryCollection(ref gc) => {
//! println!("Matched a GeometryCollection");
//! // !!! GeometryCollections contain other Geometry types, and can
//! // nest we deal with this by recursively processing each geometry
//! // nest we deal with this by recursively processing each geometry
//! for geometry in gc {
//! match_geometry(geometry)
//! }
Expand Down

0 comments on commit 03a5de1

Please sign in to comment.