RasterBand#
- Class for defining a spatial grid: structure de données un peu plus évoluée
qu’un tableau 2x2.
- class tracklib.core.RasterBand.RasterBand(bb, resolution=None, margin=0.05, novalue=-9999, name='grid', verbose=True)[source]#
- __init__(bb, resolution=None, margin=0.05, novalue=-9999, name='grid', verbose=True)[source]#
Grid constructor. :param bbox: Bouding box :param resolution: Grid resolution :type margin:
float
:param margin: relative float. Default value is +5% :type novalue:float
:param novalue: value that is regarded as “missing” or “not applicable”; :type verbose:bool
:param verbose: Verbose creation
- isIn(coord)[source]#
Return true if coord is in spatial grid, false else.
Parameters#
- coordUnion[ENUCoords]
coordinate of the position to test the contain.
Returns#
- bool
true if contains, false else.
- getCell(coord)[source]#
Normalized coordinates of coord
(x,) -> (i,j) with:
i = (x-xmin)/(xmax-xmin)*nb_cols
j = (y-ymin)/(ymax-ymin)*nb_rows
- Parameters
coord (
Union
[ENUCoords
,ECEFCoords
,GeoCoords
]) – Coordinates- Return type
Optional
[tuple
[float
,float
]]- Returns
Cell for give coordinates (or None if out of grid)