CartesianECEF¶
- class sargeom.coordinates.CartesianECEF(x, y, z, origin=None)[source]¶
Bases:
Cartesian3
A geocentric Earth-centered Earth-fixed (ECEF) system uses the Cartesian coordinates (X, Y, Z) to represent the 3D components of a position or a vector. For example, the ECEF coordinates of Parc des Buttes-Chaumont are (4198945 m, 174747 m, 4781887 m).
The positive X-axis intersects the surface of the ellipsoid at 0° latitude and 0° longitude, where the equator meets the prime meridian.
The positive Y-axis intersects the surface of the ellipsoid at 0° latitude and 90° longitude.
The positive Z-axis intersects the surface of the ellipsoid at 90° latitude and 0° longitude, the North Pole.
- Parameters:
- x
float
ornumpy.ndarray
The X component, in meters.
- y
float
ornumpy.ndarray
The Y component, in meters.
- z
float
ornumpy.ndarray
The Z component, in meters.
- x
- Returns:
sargeom.coordinates.CartesianECEF
The 3D cartesian point in the Earth-centered Earth-fixed (ECEF) system.
- Raises:
ValueError
If the X, Y, and Z components are not of equal size. If the X, Y, and Z components are not 0- or 1-dimensional arrays.
Notes
The coordinate reference system (CRS) used is the GPS satellite navigation and positioning system : WGS84 Geocentric System EPSG:4978.
Examples
The ECEF coordinates of Parc des Buttes-Chaumont:
>>> CartesianECEF(x=4198945, y=174747, z=4781887) XYZ CartesianECEF point [4198945 174747 4781887]
Methods Summary
crs
()save_csv
(filename)Saves the cartesian ECEF coordinates to a CSV file.
Converts geocentric Earth-centered Earth-fixed (ECEF) coordinates to geodetic coordinates.
to_enu
(origin)Transforms geocentric Earth-centered Earth-fixed (ECEF) coordinates to local East-North-Up (ENU) system.
to_enuv
(origin)Transforms geocentric Earth-centered Earth-fixed (ECEF) vector coordinates to local East-North-Up (ENU) system.
to_ned
(origin)Transforms geocentric Earth-centered Earth-fixed (ECEF) coordinates to local North-East-Down (NED) system.
to_nedv
(origin)Transforms geocentric Earth-centered Earth-fixed (ECEF) vector coordinates to local North-East-Down (NED) system.
Methods Documentation
- static crs()[source]¶
Returns the WGS84 Geocentric System EPSG:4978.
- Returns:
pyproj.crs.CRS
A pythonic coordinate reference system (CRS) manager.
- save_csv(filename)[source]¶
Saves the cartesian ECEF coordinates to a CSV file.
- Parameters:
- filename
str
orpathlib.Path
The name of the file to save the coordinates.
- filename
Examples
>>> positions = CartesianECEF(x=4198945, y=174747, z=4781887) >>> positions.save_csv("positions.csv")
- to_cartographic()[source]¶
Converts geocentric Earth-centered Earth-fixed (ECEF) coordinates to geodetic coordinates.
- Returns:
sargeom.coordinates.Cartographic
The geodetic coordinates (latitude, longitude, height).
Examples
>>> ecef_coords = CartesianECEF(x=4198945, y=174747, z=4781887) >>> ecef_coords.to_cartographic() Lon.Lat.Height Cartographic position [ 2.383... 48.879... 124.847...]
- to_enu(origin)[source]¶
Transforms geocentric Earth-centered Earth-fixed (ECEF) coordinates to local East-North-Up (ENU) system.
- Parameters:
- origin
sargeom.coordinates.Cartographic
The origin position in geodetic coordinates of the East-North-Up (ENU) system.
- origin
- Returns:
sargeom.coordinates.CartesianLocalENU
The transformed coordinates in local East-North-Up (ENU) system.
- Raises:
ValueError
If the origin position is not a Cartographic instance.
Examples
>>> ecef_coords = CartesianECEF(x=4198945, y=174747, z=4781887) >>> origin = Cartographic.ONERA_SDP() >>> ecef_coords.to_enu(origin) XYZ CartesianLocalENU point [-200505.639... 587260.319... -30171.749...]
- to_enuv(origin)[source]¶
Transforms geocentric Earth-centered Earth-fixed (ECEF) vector coordinates to local East-North-Up (ENU) system.
- Parameters:
- origin
sargeom.coordinates.Cartographic
The origin position in geodetic coordinates of the East-North-Up (ENU) system.
- origin
- Returns:
sargeom.coordinates.CartesianLocalENU
The transformed vector coordinates in local East-North-Up (ENU) system.
- Raises:
ValueError
If the origin position is not a Cartographic instance.
Examples
>>> ecef_vector = CartesianECEF(x=1.0, y=2.0, z=3.0) >>> origin = Cartographic.ONERA_SDP() >>> ecef_vector.to_enuv(origin) XYZ CartesianLocalENU point [1.902... 1.361... 2.919...]
- to_ned(origin)[source]¶
Transforms geocentric Earth-centered Earth-fixed (ECEF) coordinates to local North-East-Down (NED) system.
- Parameters:
- origin
sargeom.coordinates.Cartographic
The origin position in geodetic coordinates of the North-East-Down (NED) system.
- origin
- Returns:
sargeom.coordinates.CartesianLocalNED
The transformed coordinates in local North-East-Down (NED) system.
- Raises:
ValueError
If the origin position is not a Cartographic instance.
Examples
>>> ecef_coords = CartesianECEF(x=4198945, y=174747, z=4781887) >>> origin = Cartographic.ONERA_SDP() >>> ecef_coords.to_ned(origin) XYZ CartesianLocalNED point [ 587260.319... -200505.639... 30171.749...]
- to_nedv(origin)[source]¶
Transforms geocentric Earth-centered Earth-fixed (ECEF) vector coordinates to local North-East-Down (NED) system.
- Parameters:
- origin
sargeom.coordinates.Cartographic
The origin position in geodetic coordinates of the North-East-Down (NED) system.
- origin
- Returns:
sargeom.coordinates.CartesianLocalNED
The transformed vector coordinates in local North-East-Down (NED) system.
- Raises:
ValueError
If the origin position is not a Cartographic instance.
Examples
>>> ecef_vector = CartesianECEF(x=1.0, y=2.0, z=3.0) >>> origin = Cartographic.ONERA_SDP() >>> ecef_vector.to_nedv(origin) XYZ CartesianLocalNED point [ 1.361... 1.902... -2.919...]