transformation.spatial — Spatial¶
The transformation.spatial module contains wrappers
around pyproj for spatial transformations.
New in version 0.1.0.
- autocnet.transformation.spatial.oc2og(lon, lat, semi_major, semi_minor)[source]¶
Converts planetocentric latitude to planetographic latitude using pyproj pipeline.
- Parameters
lon (float) – longitude 0 to 360 domain (in degrees)
lat (float) – planetocentric latitude (in degrees)
semi_major (float) – Radius from the center of the body to the equator
semi_minor (float) – Radius from the center of the body to the pole
- Returns
lon (float) – longitude (in degrees)
lat (float) – planetographic latitude (in degrees)
- autocnet.transformation.spatial.og2oc(lon, lat, semi_major, semi_minor)[source]¶
Converts planetographic latitude to planetocentric latitude using pyproj pipeline.
- Parameters
lon (float) – longitude 0 to 360 domain (in degrees)
lat (float) – planetographic latitude (in degrees)
semi_major (float) – Radius from the center of the body to the equator
semi_minor (float) – Radius from the center of the body to the pole
- Returns
lon (float) – longitude (in degrees)
lat (float) – planetocentric latitude (in degrees)
- autocnet.transformation.spatial.reproject(record, semi_major, semi_minor, source_proj, dest_proj, **kwargs)[source]¶
Thin wrapper around PyProj’s Transform() function to transform 1 or more three-dimensional point from one coordinate system to another. If converting between Cartesian body-centered body-fixed (BCBF) coordinates and Longitude/Latitude/Altitude coordinates, the values input for semi-major and semi-minor axes determine whether latitudes are planetographic or planetocentric and determine the shape of the datum for altitudes. If semi_major == semi_minor, then latitudes are interpreted/created as planetocentric and altitudes are interpreted/created as referenced to a spherical datum. If semi_major != semi_minor, then latitudes are interpreted/created as planetographic and altitudes are interpreted/created as referenced to an ellipsoidal datum.
- Parameters
record (object) – Pandas series object
semi_major (float) – Radius from the center of the body to the equater
semi_minor (float) – Radius from the pole to the center of mass
source_proj (str) – Pyproj string that defines a projection space ie. ‘geocent’
dest_proj (str) – Pyproj string that defines a project space ie. ‘latlon’
- Returns
Transformed coordinates as y, x, z
- Return type
list