#geospatial #projection #epsg #proj #wgs84 #osgeo

crs-definitions

CRS (coordinate reference system) definitions

3 releases (breaking)

0.3.0 Nov 10, 2023
0.2.0 Nov 10, 2023
0.1.0 Nov 7, 2023

#182 in Geospatial

Download history 19/week @ 2024-07-04 75/week @ 2024-07-11 36/week @ 2024-07-18 25/week @ 2024-07-25 41/week @ 2024-08-01 965/week @ 2024-08-08 1685/week @ 2024-08-15 857/week @ 2024-08-22 1188/week @ 2024-08-29 1139/week @ 2024-09-05 864/week @ 2024-09-12 1187/week @ 2024-09-19 649/week @ 2024-09-26 456/week @ 2024-10-03 1086/week @ 2024-10-10 943/week @ 2024-10-17

3,320 downloads per month
Used in proj4rs

CC0 license

4.5MB
43K SLoC

CRS (coordinate reference system) definitions.

Pulled from https://github.com/DanielJDufour/crs-csv.

Examples

Accessing a CRS definition directly by constant:

let def = crs_definitions::EPSG_4326;

assert_eq!(
    def.proj4,
    r#"+proj=longlat +datum=WGS84 +no_defs"#,
);

assert_eq!(
    def.wkt,
    r#"GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]"#,
);

Lookup a CRS definition by an EPSG code:

let def = crs_definitions::from_code(4326);

assert_eq!(def, Some(crs_definitions::EPSG_4326));

Lookup a CRS definition by a constant EPSG code:

const def: Def = crs_definitions::from_code_const::<4326>();

assert_eq!(def, crs_definitions::EPSG_4326);

No runtime deps

Features