Skip to content

Latest commit

 

History

History
247 lines (180 loc) · 8.44 KB

CHANGES.md

File metadata and controls

247 lines (180 loc) · 8.44 KB

Changes

Unreleased

  • Add support of serializing optional geo-types with serialize_optional_geometry.
  • Add support of deserializing optional geo-types with deserialize_optional_geometry.
  • Add support for foreign members to FeatureWriter.
  • Added conversion from Vec<Feature> to GeoJson.
  • Changed Serialize impls to avoid creating intermediate JsonObjects.
  • Better CI: lint, all features
  • Implement Default on FeatureCollection.
  • Added GeometryCollection::try_from(&GeoJson) and deprecated quick_collection for conventional naming and simpler docs.
  • Added GeoJson::to_string_pretty as convenience wrappers around the same serde_json methods.

0.24.1

  • Modified conversion from JSON to reject zero- and one-dimensional positions.

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<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: #199
  • 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.
  • 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

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<Feature> 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

0.14.0

  • Bump geo-types to 0.3.0.

0.13.0

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

0.7.1

0.7.0

0.6.0

0.5.0

0.4.3

0.4.2

0.4.1

0.4.0

0.3.0