projection_factors¶
- geodetic_engine.geodesy.projection_factors(crs, coordinates, *, geographic=False)[source]¶
Grid convergence, scale factor and distortion at each point.
A bound CRS is read through its base CRS and a compound CRS through its horizontal part, since neither the binding nor a height changes the map projection.
- Parameters:
crs (
Any) – AnythingCoordinateReferenceSystem.from_user_input()accepts.coordinates (
ArrayLike) – One point given flat, or one row per point, inxyorder. A third value per point, such as a height, is ignored.geographic (
bool, default:False) – Read the points as longitude and latitude in the CRS’s own geodetic CRS instead of as values incrsitself.
- Return type:
- Returns:
The factors, one entry per point.
- Raises:
UnsupportedCRSError – If the CRS has no projected or geographic horizontal part: geocentric, engineering or vertical.
ValueError – If the points are not two or three values each.
CoordinateOutOfRangeError – If a longitude or latitude is outside its range; a
TransformationFailedError, like the next.TransformationFailedError – If a horizontal coordinate is not finite, or PROJ cannot evaluate finite factors. Projected factors are undefined at the poles.
Example
>>> factors = projection_factors("EPSG:32631", (500000.0, 6600000.0)) >>> round(float(factors.scale_factor[0]), 6) 0.9996