Converting points including their attributes into numpy arrays.
More...
|
def | compare (obj, translator, leaf, classMatrix, mapCol, map, helper, invert, filter=None) |
| integral comparison of a specific attribute columns with a given numpy array More...
|
|
def | create (rowCount, layout, withCoordinates=True, noDataObj=None, valueType=ColumnType(-1)) |
| Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays. More...
|
|
def | fill (self, *args, **kwargs) |
| possible calls: More...
|
|
def | get (self, *args, **kwargs) |
| possible calls: More...
|
|
def | searchPoint (DM, win, layout, withCoordinates=True, noDataObj=None, valueType=ColumnType(-1), filter=None) |
| possible calls: More...
|
|
def | set (obj, translators, leaf, layout, filter=None, rowIdx=0) |
| set attributes of a point index leaf object from a numpy dictionary More...
|
|
def | setById (obj, DM, layout=0) |
| set attributes of datamanager objects identified by their id More...
|
|
Converting points including their attributes into numpy arrays.
◆ compare()
def compare |
( |
|
obj, |
|
|
|
translator, |
|
|
|
leaf, |
|
|
|
classMatrix, |
|
|
|
mapCol, |
|
|
|
map, |
|
|
|
helper, |
|
|
|
invert, |
|
|
|
filter = None |
|
) |
| |
|
static |
integral comparison of a specific attribute columns with a given numpy array
The results are stored in a class comparison matrix
- Parameters
-
[in] | obj | numpy array |
[in] | translator | python dictionary for translating input values (can be empty) |
[in] | leaf | point index leaf that should be converter |
[in] | classMatrix | classification matrix storing cross validation |
[in] | mapCol | attribute (single column layout) for accessing the relevant map index |
[in] | map | index map object describing the object indices for selection |
[in] | helper | index helper object for keeping track of traversed map index (can be empty. the object is extended automatically) |
[in] | invert | if false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted. |
[in] | filter | optional filter to subselect the points |
◆ create()
def create |
( |
|
rowCount, |
|
|
|
layout, |
|
|
|
withCoordinates = True , |
|
|
|
noDataObj = None , |
|
|
|
valueType = ColumnType(-1) |
|
) |
| |
|
static |
Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays.
- Parameters
-
[in] | rowCount | size of column numpy arrays |
[in] | layout | defines the attributes that should be transferred |
[in] | withCoordinates | flag if numpy arrays for coordinates are desired |
[in] | noDataObj | single or list of no data values. Beside integer and double values also 'max', 'min' and 'mask' supported. if set to 'mask', masked numpy arrays are returned instead of using no data values |
[in] | valueType | set specific output column type (pyDM.ColumnType or numpy.dtype) if needed |
- Returns
- python dictionary object
◆ fill()
def fill |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
|
static |
possible calls:
- fill(obj: object, rowIdx: object, leaf: PointIndexLeaf, filter: Filter)
- fill(obj: object, rowIdx: object, mapCol: AddInfoLayout, map: IndexMapSet, helper: IndexHelperSet, invert: object, leaf: PointIndexLeaf, filter: Filter)
- Parameters
-
self | (type: object) self pointer |
*args | (type: list) mandatory parameter |
**kwargs | (type: dict) mandatory parameter |
- Returns
- (type: int)
◆ get()
def get |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
|
static |
possible calls:
- get(leaf: PointIndexLeaf, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- get(leaf: PointIndexLeaf, layout: AddInfoLayout, mapCol: AddInfoLayout, map: IndexMapSet, helper: IndexHelperSet, invert: object, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- get(pointSet: PointSet, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- get(DM: Datamanager, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- Parameters
-
self | (type: object) self pointer |
*args | (type: list) mandatory parameter |
**kwargs | (type: dict) mandatory parameter |
- Returns
- (type: object)
◆ searchPoint()
def searchPoint |
( |
|
DM, |
|
|
|
win, |
|
|
|
layout, |
|
|
|
withCoordinates = True , |
|
|
|
noDataObj = None , |
|
|
|
valueType = ColumnType(-1) , |
|
|
|
filter = None |
|
) |
| |
|
static |
possible calls:
- searchPoint(DM: Datamanager, win: Window, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- searchPoint(DM: Datamanager, box: Box, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- searchPoint(DM: Datamanager, polygon: Polygon, layout: AddInfoLayout, withCoordinates: object, noDataObj: object, valueType: ColumnType, filter: Filter)
- Parameters
-
DM | (type: Datamanager) mandatory parameter |
win | (type: Window | Polygon | Box) mandatory parameter |
layout | (type: AddInfoLayout) mandatory parameter |
withCoordinates | (type: object) optional parameter |
noDataObj | (type: object) optional parameter |
valueType | (type: ColumnType) optional parameter |
filter | (type: Filter) optional parameter |
- Returns
- (type: object)
◆ set()
def set |
( |
|
obj, |
|
|
|
translators, |
|
|
|
leaf, |
|
|
|
layout, |
|
|
|
filter = None , |
|
|
|
rowIdx = 0 |
|
) |
| |
|
static |
set attributes of a point index leaf object from a numpy dictionary
The optional translator objects can be used to map input values to 'translated' values. If a values is not specified in the corresponding dictionary object, this value will be treated as null. Since the functionality allows setting multiple attributes at once, an empty list (which disables the translator functionality) or a list containing the same number of dictionary objects as provided by the data object and the layout columns. The function uses the layout column order for selection the correct translator object.
- Parameters
-
[in] | obj | python dictionary of numpy column arrays |
[in] | translators | list of python dictionary for translating input values (can be empty) |
[in] | leaf | point index leaf that should be converter |
[in] | layout | defines the attributes that should be transferred |
[in] | filter | optional filter to subselect the points |
[in] | rowIdx | optional row index where to start accessing the numpy object(s). default=0 |
- Returns
- number of points that have been changed
◆ setById()
def setById |
( |
|
obj, |
|
|
|
DM, |
|
|
|
layout = 0 |
|
) |
| |
|
static |
set attributes of datamanager objects identified by their id
The functionality can be used to update but also to create new attributes. The given numpy dict object must contain the 'Id' entry and at least one more entry/numpy array that is used for setting the attribute of the identified datamanager objects. The provided layout needs to match the entries of the numpy dict object otherwise an exception is thrown. The function returns the number of changed objects allowing the call to check if all Ids exist in the datamanager.
- Parameters
-
[in] | obj | python dictionary of numpy column arrays |
[in] | DM | datamanager object which should be modified |
[in] | layout | defines the attributes that should be transferred |
- Returns
- number of points that have been changed