Skip to main content

geojson_with

Function geojson_with 

Source
pub fn geojson_with<T: Serialize>(
    track: &[TrackPoint],
    summary: &FlightSummary,
    about: &T,
) -> Result<String, SimError>
Expand description

The path and the landings as geojson() writes them, with about’s fields, in its order, between tool and features: more foreign members (RFC 7946 section 6.1), such as the motor catalog’s date or how far to trust the landing point, as json_with carries them. A struct or a serde_json::Map keeps the order from one run to the next.

§Errors

As geojson(); also SimError::Unsupported for an about that isn’t a JSON object, or has a field named type, tool or features, which would write a key twice, one RFC 7946 section 7.1 keeps from a FeatureCollection (geometry, properties, coordinates, geometries), or one a reader gives a meaning: bbox (section 5) or the older format’s crs, which GDAL and QGIS still read.