Expand description
Parser for WKT and PROJ format CRS strings.
Converts CRS definition strings into proj_core::CrsDef values that can
be used with proj_core::Transform::from_crs_defs().
§Supported formats
- Authority codes:
"EPSG:4326"— delegates to proj-core’s registry - PROJ strings:
"+proj=utm +zone=18 +datum=WGS84"— parsed into CrsDef - WKT1:
GEOGCS[...]/PROJCS[...]— extracts AUTHORITY tag when present, otherwise parses projection parameters
§Example
use proj_wkt::parse_crs;
use proj_core::Transform;
let from = parse_crs("+proj=longlat +datum=WGS84").unwrap();
let to = parse_crs("EPSG:3857").unwrap();
let t = Transform::from_crs_defs(&from, &to).unwrap();
let (x, y) = t.convert((-74.006, 40.7128)).unwrap();Structs§
- Proj
- Lightweight compatibility facade for downstream code that currently expects
a
proj::Proj-like flow:
Enums§
- Parse
Error - Parse error.
Functions§
- parse_
crs - Parse a CRS definition string in any supported format.
- transform_
from_ crs_ strings - Create a
Transformfrom two CRS strings in any format.