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

Function parse_multilinestring

nodedb-spatial/src/wkt.rs:180–190  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

178}
179
180fn parse_multilinestring(s: &str) -> Option<Geometry> {
181 let inner = strip_parens(s)?;
182 let parts = split_top_level_parens(inner)?;
183 let lines: Option<Vec<Vec<[f64; 2]>>> = parts
184 .iter()
185 .map(|p| parse_coord_list(strip_parens(p.trim())?))
186 .collect();
187 Some(Geometry::MultiLineString {
188 coordinates: lines?,
189 })
190}
191
192fn parse_multipolygon(s: &str) -> Option<Geometry> {
193 let inner = strip_parens(s)?;

Callers 1

geometry_from_wktFunction · 0.85

Calls 5

strip_parensFunction · 0.85
split_top_level_parensFunction · 0.85
parse_coord_listFunction · 0.85
collectMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected