iso6709parse

Crates.ioiso6709parse
lib.rsiso6709parse
version1.0.0
created_at2023-08-14 00:51:02.56928+00
updated_at2025-08-03 16:10:19.29831+00
descriptionParses coordinates in ISO6709 format from strings
homepage
repositoryhttps://github.com/TimLikesTacos/iso6709parse.git
max_upload_size
id943723
size69,857
Tim Reed (TimLikesTacos)

documentation

README

ISO6709 parser

Rust CI

This library uses the nom crate to create parsers to quickly convert ISO6709 formatted strings. This results in a much faster parse than using Regex based libraries, from 4 to 10x faster.

From traits have been implemented for the geo_types crate for easy conversion from strings.

Supports formats for latitude with N or S and E and W instead of + or -:
±DD.DD
±DDMM.MMM ±DDMMSS.SSS

for longitude: ±DDD.DDD ±DDDMM.MMM ±DDDMMSS.SSS

along with altitude when properly formatted IAW ISO6709, for example +1200.00-02130.00+2321CRS_WGS_85/

Also supports the "Human Readable" format: DD°MM′SS.SSS″N DDD°MM′SS.SSS″W

If you are using the nom parsers directly, you need the version that matches your nom version.
Version 0.x.x supports nom version 7
Version 1.x.x supports nom version 8

use iso6709parse::parse;

let coord: geo_types::Coord = parse("N35.50W170.10+8712CRSWGS_85/").unwrap();
assert_eq!(coord.y, 35.5);

Commit count: 9

cargo fmt