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;
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..unwrap;
assert_eq!;
Testing
We rely on the tests from PROJ's test/unit/test_io.cpp for correctness.
Related work
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.