DEM reading objects (sarpy.io.DEM.DEM)

Establish base expected functionality for digital elevation model handling.

class sarpy.io.DEM.DEM.DEMInterpolator

Bases: object

Abstract DEM class presenting base required functionality.

get_elevation_hae(lat, lon, block_size=50000)

Get the elevation value relative to the WGS-84 ellipsoid.

Parameters:
  • lat (numpy.ndarray|list|tuple|int|float) –

  • lon (numpy.ndarray|list|tuple|int|float) –

  • block_size (int|None) – If None, then the entire calculation will proceed as a single block. Otherwise, block processing using blocks of the given size will be used. The minimum value used for this is 50,000, and any smaller value will be replaced with 50,000. Default is 50,000.

Returns:

the elevation relative to the WGS-84 ellipsoid.

Return type:

numpy.ndarray

get_elevation_geoid(lat, lon, block_size=50000)

Get the elevation value relative to the geoid.

Parameters:
  • lat (numpy.ndarray|list|tuple|int|float) –

  • lon (numpy.ndarray|list|tuple|int|float) –

  • block_size (int|None) – If None, then the entire calculation will proceed as a single block. Otherwise, block processing using blocks of the given size will be used. The minimum value used for this is 50,000, and any smaller value will be replaced with 50,000. Default is 50,000.

Returns:

the elevation relative to the geoid

Return type:

numpy.ndarray

get_max_hae(lat_lon_box=None)

Get the maximum dem value with respect to HAE, which should be assumed approximately correct. This may possibly be with respect to some Area of Interest.

Parameters:

lat_lon_box (None|numpy.ndarray) – None or any area of interest of the form [lat min lat max, lon min, lon max].

Return type:

float

get_min_hae(lat_lon_box=None)

Get the minimum dem value with respect to HAE, which should be assumed approximately correct. This may possibly be with respect to some Area of Interest.

Parameters:

lat_lon_box (None|numpy.ndarray) – None or any area of interest of the form [lat min lat max, lon min, lon max].

Return type:

float

get_max_geoid(lat_lon_box=None)

Get the maximum dem value with respect to the geoid, which should be assumed approximately correct. This may possibly be with respect to some Area of Interest.

Parameters:

lat_lon_box (None|numpy.ndarray) – None or any area of interest of the form [lat min lat max, lon min, lon max].

Return type:

float

get_min_geoid(lat_lon_box=None)

Get the minimum dem value with respect to geoid, whihc should be assumed approximately correct. This may possibly be with respect to some Area of Interest.

Parameters:

lat_lon_box (None|numpy.ndarray) – None or any area of interest of the form [lat min lat max, lon min, lon max].

Return type:

float

class sarpy.io.DEM.DEM.DEMList

Bases: object

Abstract class for creating a searchable list of applicable DEM files of a given type.

get_file_list(lat_lon_box)

This will return the list of files associated with covering the lat_lon_box using a DEM. Extraneous files (i.e. with region not overlapping the provided box) should NOT be returned, and files should be returned in order of preference.

Parameters:

lat_lon_box (numpy.ndarray|list|tuple) – The bounding box of the form [lat min, lat max, lon min, lon max].

Return type:

List[str]