- Add support of serializing optional
geo-types
withserialize_optional_geometry
. - Add support of deserializing optional
geo-types
withdeserialize_optional_geometry
. - Add support for foreign members to
FeatureWriter
. - Added conversion from
Vec<Feature>
toGeoJson
. - Changed
Serialize
impls to avoid creating intermediateJsonObject
s. - Better CI: lint, all features
- Implement
Default
onFeatureCollection
. - Added
GeometryCollection::try_from(&GeoJson)
and deprecatedquick_collection
for conventional naming and simpler docs.
- Modified conversion from JSON to reject zero- and one-dimensional positions.
- PR: georust#225
- 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<f64>, name: String, age: u64, } // read your input let my_structs: Vec<MyStruct> = 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: georust#199
- For external geometry types like geo-types, use the
- 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: georust#199
- PR: georust#205
- PR: georust#206
- Added IntoIter implementation for FeatureCollection.
- Added
geojson::Result<T>
. - 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
- Enable optional geo-types integration by default.
- FIX: converting a single GeometryCollection Feature to geo_types
- Allow parsing
Feature
/FeatureCollection
that are missing a"properties"
key. - Overhauled front page documentation.
- Parse
Geometry
/Feature
/FeatureCollection
directly from str rather than viaGeoJson
when you know what you're expecting. Feature
now derivesDefault
- Reexport
JsonObject
andJsonValue
fromserde_json
.
- Added
FromIterator<Feature>
impl forFeatureCollection
- Added
'FeatureIterator
streaming feature collection deserializer
- Added convenience methods to convert from geo_types::Geometry directly to GeoJson
- Added convenience methods to convert from Geometry and Value to Feature
- Update
geo-types
to 0.7.0
Display
implementation ofgeojson::Value
prints` the GeoJSON string
- Switch to thiserror
- Add more granular errors
GeoJsonUnknownType
has been split intoNotAFeature
andEmptyType
- Add additional Value context to errors where possible
- Add conversions from Geo-Types Line, Triangle, Rect and GeometryCollection
- Update
geo-types
to 0.6.0 - Remove unnecessary allocations when parsing
GeometryCollection
- 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
- Add
TryFrom
impls forJsonObject
andJsonValue
- Add
from_json_value
forGeoJson
enum
- Switch to Rust 2018 Edition
- Switch to
std::TryFrom
trait from custom in-crateTryFrom
trait - Implement
Display
forFeature
,Geometry
, andFeatureCollection
- Make the
geo-types
conversion functionality opt-in
- Bump geo-types to 0.4.0.
- Bump geo-types to 0.3.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
- Bump geo-types to 0.2.0.
- Don't inject empty interior rings when converting to geo Polygons
- Switch 'geo' dependency to 'geo-types'
- 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.
- Don't publicize
assert_almost_eq
macro - Bump geo: 0.4 → 0.6
- Use docs.rs for documentation links