From c64043f69184e1c40981f8bed9bd567976e2cd4b Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 23 Feb 2026 18:16:04 -0800 Subject: [PATCH 1/3] simpler docs --- src/lib.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 70768ab..7abaf7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,7 +52,7 @@ //! A GeoJSON object can be one of three top-level objects, reflected in this crate as the //! [`GeoJson`] enum members of the same name. //! -//! 1. A [`Geometry`] represents points, curves, and surfaces in coordinate space. +//! 1. A [`Geometry`] represents points, lines, and surfaces in coordinate space. //! 2. A [`Feature`] usually contains a `Geometry` and some associated data, for example a "name" //! field or any other properties you'd like associated with the `Geometry`. //! 3. A [`FeatureCollection`] is a list of `Feature`s. @@ -89,8 +89,7 @@ //! } //! "#; //! -//! let geojson: GeoJson = geojson_str.parse::().unwrap(); -//! let feature: Feature = Feature::try_from(geojson).unwrap(); +//! let feature: Feature = geojson_str.parse().unwrap(); //! //! // read property data //! assert_eq!("donuts", feature.property("food").unwrap()); @@ -124,16 +123,16 @@ //! //! let geometry = Geometry::new_point([-120.66029, 35.2812]); //! -//! let geojson = GeoJson::Feature(Feature { +//! let feature = Feature { //! bbox: None, //! geometry: Some(geometry), //! id: None, //! // See the next section about Feature properties //! properties: Some(get_properties()), //! foreign_members: None, -//! }); +//! }; //! -//! let geojson_string = geojson.to_string(); +//! let geojson_string = feature.to_string(); //! # } //! ``` //! @@ -264,7 +263,7 @@ //! //! **Limitation:** Foreign member keys must not collide with the reserved GeoJSON fields for any //! object type, or they will be silently consumed when parsing the reserved field rather than -//! appearing in `foreign_members`. The reserved fields are: `coordinates`, `geometries`, `id`, `geometry`, `properties`, `features` +//! appearing in `foreign_members`. The reserved fields are: `coordinates`, `geometries`, `id`, `geometry`, `properties`, `features`. //! //! ## Use geojson with other crates by converting to geo-types //! @@ -273,7 +272,7 @@ //! //! ### Convert `geo-types` to `geojson` //! -//! [`From`] is implemented on the [`GeometryValue`] enum variants to allow conversion _from_ [`geo-types` +//! [`From`] is implemented on the [`Geometry`] and [`GeometryValue`] enum variants to allow conversion _from_ [`geo-types` //! Geometries](../geo_types/index.html#structs). //! //! ``` @@ -291,6 +290,10 @@ //! geojson::GeometryValue::from(&geo_geometry), //! geojson::GeometryValue::new_point([2., 9.]), //! ); +//! assert_eq!( +//! geojson::Geometry::from(&geo_geometry), +//! geojson::Geometry::new_point([2., 9.]), +//! ); //! # } //! ``` //! @@ -344,10 +347,7 @@ //! "properties": {}, //! "geometry": { //! "type": "Point", -//! "coordinates": [ -//! -0.13583511114120483, -//! 51.5218870403801 -//! ] +//! "coordinates": [1.0, 2.0] //! } //! } //! "#; From 8c1281626b6b3a1d2355bc6237801bae405409f0 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 23 Feb 2026 17:54:15 -0800 Subject: [PATCH 2/3] prepare for 0.25.0 release --- CHANGES.md | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 58e799e..36c9df5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Changes -## Unreleased +## 0.25.0 * BREAKING: `Position` is now a struct, rather than a type alias for `Vec`. The new struct uses the [tinyvec crate](https://crates.io/crates/tinyvec), diff --git a/Cargo.toml b/Cargo.toml index e107c55..6fa8561 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "geojson" description = "Read and write GeoJSON vector geographic data" -version = "0.24.2" +version = "0.25.0" authors = ["The GeoRust Developers "] license = "MIT/Apache-2.0" repository = "https://github.com/georust/geojson" From f6eafedf98f385b2be77c3ba3f18b258ea7db00b Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Sun, 1 Mar 2026 16:22:26 +0900 Subject: [PATCH 3/3] prepare for 1.0.0 release --- CHANGES.md | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 36c9df5..6bd77ec 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Changes -## 0.25.0 +## v1.0.0 * BREAKING: `Position` is now a struct, rather than a type alias for `Vec`. The new struct uses the [tinyvec crate](https://crates.io/crates/tinyvec), diff --git a/Cargo.toml b/Cargo.toml index 6fa8561..78ec9e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "geojson" description = "Read and write GeoJSON vector geographic data" -version = "0.25.0" +version = "1.0.0" authors = ["The GeoRust Developers "] license = "MIT/Apache-2.0" repository = "https://github.com/georust/geojson"