projjson 0.1.1

Typed, lossless read/write support for PROJJSON coordinate reference system definitions
Documentation

projjson-rs

This repo provides a serde compatible representation of projjson and schmea validation.

This crate is based on on the v0.7 schema.

Note that projjson only provides a struct representation that can be serialized and deserialized from projjson. It does not perform conversions between WKT2, WKT1, or Proj4 strings.

Usage

use projjson::ProjJson;

let json = r#"{"type":"GeographicCRS","name":"WGS 84","datum":{"type":"GeodeticReferenceFrame","name":"World Geodetic System 1984","ellipsoid":{"name":"WGS 84","semi_major_axis":6378137,"inverse_flattening":298.257223563}},"id":{"authority":"EPSG","code":4326}}"#;

let doc = json.parse::<ProjJson>().unwrap();

assert_eq!(doc.to_string(), json);

Testing

We rely on the tests from PROJ's test/unit/test_io.cpp for correctness.

Related work

License

Licensed under either of

at your option.