VRS

class caris.coverage.VRS

CSAR VRS

__init__()

Constructor

One of filename or uri is required.

Keyword Arguments:
 
  • filename (str) – The filename of the opened csar file
  • uri (str) – The uri of the opened csar file
  • options (Options) – Options to use when opening the csar file. Defaults to READ mode if no options supplied
add_band()

New in version 5.4.0.

Adds a new band

Any iterators or gridders will be invalidated after this is invoked.

Parameters:band_info (BandInfo) – The band info describing the band to be added
create_copy()

Save a copy of this cloud

Either uri or path must be specified.

Keyword Arguments:
 
  • path (str) – The file path of the destination CSAR file”
  • uri (str) – The file uri of the destination CSAR file.”
find_closest_point()

Find the attribute closest to a given point

Parameters:
  • position ((x, y) of double) – tile to query
  • band_name (str) – Name of the band to query
query()

New in version 5.2.0: Added flags parameter.

Query values in the VRS

When specifying flags, if any skipped flags exists in the specified band for a sounding, that sounding is skipped. For required flags, all specified flags must exist for that sounding to be returned. The user may specify flag option for any number of flagset bands by reapeating the flag options in a containing tuple.

Parameters:
  • bands (list(str), optional) – List of band names to query. If None all bands will be available.
  • box (((x1, y1), (x2, y2))) – Optional box to query
  • flags – Optional tuple of (BandName, SkippedFlags, RequiredFlags).
Returns:

Iterator that returns dict(str: numpy.ndarray)

Return type:

BlockIterator

Example

To offer full flexbility, single flags may be specified without a tuple and required flags may be omitted if not used. The following are equivalent. This will skip any rejected soundings. flags=(‘Status’,(‘Rejected’,),()) flags=(‘Status’,’Rejected’)

This means for single flags, there is no need to include it in its own tuple.

For specifying multiple flag setting on multiple bands, here is an example of skipping all rejected flags while returning only soundings that have the Overlap LAS flag. In other words, only non-rejected Overlap soundings will be returned. flags=((‘Status’,’Rejected’),(‘LAS_Flags’,(),’Overlap’))

query_box()

Query points within a box

Parameters:box (((x1, y1), (x2, y2)) of double) – area to query
query_tile()

Query points within a tile

Parameters:tile (VRSTile) – tile to query
remove_band()

New in version 5.4.0.

Removes a band

Any iterators or gridders will be invalidated after this is invoked.

Parameters:band_name (str) – The name of the band to be removed
set_string_table()

New in version 5.3.0.

Replace a band’s string table

Parameters:
  • band_name (str) – The name of the band to update.
  • string_table (list(str)) – The new string table.
tiles()

Query all leaf tiles

band_info

dict – The dictionary of (key=band_name, value= BandInfo)

bounding_polygon

New in version 5.1.0.

str: The bounding polygon of the VRS.

extents

((x1, y1),(x2, y2)) of float – The geographic extents of the VRS

uri

uri (str) – The uri of the opened csar file