4.4.1. Datamap

class pyprom.lib.datamap.DataMap(numpy_map, unit, filename)[source]

Base class for Datamap type objects.

__init__(numpy_map, unit, filename)[source]
Parameters:
  • numpy_map (numpy.ndarray) – Numpy ndarray representation of raster data
  • unit (str) – unit of this data: valid values are feet, foot, or meter
  • filename (str) – file name.
Raises:

Exception (regarding unit)

__weakref__

list of weak references to the object (if defined)

iterateDiagonal(x, y)[source]

Generator returns 8 closest neighbors to a raster grid location, that is, all points touching including the diagonals.

Parameters:
  • x (int) – x coordinate in raster data.
  • y (int) – y coordinate in raster data.
iterateOrthogonal(x, y)[source]

Generator returns 4 closest neighbors to a raster grid location, that is, all points touching excluding the diagonals.

Parameters:
  • x (int) – x coordinate in raster data.
  • y (int) – y coordinate in raster data.