MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_coord_list

Function parse_coord_list

nodedb-spatial/src/wkt.rs:133–135  ·  view source on GitHub ↗

Parse "lng1 lat1, lng2 lat2, ..." into coordinate vec.

(s: &str)

Source from the content-addressed store, hash-verified

131
132/// Parse "lng1 lat1, lng2 lat2, ..." into coordinate vec.
133fn parse_coord_list(s: &str) -> Option<Vec<[f64; 2]>> {
134 s.split(',').map(parse_coord).collect()
135}
136
137fn parse_point(s: &str) -> Option<Geometry> {
138 let inner = strip_parens(s)?;

Callers 5

parse_linestringFunction · 0.85
parse_polygonFunction · 0.85
parse_multipointFunction · 0.85
parse_multilinestringFunction · 0.85
parse_multipolygonFunction · 0.85

Calls 1

collectMethod · 0.80

Tested by

no test coverage detected