eradiate.scenes.surface.mesh_from_dem#
- eradiate.scenes.surface.mesh_from_dem(da, geometry, planet_radius=None)[source]#
Construct a DEM surface from a data array holding elevation data.
- Parameters:
da (
DataArray) – Data array with elevation data, indexed either by latitude and longitude coordinates or x and y coordinates.geometry (
SceneGeometryordictorstr) – Scene geometry configuration. The value is pre-processed by theSceneGeometry.convert()converter.planet_radius (
quantityorfloat, default:EARTH_RADIUS) – Planet radius used to convert latitude/longitude to x/y when geometry is aPlaneParallelGeometryinstance. This parameter is unused otherwise. If a unitless value is passed, it is interpreted using default config length units.
- Returns:
mesh (
BufferMeshShape) – A triangulated mesh representing the DEM.theta_lim (
pint.Quantity) – The limits of the latitude extent of the DEM.phi_lim (
pint.Quantity) – The limits of the longitude extent of the DEM.
Notes
The
daparameter may use the following formats:with latitude and longitude based coordinates, then named
"lat"and"lon";with x and y length based coordinates, then named
"x"and"y".
Coordinate and variable units are specified using the
unitsxarray attributes.