Interface to an Datamanager (ODM) object. More...
Public Member Functions | |
def | __init__ (self, filename, openIfExists=True, readOnly=False, threadSafety=True) |
def | addPoint (self, p, cloneAddInfo=True, fileId=-1, layerId=-1) |
def | addPolygon (self, p, cloneAddInfo=True, fileId=-1, layerId=-1) |
def | addPolyline (self, l, cloneAddInfo=True, fileId=-1, layerId=-1) |
def | deletePoint (self, arg1) |
def | deletePolygon (self, arg1) |
def | deletePolyline (self, arg1) |
def | getAddInfoStatistics (self) |
def | getCRS (self) |
get the coordinate reference system as a WKT string More... | |
def | getFilename (self) |
def | getGeometry (self, arg1) |
get geometry object by its id More... | |
def | getHistogramSet (self, layout, maxDistinctValues=1000, filter=None) |
get histograms of all attributes described by the layout More... | |
def | getLimit (self) |
def | getPointIndex (self) |
def | getPolylineIndex (self) |
def | indexDim (self) |
def | readOnly (self) |
def | replacePoint (self, p, attributeOnly=False) |
def | replacePolygon (self, p, attributeOnly=False) |
def | replacePolyline (self, l, attributeOnly=False) |
def | save (self) |
def | setCRS (self, arg1) |
set the coordinate reference system from a WKT string More... | |
def | sizeGeometry (self) |
def | sizePoint (self) |
def | sizePolygon (self) |
def | sizePolygonPoint (self) |
def | sizePolyline (self) |
def | sizePolylinePoint (self) |
def | storesOrder (self) |
def | threadSafe (self) |
Static Public Member Functions | |
def | create (filename, threadSafety=True) |
def | existsODM (filename) |
def | geometries (self, *args, **kwargs) |
possible calls: More... | |
def | getHeaderODM (filename) |
get the full header information of an odm, without actually openning the odm (much faster) More... | |
def | getLimitODM (filename) |
get the limits of an odm, without actually openning the odm (internally uses getHeaderODM) More... | |
def | isValidODM (filename) |
def | load (filename, readOnly=False, threadSafety=True) |
def | points (self, *args, **kwargs) |
possible calls: More... | |
def | searchPoint (self, *args, **kwargs) |
possible calls: More... | |
def | setCRStoODM (filename, crs) |
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 |
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
[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 |
def addPoint | ( | self, | |
p, | |||
cloneAddInfo = True , |
|||
fileId = -1 , |
|||
layerId = -1 |
|||
) |
adds point to the datamanager (secure that addinfo of the point is NOT linked to another datamanager or set the cloneAddInfo flag)
[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 |
def addPolygon | ( | self, | |
p, | |||
cloneAddInfo = True , |
|||
fileId = -1 , |
|||
layerId = -1 |
|||
) |
adds a polygon to the datamanager (secure that addinfo of the polygon is NOT linked to another datamanager or set the cloneAddInfo flag)
[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 |
def addPolyline | ( | self, | |
l, | |||
cloneAddInfo = True , |
|||
fileId = -1 , |
|||
layerId = -1 |
|||
) |
adds a polyline to the datamanager (secure that addinfo of the polyline is NOT linked to another datamanager or set the cloneAddInfo flag)
[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 |
|
static |
Create a new datamanager file (Convenient wrapper for IDatamanager::New)
[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 | |||
) |
self | (type: Datamanager) self pointer |
arg1 | (type: object) mandatory parameter |
def deletePolygon | ( | self, | |
arg1 | |||
) |
self | (type: Datamanager) self pointer |
arg1 | (type: object) mandatory parameter |
def deletePolyline | ( | self, | |
arg1 | |||
) |
self | (type: Datamanager) self pointer |
arg1 | (type: object) mandatory parameter |
|
static |
checks if the odm file exists
[in] | filename | valid names are <name>.odm, <name>.odm.dat and <name>.odm.idx |
|
static |
possible calls:
self | (type: object) self pointer |
*args | (type: list) mandatory parameter |
**kwargs | (type: dict) mandatory parameter |
def getAddInfoStatistics | ( | self | ) |
self | (type: Datamanager) self pointer |
def getCRS | ( | self | ) |
get the coordinate reference system as a WKT string
self | (type: Datamanager) self pointer |
def getFilename | ( | self | ) |
self | (type: Datamanager) self pointer |
def getGeometry | ( | self, | |
arg1 | |||
) |
get geometry object by its id
self | (type: Datamanager) self pointer |
arg1 | (type: object) mandatory parameter |
|
static |
get the full header information of an odm, without actually openning the odm (much faster)
def getHistogramSet | ( | self, | |
layout, | |||
maxDistinctValues = 1000 , |
|||
filter = None |
|||
) |
get histograms of all attributes described by the layout
self | (type: Datamanager) self pointer |
layout | (type: AddInfoLayout) mandatory parameter |
maxDistinctValues | (type: object) optional parameter |
filter | (type: Filter) optional parameter |
def getLimit | ( | self | ) |
self | (type: Datamanager) self pointer |
|
static |
get the limits of an odm, without actually openning the odm (internally uses getHeaderODM)
def getPointIndex | ( | self | ) |
self | (type: Datamanager) self pointer |
def getPolylineIndex | ( | self | ) |
self | (type: Datamanager) self pointer |
def indexDim | ( | self | ) |
self | (type: Datamanager) self pointer |
|
static |
checks if the specified file is a valid odm file (requires read access)
[in] | filename | valid names are <name>.odm, <name>.odm.dat and <name>.odm.idx |
|
static |
Load an existing datamanager file (Convenient wrapper for IDatamanager::New)
[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 |
|
static |
possible calls:
self | (type: object) self pointer |
*args | (type: list) mandatory parameter |
**kwargs | (type: dict) mandatory parameter |
def readOnly | ( | self | ) |
self | (type: Datamanager) self pointer |
def replacePoint | ( | self, | |
p, | |||
attributeOnly = False |
|||
) |
replace an existing point within the datamanager (the point is identified by its id)
[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)
[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)
[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 | ) |
self | (type: Datamanager) self pointer |
|
static |
possible calls:
self | (type: object) self pointer |
*args | (type: list) mandatory parameter |
**kwargs | (type: dict) mandatory parameter |
def setCRS | ( | self, | |
arg1 | |||
) |
set the coordinate reference system from a WKT string
self | (type: Datamanager) self pointer |
arg1 | (type: str) mandatory parameter |
|
static |
filename | (type: str) mandatory parameter |
crs | (type: str) mandatory parameter |
def sizeGeometry | ( | self | ) |
self | (type: Datamanager) self pointer |
def sizePoint | ( | self | ) |
self | (type: Datamanager) self pointer |
def sizePolygon | ( | self | ) |
self | (type: Datamanager) self pointer |
def sizePolygonPoint | ( | self | ) |
self | (type: Datamanager) self pointer |
def sizePolyline | ( | self | ) |
self | (type: Datamanager) self pointer |
def sizePolylinePoint | ( | self | ) |
self | (type: Datamanager) self pointer |
def storesOrder | ( | self | ) |
self | (type: Datamanager) self pointer |
def threadSafe | ( | self | ) |
self | (type: Datamanager) self pointer |