use-spatial-reference 0.1.0

Primitive spatial reference vocabulary for RustUse
Documentation
  • Coverage
  • 14.29%
    3 out of 21 items documented1 out of 19 items with examples
  • Size
  • Source code size: 8.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 751.01 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geography
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-spatial-reference

Primitive spatial reference vocabulary for RustUse.

use-spatial-reference provides small descriptive types for EPSG codes, spatial-reference identifiers, spatial-reference systems, and coordinate reference systems.

Non-goals

  • EPSG registry fetching
  • external-registry validation
  • coordinate transformation
  • deep CRS parsing

Example

use use_spatial_reference::{CoordinateReferenceSystem, EpsgCode, SpatialReferenceId};

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let epsg = EpsgCode::new(4326)?;
let identifier = SpatialReferenceId::new("WGS84")?;
let crs = CoordinateReferenceSystem::from_epsg(epsg);

assert_eq!(epsg.to_string(), "EPSG:4326");
assert_eq!(identifier.as_str(), "WGS84");
assert_eq!(crs.to_string(), "EPSG:4326");
# Ok(())
# }