convert_geojson_request¶
- geodetic_engine.geojson.convert_geojson_request(body)[source]¶
Answer a
convertGeoJsonrequest as the OSDU service would.The request and response are those of
POST /v4/convertGeoJson, so results can be compared with the service’s, or used in their place. The output follows the service’s rule: plain GeoJSON whentoCRSis WGS 84 longitude and latitude, with heights in metres, AnyCrs otherwise. A position that cannot be transformed is NaN, as there, and counted out ofsuccessCount.Unlike the service, the package’s rules hold: a datum change needs an operation, named by
transformationor bound in an early-bound CRS; a missing grid is an error; heights keeppersistableReferenceUnitZ.- Parameters:
body (
Mapping[str,Any]) – The request:featureCollection,toCRS, and optionallytoUnitZandtransformation.- Return type:
- Returns:
The response –
featureCollection,successCount,totalCountandoperationsApplied.- Raises:
TypeError – If
bodyis not a mapping.ValueError – If a member is missing, or the collection is not one.
GeoJsonError, GeodesyError – As
convert_geojson()raises them.