Options

class caris.coverage.OpenType

Contains open modes for csar files. Note that if xml metadata is to be written out to a pre-existing file, “use WRITE mode.

  • READ
  • WRITE
class caris.coverage.Options([open_type = OpenType.READ[, log_callback_func = None[, log_callback_user_data = None[, iso19139_xml = ''[, wkt_cosys = None[, dims = None[, raster_read_callback_func = None[, pixel_type = None[, raster2geo_matrix = None]]]]]]]]])

Read and/or write options when opening a csar file.

__init__()

Constructor

Keyword Arguments:
 
  • open_type (OpenType) – The open mode
  • (func(log_callback_user_data, message (log_callback_func) – str) -> int): Callback function for log information. Should return 0 on success.
  • log_callback_user_data – Callback data to pass to log callback function.
  • position_band_name (str) – Position band name [Used during point cloud creation only]
  • band_info (dict(BandInfo)) – Dictionary of BandInfo specifying what bands to create [Used during creation only].
  • iterator – Block iterator that gives a dictionary (key=band_name, value=list_of_points) at each iteration [Used during point cloud creation only]
  • iso19139_xml (str) – The iso xml data to output [Used during creation only]
  • extents ((x1, y1[, z1]), (x2, y2[, z2])) of double) – The geographic extents of the new raster (2D) or point cloud (2D or 3D depending on position band tuple length) [Used during creation only]
  • wkt_cosys (str) – The coordinate system in WKT format [Used during creation only]
  • raster_read_callback_func (Callable[[str, ((int, int), (int, int))], [object]]) – (func(band_name : str, gridBox : ((x1, y1), (x2, y2)) of int [, level : int]) -> 1D list of elements in grid)
  • dims ((width, height) of int) – The dimensions of the raster [Used during raster creation only]
  • pixel_type (PixelType) – The pixel type of the raster [Used during raster creation only]
  • raster2geo_matrix ((ofsx, res_xx, res_xy, ofsy, res_yx, res_yy) of float) – The raster to geo transform matrix. res_xy and res_yx are usually 0 if no rotation. [Used during raster creation only]
band_info

dict – Dictionary of BandInfo specifying what bands to create [Used during creation only].

dims

(int, int) – The dimensions of the raster [Used during raster creation only] (width, height).

extents

((x1, y1[, z1]), (x2, y2[, z2])) – The geographic extents of the new raster (2D) or point cloud (2D or 3D depending on position band tuple length) [Used during creation only].

iso19139_xml

str – The iso xml data to output [Used during creation only].

iterator

BlockIterator – Block iterator that gives a dictionary (key=band_name, value=numpy_array) at each iteration [Used during point cloud creation only].

log_callback_func

Callable[[object, str], int] – Callback function for log information. Takes log_user_callback_data and a message. Should return 0 on success.

log_callback_user_data

Callback data to pass to log callback function.

open_type

OpenType – Open mode

pixel_type

PixelType – The pixel type of the raster [Used during raster creation only].

position_band_name

str – Position band name [Used during point cloud creation only].

raster2geo_matrix

(float, float, float, float, float, float) – The raster to geo transform matrix [Used during raster creation only](ofsx, res_xx, res_xy, ofsy, res_yx, res_yy) of float

raster_read_callback_func

Callable[[str, ((int, int), (int, int))], [object]] – The read callback function for rasters [Used during raster creation only]. It takes the band name and extents, returns a 1d list of elements

wkt_cosys

str – The coordinate system in WKT format [Used during creation only].