# Changes ## 0.24.1 * Modified conversion from JSON to reject zero- and one-dimensional positions. * PR: ## 0.24.0 * Added `geojson::{ser, de}` helpers to convert your custom struct to and from GeoJSON. * For external geometry types like geo-types, use the `serialize_geometry`/`deserialize_geometry` helpers. * Example: ``` #[derive(Serialize, Deserialize)] struct MyStruct { #[serde(serialize_with = "serialize_geometry", deserialize_with = "deserialize_geometry")] geometry: geo_types::Point, name: String, age: u64, } // read your input let my_structs: Vec = geojson::de::deserialize_feature_collection(geojson_reader).unwrap(); // do some processing process(&mut my_structs); // write back your results geojson::ser::to_feature_collection_string(&my_structs).unwrap(); ``` * PR: * Added `geojson::{FeatureReader, FeatureWriter}` to stream the reading/writing of your custom struct to and from GeoJSON, greatly reducing the memory required to process a FeatureCollection. * PR: * PR: * PR: * Added IntoIter implementation for FeatureCollection. * * Added `geojson::Result`. * * Added `TryFrom<&geometry::Value>` for geo_type variants. * * Changed the Display string of the error produced when converting a geometry to an incompatible type - e.g. a LineString into a Point. * * Fix: FeatureIterator errors when reading "features" field before "type" field. * * BREAKING: Change the Result type of FeatureIterator from io::Result to crate::Result * ## 0.23.0 * Enable optional geo-types integration by default. * * FIX: converting a single GeometryCollection Feature to geo_types * ## 0.22.4 * Allow parsing `Feature`/`FeatureCollection` that are missing a `"properties"` key. * * Overhauled front page documentation. * * Parse `Geometry`/`Feature`/`FeatureCollection` directly from str rather than via `GeoJson` when you know what you're expecting. * * `Feature` now derives `Default` * * Reexport `JsonObject` and `JsonValue` from `serde_json`. * ## 0.22.3 * Added `FromIterator` impl for `FeatureCollection` * * Added `'FeatureIterator` streaming feature collection deserializer * ## 0.22.2 * Added convenience methods to convert from geo_types::Geometry directly to GeoJson * ## 0.22.1 * Added convenience methods to convert from Geometry and Value to Feature * ## 0.22.0 * Update `geo-types` to 0.7.0 ## 0.21.0 * `Display` implementation of `geojson::Value` prints` the GeoJSON string * ## 0.20.0 * Switch to thiserror * Add more granular errors * `GeoJsonUnknownType` has been split into `NotAFeature` and `EmptyType` * Add additional Value context to errors where possible * Add conversions from Geo-Types Line, Triangle, Rect and GeometryCollection ## 0.19.0 * Update `geo-types` to 0.6.0 * Remove unnecessary allocations when parsing `GeometryCollection` * ## 0.18.0 * Update `geo-types` to 0.5.0 * Update docs * Add quick_collection function * * Add TryFrom impls for JsonObject and JsonValue * * Add from_json_value! macro * ## 0.17.0 * Add `TryFrom` impls for `JsonObject` and `JsonValue` * * Add `from_json_value` for `GeoJson` enum * ## 0.16.0 * Switch to Rust 2018 Edition * * Switch to `std::TryFrom` trait from custom in-crate `TryFrom` trait * * Implement `Display` for `Feature`, `Geometry`, and `FeatureCollection` * * * Make the `geo-types` conversion functionality opt-in * ## 0.15.0 * Bump geo-types to 0.4.0. * ## 0.14.0 * Bump geo-types to 0.3.0. * ## 0.13.0 * Feature::id should either be a string or number; introduce `feature::Id` * * Fix broken GeoJSON links in docs * * Improve error message for mismatched type * * Performance improvements ## 0.12.0 * Bump geo-types to 0.2.0. * ## 0.11.1 * Don't inject empty interior rings when converting to geo Polygons * ## 0.11.0 * Switch 'geo' dependency to 'geo-types' * ## 0.10.0 * Deserialize Optimizations * * Expand docs with parsing examples and corner cases, and enable conversion docs * * Update GeoJSON spec links to point to published standard * * Bump geo and num-traits crates. * * Bump geo dependency: 0.7 -> 0.8. * ## 0.9.0 * Don't publicize `assert_almost_eq` macro * Bump geo: 0.4 → 0.6 * Use docs.rs for documentation links ## 0.8.0 * [Remove `geojson::Crs`](https://github.com/georust/geojson/pull/71) * [Support `foreign_members`](https://github.com/georust/geojson/pull/70) ## 0.7.1 * [Add missing reference to GeometryCollection](https://github.com/georust/geojson/pull/68) ## 0.7.0 * [Upgrade to serde 1.0](https://github.com/georust/geojson/pull/64) ## 0.6.0 * [Upgrade rust-geo dep, use num_traits instead of num](https://github.com/georust/geojson/pull/62) ## 0.5.0 * [Upgrade to serde 0.9, remove rustc-serialize support, make geo-interop feature mandatory,](https://github.com/georust/geojson/pull/60) ## 0.4.3 * [Ability to convert a structure from rust-geojson to rust-geo](https://github.com/georust/geojson/pull/56) ## 0.4.2 * [Ability to convert a structure from rust-geo to rust-geojson](https://github.com/georust/geojson/issues/51) ## 0.4.1 * [Derive `Eq` and `PartialEq` for `Error`.](https://github.com/georust/geojson/issues/51) ## 0.4.0 * [Implement `Display` instead of `ToString` for `GeoJson`.](https://github.com/georust/geojson/pull/46) * [Upgrade Serde from 0.7 to 0.8](https://github.com/georust/geojson/pull/48) * [Add a few `convert::From` impls for `GeoJson`.](https://github.com/georust/geojson/pull/45) ## 0.3.0 * [Permit `geometry` field on `feature` objects to be `null`](https://github.com/georust/geojson/issues/42)