NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3132 most downloaded on crates.io
Read and write GeoJSON vector geographic data
Last release 6 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
prepare for 1.0.0 release
prepare for 1.0.0 release
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]);
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
geojson::Error has had many cases removed and some new cases
added, reflecting the deserialization rewrite.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.feature.id is optional, we now accept "id: null", whereas previously
you were required to omit the id key. Now either is acceptable.[] instead of [[]] for POLYGON EMPTY.
id field to Feature.id, rather than to
Feature.properties.id.geo_rect_conversion_test to conform to the correctly-wound Polygon output from geo_types::geometry::Rect.to_polygon
Error enum from 200 to 48.
geojson::Value has been renamed to geojson::GeometryValue for clarity. The old spelling is still available, but deprecated.
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
]);
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);
One column per quarter.
Added GeometryCollection::try_from(&GeoJson) and deprecated quick_collection for conventional naming and simpler docs.
to_feature to convert a single S: Serialize to a Featurefrom_feature to convert a single Feature to a D: Deserializegeo-types with serialize_optional_geometry.geo-types with deserialize_optional_geometry.FeatureWriter.Vec<Feature> to GeoJson.Serialize impls to avoid creating intermediate JsonObjects.Default on FeatureCollection.GeometryCollection::try_from(&GeoJson) and deprecated
quick_collection for conventional naming and simpler docs.
GeoJson::to_string_pretty as convenience wrappers around the same serde_json methods.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.
Prepare for 0.24.1 release
Prepare for 0.24.1 release
Added geojson::{ser, de} helpers to convert your custom struct to and from GeoJSON.
geojson::{ser, de} helpers to convert your custom struct to and from GeoJSON.
serialize_geometry/deserialize_geometry helpers.#[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();
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.
geojson::Result<T>.
TryFrom<&geometry::Value> for geo_type variants.
Prepare for version 0.23.0 release
Prepare for version 0.23.0 release
Prepare for 0.22.4 release
Prepare for 0.22.4 release
Feature/FeatureCollection that are missing a "properties" key.
Geometry/Feature/FeatureCollection directly from str rather than
via GeoJson when you know what you're expecting.
Feature now derives Default
JsonObject and JsonValue from serde_json.
Prepare for 0.22.3 release
Prepare for 0.22.3 release
FromIterator<Feature> impl for FeatureCollection
'FeatureIterator streaming feature collection deserializer
This is a quick followup release to 0.22.1, which was mistakenly published by me before updating my local master.
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.
Added convenience methods to convert from Geometry and Value to Feature
* Update geo-types to 0.7.0
geo-types to 0.7.0Prepare for 0.21.0 release
Prepare for 0.21.0 release
Nothing published for this version
GeoJsonUnknownType has been split into NotAFeature and EmptyType
GeoJsonUnknownType has been split into NotAFeature and EmptyTypeRemove unnecessary allocations when parsing GeometryCollection
geo-types to 0.6.0GeometryCollection
Add TryFrom impls for JsonObject and JsonValue
geo-types to 0.5.0Add TryFrom impls for JsonObject and JsonValue
TryFrom impls for JsonObject and JsonValue
from_json_value for GeoJson enum
Switch to std::TryFrom trait from custom in-crate TryFrom trait
std::TryFrom trait from custom in-crate TryFrom trait
Display for Feature, Geometry, and FeatureCollection
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
feature::Id
* Bump geo-types to 0.2.0. *
Don't inject empty interior rings when converting to geo Polygons
Switch 'geo' dependency to 'geo-types'
Expand docs with parsing examples and corner cases, and enable conversion docs
Nothing published for this version
Don't publicize assert_almost_eq macro
assert_almost_eq macroNothing published for this version
* Remove `geojson::Crs` * Support `foreign_members`
Add missing reference to GeometryCollection
* Upgrade to serde 1.0
Upgrade rust-geo dep, use num_traits instead of num
Upgrade to serde 0.9, remove rustc-serialize support, make geo-interop feature mandatory,
Ability to convert a structure from rust-geojson to rust-geo
Ability to convert a structure from rust-geo to rust-geojson
Derive `Eq` and `PartialEq` for `Error`.
Implement `Display` instead of `ToString` for `GeoJson`.
Permit `geometry` field on `feature` objects to be `null`
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →