Interface to an Datamanager (ODM) object. More...
Public Member Functions | |
| def | __init__ |
| | |
| def | addPoint |
| | |
| def | addPolygon |
| | |
| def | addPolyline |
| | |
| def | deletePoint |
| def | deletePolygon |
| def | deletePolyline |
| def | geometries |
| iterate over all geometry objects | |
| def | geometries |
| iterate over all geometry objects with a specific layout | |
| def | geometries |
| iterate over subselected geomtries based on a given filter | |
| def | geometries |
| iterate over subselected geometries based on a given filter with a specific layout | |
| def | getAddInfoStatistics |
| def | getCRS |
| get the coordinate reference system as a WKT string | |
| def | getFilename |
| def | getGeometry |
| get geometry object by its id | |
| def | getHistogramSet |
| get histograms of all attributes described by the layout | |
| def | getLimit |
| def | getPointIndex |
| def | getPolylineIndex |
| def | indexDim |
| def | points |
| iterate over all points | |
| def | points |
| iterate over all points with a specific layout | |
| def | points |
| iterate over subselected points based on a given filter | |
| def | points |
| iterate over subselected points based on a given filter with a specific layout | |
| def | replacePoint |
| | |
| def | replacePolygon |
| | |
| def | replacePolyline |
| | |
| def | save |
| def | searchPoint |
| def | searchPoint |
| def | searchPoint |
| def | setCRS |
| set the coordinate reference system from a WKT string | |
| def | sizeGeometry |
| def | sizePoint |
| def | sizePolygon |
| def | sizePolygonPoint |
| def | sizePolyline |
| def | sizePolylinePoint |
| def | storesOrder |
| def | threadSafe |
Static Public Member Functions | |
| def | create |
| | |
| def | existsODM |
| def | getLimitODM |
| def | isValidODM |
| def | load |
| | |
Detailed Description
Interface to an Datamanager (ODM) object.
Datamanager objects are the central objects that can be managed by the DMlib. It allows managing huge geometry data sets with fast spatial access. For efficiency reasons points and other geometry objects (lines, polygons, etc.) are managed by different spatial indices. The interface gives access to the point index (see getPointIndex) and the other spatial index (see getPolylineIndex stores line and polygon data) separately or via the datamanager interface itself in a wrapped manner.When create a datamanger instance, the datamanager uses a set of standard parameter which are appropriate for most data sets. However, it is possible to change these values using a ParameterSets object. The following parameters are supported:
| Name | type | default | Comment |
|---|---|---|---|
| StoreOrder | bool | false | Flag if the order should be stored |
| PointsInMemory | int | 8*200000 | Number of points that are kept in memory |
| AverageTilePointCount | int | 200000 | Average point count per tile |
| TileSize | double | auto | Tile size for tiling mode |
Constructor & Destructor Documentation
| def __init__ | ( | self, | |
| filename, | |||
openIfExists = True, |
|||
readOnly = False, |
|||
threadSafety = True |
|||
| ) |
Create a new datamanager instance from an existing ODM file or by creating an ODM file
- Parameters
-
[in] filename odm filename (incl. extension) [in] openIfExists if true the existing ODM is opened, otherwise a new ODM file is created (which overrides a possible exisitng ODM file) [in] readOnly if true the ODM is opened in read only mode, which never stores any modification made to the ODM object in memory [in] threadSafety if true a thread safe instance of the ODM is created. Otherwise a standard instance is created which may provide a bit better performance
Member Function Documentation
| def addPoint | ( | self, | |
| p, | |||
cloneAddInfo = True, |
|||
fileId = None, |
|||
layerId = None |
|||
| ) |
adds point to the datamanager (secure that addinfo of the point is NOT linked to another datamanager or set the cloneAddInfo flag)
- Parameters
-
[in] p point object [in] cloneAddInfo flag if the addinfo object should be cloned, before adapting file and layer id in addinfo object [in] fileId the point is inserted into the given file (it is assumed that the given file exists) or to the default file in case of -1 [in] layerId the point is inserted into the given layer of the given file (layer and file entry must exist) or to the default layer in case of -1
- Returns
- point id
| def addPolygon | ( | self, | |
| p, | |||
cloneAddInfo = True, |
|||
fileId = None, |
|||
layerId = None |
|||
| ) |
adds a polygon to the datamanager (secure that addinfo of the polygon is NOT linked to another datamanager or set the cloneAddInfo flag)
- Parameters
-
[in] p polygon object [in] cloneAddInfo flag if the addinfo object should be cloned, before adapting file and layer id in addinfo object [in] fileId the point is inserted into the given file (it is assumed that the given file exists) or to the default file in case of -1 [in] layerId the point is inserted into the given layer of the given file (layer and file entry must exist) or to the default layer in case of -1
- Returns
- polyline id
| def addPolyline | ( | self, | |
| l, | |||
cloneAddInfo = True, |
|||
fileId = None, |
|||
layerId = None |
|||
| ) |
adds a polyline to the datamanager (secure that addinfo of the polyline is NOT linked to another datamanager or set the cloneAddInfo flag)
- Parameters
-
[in] l polyline object [in] cloneAddInfo flag if the addinfo object should be cloned, before adapting file and layer id in addinfo object [in] fileId the point is inserted into the given file (it is assumed that the given file exists) or to the default file in case of -1 [in] layerId the point is inserted into the given layer of the given file (layer and file entry must exist) or to the default layer in case of -1
- Returns
- polyline id
|
static |
Create a new datamanager file (Convenient wrapper for IDatamanager::New)
- Parameters
-
[in] filename odm filename (incl. extension) [in] threadSafety if true a thread safe instance of the ODM is created. Otherwise a standard instance is created which may provide a bit better performance
| def deletePoint | ( | self, | |
| arg1 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: long) mandatory parameter
| def deletePolygon | ( | self, | |
| arg1 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: long) mandatory parameter
| def deletePolyline | ( | self, | |
| arg1 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: long) mandatory parameter
|
static |
- Parameters
-
arg1 (type: str) mandatory parameter
- Returns
- (type: bool)
| def geometries | ( | self | ) |
iterate over all geometry objects
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: collections.Iterable[Geometry])
Referenced by Datamanager.geometries().
| def geometries | ( | self, | |
| layout, | |||
readOnly = False |
|||
| ) |
iterate over all geometry objects with a specific layout
see DM::IAddInfo::setView for further details
- Parameters
-
self self pointer layout a view of the corresponding layout will be set onto each geometry readOnly flag if the layout of storage object should be changed, in case the view layout is not a true subset of the storage layout
- Returns
- python iterator object
References Datamanager.geometries().
| def geometries | ( | self, | |
| filter | |||
| ) |
iterate over subselected geomtries based on a given filter
see DM::IFilter for further details
- Parameters
-
self self pointer filter filter object for subselection
- Returns
- python iterator object
References Datamanager.geometries().
| def geometries | ( | self, | |
| filter, | |||
| layout, | |||
readOnly = False |
|||
| ) |
iterate over subselected geometries based on a given filter with a specific layout
see DM::IFilter and DM::IAddInfo::setView for further details
- Parameters
-
self self pointer filter filter object for subselection layout a view of the corresponding layout will be set onto each geometry readOnly flag if the layout of storage object should be changed, in case the view layout is not a true subset of the storage layout
- Returns
- python iterator object
References Datamanager.geometries().
| def getAddInfoStatistics | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: AddInfoStatistics)
| def getCRS | ( | self | ) |
get the coordinate reference system as a WKT string
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: str)
| def getFilename | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: str)
| def getGeometry | ( | self, | |
| arg1 | |||
| ) |
get geometry object by its id
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: long) mandatory parameter
- Returns
- (type: object)
| def getHistogramSet | ( | self, | |
| layout, | |||
maxDistinctValues = 1000, |
|||
filter = None |
|||
| ) |
get histograms of all attributes described by the layout
- Parameters
-
self (type: Datamanager) self pointer layout (type: AddInfoLayout) mandatory parameter maxDistinctValues (type: int) optional parameter filter (type: Filter) optional parameter
- Returns
- (type: HistogramSet)
| def getLimit | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: Box)
|
static |
- Parameters
-
arg1 (type: str) mandatory parameter
- Returns
- (type: Box)
| def getPointIndex | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: PointIndex)
| def getPolylineIndex | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: PolylineIndex)
| def indexDim | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
|
static |
- Parameters
-
arg1 (type: str) mandatory parameter
- Returns
- (type: bool)
|
static |
Load an existing datamanager file (Convenient wrapper for IDatamanager::New)
- Parameters
-
[in] filename odm filename (incl. extension) [in] readOnly if true the ODM is opened in read only mode, which never stores any modification made to the ODM object in memory [in] threadSafety if true a thread safe instance of the ODM is created. Otherwise a standard instance is created which may provide a bit better performance
| def points | ( | self | ) |
iterate over all points
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: collections.Iterable[Point])
Referenced by Datamanager.points().
| def points | ( | self, | |
| layout, | |||
readOnly = False |
|||
| ) |
iterate over all points with a specific layout
see DM::IAddInfo::setView for further details
- Parameters
-
self self pointer layout a view of the corresponding layout will be set onto each point readOnly flag if the layout of storage object should be changed, in case the view layout is not a true subset of the storage layout
- Returns
- python iterator object
References Datamanager.points().
| def points | ( | self, | |
| filter | |||
| ) |
iterate over subselected points based on a given filter
see DM::IFilter for further details
- Parameters
-
self self pointer filter filter object for subselection
- Returns
- python iterator object
References Datamanager.points().
| def points | ( | self, | |
| filter, | |||
| layout, | |||
readOnly = False |
|||
| ) |
iterate over subselected points based on a given filter with a specific layout
see DM::IFilter and DM::IAddInfo::setView for further details
- Parameters
-
self self pointer filter filter object for subselection layout a view of the corresponding layout will be set onto each point readOnly flag if the layout of storage object should be changed, in case the view layout is not a true subset of the storage layout
- Returns
- python iterator object
References Datamanager.points().
| def replacePoint | ( | self, | |
| p, | |||
attributeOnly = False |
|||
| ) |
replace an existing point within the datamanager (the point is identified by its id)
- Parameters
-
[in] p point object [in] attributeOnly flag if complete point should be replace (i.e. coordinates have changed) or only the attribute object is updated
| def replacePolygon | ( | self, | |
| p, | |||
attributeOnly = False |
|||
| ) |
replace an existing polygon within the datamanager (the object is identified by its id)
- Parameters
-
[in] p polygon object [in] attributeOnly flag if complete polygon should be replace (i.e. coordinates have changed) or only the attribute objects is updated
| def replacePolyline | ( | self, | |
| l, | |||
attributeOnly = False |
|||
| ) |
replace an existing polyline within the datamanager (the object is identified by its id)
- Parameters
-
[in] l polyline object [in] attributeOnly flag if complete line should be replace (i.e. coordinates have changed) or only the attribute objects is updated
| def save | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
| def searchPoint | ( | self, | |
| arg1, | |||
| arg2 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: Window) mandatory parameter arg2 (type: bool) mandatory parameter
- Returns
- (type: list)
Referenced by Datamanager.searchPoint().
| def searchPoint | ( | self, | |
| arg1, | |||
| arg2 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: Box) mandatory parameter arg2 (type: bool) mandatory parameter
- Returns
- (type: list)
References Datamanager.searchPoint().
| def searchPoint | ( | self, | |
| arg1 | |||
| ) |
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: Polygon) mandatory parameter
- Returns
- (type: list)
References Datamanager.searchPoint().
| def setCRS | ( | self, | |
| arg1 | |||
| ) |
set the coordinate reference system from a WKT string
- Parameters
-
self (type: Datamanager) self pointer arg1 (type: str) mandatory parameter
| def sizeGeometry | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def sizePoint | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def sizePolygon | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def sizePolygonPoint | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def sizePolyline | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def sizePolylinePoint | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: int)
| def storesOrder | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: bool)
| def threadSafe | ( | self | ) |
- Parameters
-
self (type: Datamanager) self pointer
- Returns
- (type: bool)
