Spatial package

transform module

class tomopal.spatial.transform.Transformation(blocks_: Optional[str] = None, bounds: Optional[list] = None, dem: Optional[str] = None, origin: Optional[list] = None, name: Optional[str] = None)[source]

Bases: object

__init__(blocks_: Optional[str] = None, bounds: Optional[list] = None, dem: Optional[str] = None, origin: Optional[list] = None, name: Optional[str] = None)[source]
Parameters
  • blocks – Results file containing block coordinates and associated values

  • bounds – tuple: ((lat1, lon1), (lat2, lon2))

  • dem – Digital Elevation Model file

  • origin – Coordinates of the origin of the map (lat, lon)

  • name – str: Name of the output file

conversion()[source]
dem(dem_file, bounding_box, n_x=100, n_y=100)[source]
Parameters
  • dem_file – Path to dem file

  • bounding_box – tuple: Bounding box (rectangle) of the DEM ((lat1, long1), (lat2, long2))

  • n_x – int: Number of cells in x direction (longitude)

  • n_y – int: Number of cells in y direction (latitude)

Returns

tomopal.spatial.transform.order_vertices(vertices)[source]

Paraview expects vertices in a particular order for Quad object, with the origin at the bottom left corner. :param vertices: (x, y) coordinates of the quad vertices :return: Sorted vertices

tomopal.spatial.transform.read_file(file=None, header=0)[source]

Reads space separated dat file

Module contents