PackageTrack
Sign in Get early access

geojson

Read and write GeoJSON vector geographic data

1.0.0 11M downloads/mo #3040 most downloaded on crates.io georust/geojson

What this package is like to depend on

Last release 5 months ago

16 Mar 2026

Release timing varies

gaps range from 2 months to 1.8 years

Most releases are documented

notes for 33 of 49 stable releases

1 version withdrawn

withdrawn after publishing

12 years old

50 releases · first in 2014

1 release in the last 12 months

see the full history below

Release timeline

50 releases · Dec 2014 to Mar 2026
2015 2017 2019 2021 2023 2025
Release Pre-release Withdrawn

Releases

latest 50
  1. 1.0.0 16 Mar 2026
    Release notes

    prepare for 1.0.0 release

    Open source →
    Release notes
    • BREAKING: Position is now a struct, rather than a type alias for Vec. The new struct uses the tinyvec crate, which allows for faster GeoJSON processing in the common (2-D) case by avoiding per-coordinate heap allocations.
      // BEFORE: Position *was* a Vec. A Vec is always allocated on the heap, which is slow.
      let position: Position = vec![1.0, 2.0];
      let x = position[0];
      
      // AFTER: Position is its own type, buildable *from* a Vec.
      let position: Position = vec![1.0, 2.0].into();
      // index access is unchanged
      let x = position[0];
      
      // Alternatively, you can now construct from an Array, avoiding the Vec's heap allocation.
      let position: Position = [1.0, 2.0].into();
      // equivalently:
      let position = Position::from([1.0, 2.0]);
      
      // You can still build 3D+ Positions. These higher dimension coordinates will use Heap storage.
      let position = Position::from([1.0, 2.0, 3.0]);
      let position = Position::from(vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0]);
      
    • Substantially speed up parsing (Benches show 30% reduction). This was essentially a rewrite of our deserialization logic. Instead of going from input -> serde_json::JsonObject -> geojson types we now go directly from input -> geojson types.
    • Deserialization errors now include line number and column position. Before:

      Encountered neither number type nor string type for 'id' field on 'feature' object: {} After: Error while deserializing GeoJSON: Feature 'id' must be a string or a number at line 3 column 11

    • BREAKING: geojson::Error has had many cases removed and some new cases added, reflecting the deserialization rewrite.
    • BREAKING: TryInto/From implementations for serde_json::Value and serde_json::Object have been removed now that they are not used for deserialization.
    • type is now the first field when serializing GeoJSON objects.
    • Since feature.id is optional, we now accept "id: null", whereas previously you were required to omit the id key. Now either is acceptable.
    • Fix: Return [] instead of [[]] for POLYGON EMPTY.
    • Potentially breaking: De/Serializing your custom structs with serde now maps your struct's id field to Feature.id, rather than to Feature.properties.id.
    • Fix geo_rect_conversion_test to conform to the correctly-wound Polygon output from geo_types::geometry::Rect.to_polygon
    • Decreased the size of the Error enum from 200 to 48.
    • geojson::Value has been renamed to geojson::GeometryValue for clarity. The old spelling is still available, but deprecated.
    • Add ergonomic constructors to geojson::GeometryValue.
      // BEFORE
      let point = GeometryValue::Point(Position::from([1.0, 2.0]));
      let line_string = GeometryValue::LineString(vec![
        Position::from([1.0, 2.0]),
        Position::from([3.0, 4.0])
      ]);
      let geometry_collection = GeometryValue::GeometryCollection(vec![
        Geometry::new(point),
        Geometry::new(line_string)
      ]);
      
      // AFTER
      let point = GeometryValue::new_point([1.0, 2.0]);
      let line_string = GeometryValue::new_line_string(vec![
        [1.0, 2.0],
        [3.0 4.0]
      ]);
      let geometry_collection = GeometryValue::new_geometry_collection(vec![
        point,
        line_string
      ]);
      
    • The geojson::GeometryValue enum variants now have a named field, rather than a newtype.
      let position = Position::from([1,2]);
      
      // before
      let point = geojson::GeometryValue::Point(position);
      let geometry_collection = geojson::GeometryValue::GeometryCollection(vec![point.into()]);
      
      // after
      let point = geojson::GeometryValue::Point { coordinates: position };
      let geometry_collection = geojson::GeometryValue::GeometryCollection { geometries: vec![point.into()] };
      
      // or using the new constructor
      let point = geojson::GeometryValue::new_point(position);
      
    Open source →
  2. 0.24.2 24 Feb 2025
    Release notes
    • Add to_feature to convert a single S: Serialize to a Feature
    • Add from_feature to convert a single Feature to a D: Deserialize
    • Upgrade from thiserror v1 to v2
    • 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.
    • The bbox property of a Feature can now be null (returning None) when parsing GeoJSON strings in order to facilitate easier processing of GeoJSON "in the wild" (e.g. Copernicus STAC GeoJSON). The spec does not allow this, but implementations appear to disagree.
    Open source →
  3. 0.24.1 17 May 2023
    Release notes

    Prepare for 0.24.1 release

    Open source →
    Release notes
    Open source →
  4. 0.24.0 09 Sep 2022
    Release notes
    Open source →
  5. 0.23.0 02 Jun 2022
    Release notes

    Prepare for version 0.23.0 release

    Open source →
    Release notes
    Open source →
  6. 0.22.4 27 May 2022
    Release notes

    Prepare for 0.22.4 release

    Open source →
    Release notes
    Open source →
  7. 0.22.3 28 Mar 2022
    Release notes

    Prepare for 0.22.3 release

    Open source →
    Release notes
    Open source →
  8. 0.22.2 19 Apr 2021
    Release notes

    This is a quick followup release to 0.22.1, which was mistakenly
    published by me before updating my local master.

    See the 0.22.1 tag (9152be1) for details.

    There shouldn't be any problems for users of the interstitial 0.22.1
    release, it just has slightly less new features.

    Open source →
    Release notes
    Open source →
  9. 0.22.1 19 Apr 2021 withdrawn
    Release notes
    Open source →
  10. 0.22.0 02 Feb 2021
    Release notes
    • Update geo-types to 0.7.0
    Open source →
  11. 0.21.0 07 Dec 2020
    Release notes

    Prepare for 0.21.0 release

    Open source →
    Release notes
    Open source →
  12. 0.20.1 24 Oct 2020

    Nothing published for this version

  13. 0.20.0 19 Oct 2020
    Release notes
    • 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
    Open source →
  14. 0.19.0 22 Jun 2020
    Release notes
    Open source →
  15. 0.18.0 23 Mar 2020
    Release notes
    Open source →
  16. 0.17.0 28 Dec 2019
    Release notes
    Open source →
  17. 0.16.0 05 May 2019
    Release notes
    Open source →
  18. 0.15.0 17 Feb 2019
    Release notes Open source →
  19. 0.14.0 13 Jan 2019
    Release notes Open source →
  20. 0.13.0 11 Nov 2018
    Release notes
    Open source →
  21. 0.12.0 16 Aug 2018
    Release notes Open source →
  22. 0.11.1 08 Jul 2018
    Release notes
    Open source →
  23. 0.11.0 04 May 2018
    Release notes
    Open source →
  24. 0.10.0 28 Apr 2018
    Release notes
    Open source →
  25. 0.9.1 29 Nov 2017

    Nothing published for this version

  26. 0.9.0 09 Sep 2017
    Release notes
    • Don't publicize assert_almost_eq macro
    • Bump geo: 0.4 → 0.6
    • Use docs.rs for documentation links
    Open source →
  27. 0.8.1 23 May 2017

    Nothing published for this version

  28. 0.8.0 02 May 2017
    Release notes Open source →
  29. 0.7.1 30 Apr 2017
    Release notes Open source →
  30. 0.7.0 29 Apr 2017
    Release notes Open source →
  31. 0.6.0 26 Mar 2017
    Release notes Open source →
  32. 0.5.0 04 Feb 2017
    Release notes Open source →
  33. 0.4.3 01 Jan 2017
    Release notes Open source →
  34. 0.4.2 10 Dec 2016
    Release notes Open source →
  35. 0.4.1 01 Nov 2016
    Release notes Open source →
  36. 0.4.0 07 Aug 2016
    Release notes Open source →
  37. 0.3.0 10 May 2016
    Release notes Open source →
  38. 0.2.1 19 Apr 2016

    Nothing published for this version

  39. 0.2.0 16 Mar 2016

    Nothing published for this version

  40. 0.1.1 09 Mar 2016

    Nothing published for this version

  41. 0.1.0 22 May 2015

    Nothing published for this version

  42. 0.0.9 20 Apr 2015

    Nothing published for this version

  43. 0.0.8 18 Apr 2015

    Nothing published for this version

  44. 0.0.7 04 Apr 2015

    Nothing published for this version

  45. 0.0.6 04 Apr 2015

    Nothing published for this version

  46. 0.0.5 21 Feb 2015

    Nothing published for this version

  47. 0.0.4 15 Feb 2015

    Nothing published for this version

  48. 0.0.3 10 Jan 2015

    Nothing published for this version

  49. 0.0.2 08 Jan 2015

    Nothing published for this version

  50. 0.0.1 04 Dec 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive