Loading [MathJax]/jax/output/HTML-CSS/config.js
Datamanager Class Reference

Interface to an Datamanager (ODM) object. More...

+ Inheritance diagram for Datamanager:

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)
 

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

◆ __init__()

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]filenameodm filename (incl. extension)
[in]openIfExistsif true the existing ODM is opened, otherwise a new ODM file is created (which overrides a possible exisitng ODM file)
[in]readOnlyif true the ODM is opened in read only mode, which never stores any modification made to the ODM object in memory
[in]threadSafetyif 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

◆ addPoint()

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)

Parameters
[in]ppoint object
[in]cloneAddInfoflag if the addinfo object should be cloned, before adapting file and layer id in addinfo object
[in]fileIdthe 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]layerIdthe 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

◆ addPolygon()

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)

Parameters
[in]ppolygon object
[in]cloneAddInfoflag if the addinfo object should be cloned, before adapting file and layer id in addinfo object
[in]fileIdthe 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]layerIdthe 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

◆ addPolyline()

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)

Parameters
[in]lpolyline object
[in]cloneAddInfoflag if the addinfo object should be cloned, before adapting file and layer id in addinfo object
[in]fileIdthe 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]layerIdthe 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

◆ create()

def create (   filename,
  threadSafety = True 
)
static

Create a new datamanager file (Convenient wrapper for IDatamanager::New)

Parameters
[in]filenameodm filename (incl. extension)
[in]threadSafetyif true a thread safe instance of the ODM is created. Otherwise a standard instance is created which may provide a bit better performance

◆ deletePoint()

def deletePoint (   self,
  arg1 
)
Parameters
self(type: Datamanager) self pointer
arg1(type: object) mandatory parameter

◆ deletePolygon()

def deletePolygon (   self,
  arg1 
)
Parameters
self(type: Datamanager) self pointer
arg1(type: object) mandatory parameter

◆ deletePolyline()

def deletePolyline (   self,
  arg1 
)
Parameters
self(type: Datamanager) self pointer
arg1(type: object) mandatory parameter

◆ existsODM()

def existsODM (   filename)
static

checks if the odm file exists

Parameters
[in]filenamevalid names are <name>.odm, <name>.odm.dat and <name>.odm.idx
Returns
true if odm files exists, otherwise false

◆ geometries()

def geometries (   self,
args,
**  kwargs 
)
static

possible calls:

  • geometries(self)
  • geometries(self, layout: AddInfoLayout, readOnly: object)
  • geometries(self, filter: Filter)
  • geometries(self, filter: Filter, layout: AddInfoLayout, readOnly: object)
Parameters
self(type: object) self pointer
*args(type: list) mandatory parameter
**kwargs(type: dict) mandatory parameter
Returns
(type: GeometryFilterIteratorRangeLayout)

◆ getAddInfoStatistics()

def getAddInfoStatistics (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: AddInfoStatistics)

◆ getCRS()

def getCRS (   self)

get the coordinate reference system as a WKT string

Parameters
self(type: Datamanager) self pointer
Returns
(type: str)

◆ getFilename()

def getFilename (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: str)

◆ getGeometry()

def getGeometry (   self,
  arg1 
)

get geometry object by its id

Parameters
self(type: Datamanager) self pointer
arg1(type: object) mandatory parameter
Returns
(type: object)

◆ getHeaderODM()

def getHeaderODM (   filename)
static

get the full header information of an odm, without actually openning the odm (much faster)

◆ getHistogramSet()

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: object) optional parameter
filter(type: Filter) optional parameter
Returns
(type: HistogramSet)

◆ getLimit()

def getLimit (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: Box)

◆ getLimitODM()

def getLimitODM (   filename)
static

get the limits of an odm, without actually openning the odm (internally uses getHeaderODM)

◆ getPointIndex()

def getPointIndex (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: PointIndex)

◆ getPolylineIndex()

def getPolylineIndex (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: PolylineIndex)

◆ indexDim()

def indexDim (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ isValidODM()

def isValidODM (   filename)
static

checks if the specified file is a valid odm file (requires read access)

Parameters
[in]filenamevalid names are <name>.odm, <name>.odm.dat and <name>.odm.idx
Returns
true if valid odm file. otherwise false

◆ load()

def load (   filename,
  readOnly = False,
  threadSafety = True 
)
static

Load an existing datamanager file (Convenient wrapper for IDatamanager::New)

Parameters
[in]filenameodm filename (incl. extension)
[in]readOnlyif true the ODM is opened in read only mode, which never stores any modification made to the ODM object in memory
[in]threadSafetyif true a thread safe instance of the ODM is created. Otherwise a standard instance is created which may provide a bit better performance

◆ points()

def points (   self,
args,
**  kwargs 
)
static

possible calls:

  • points(self)
  • points(self, layout: AddInfoLayout, readOnly: object)
  • points(self, filter: Filter)
  • points(self, filter: Filter, layout: AddInfoLayout, readOnly: object)
Parameters
self(type: object) self pointer
*args(type: list) mandatory parameter
**kwargs(type: dict) mandatory parameter
Returns
(type: PointFilterIteratorRange)

◆ readOnly()

def readOnly (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: bool)

◆ replacePoint()

def replacePoint (   self,
  p,
  attributeOnly = False 
)

replace an existing point within the datamanager (the point is identified by its id)

Parameters
[in]ppoint object
[in]attributeOnlyflag if complete point should be replace (i.e. coordinates have changed) or only the attribute object is updated

◆ replacePolygon()

def replacePolygon (   self,
  p,
  attributeOnly = False 
)

replace an existing polygon within the datamanager (the object is identified by its id)

Parameters
[in]ppolygon object
[in]attributeOnlyflag if complete polygon should be replace (i.e. coordinates have changed) or only the attribute objects is updated

◆ replacePolyline()

def replacePolyline (   self,
  l,
  attributeOnly = False 
)

replace an existing polyline within the datamanager (the object is identified by its id)

Parameters
[in]lpolyline object
[in]attributeOnlyflag if complete line should be replace (i.e. coordinates have changed) or only the attribute objects is updated

◆ save()

def save (   self)
Parameters
self(type: Datamanager) self pointer

◆ searchPoint()

def searchPoint (   self,
args,
**  kwargs 
)
static

possible calls:

  • searchPoint(self, arg1: Window, arg2: object)
  • searchPoint(self, arg1: Box, arg2: object)
  • searchPoint(self, arg1: Polygon)
Parameters
self(type: object) self pointer
*args(type: list) mandatory parameter
**kwargs(type: dict) mandatory parameter
Returns
(type: list)

◆ setCRS()

def setCRS (   self,
  arg1 
)

set the coordinate reference system from a WKT string

Parameters
self(type: Datamanager) self pointer
arg1(type: str) mandatory parameter

◆ setCRStoODM()

def setCRStoODM (   filename,
  crs 
)
static
Parameters
filename(type: str) mandatory parameter
crs(type: str) mandatory parameter
Returns
(type: bool)

◆ sizeGeometry()

def sizeGeometry (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ sizePoint()

def sizePoint (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ sizePolygon()

def sizePolygon (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ sizePolygonPoint()

def sizePolygonPoint (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ sizePolyline()

def sizePolyline (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ sizePolylinePoint()

def sizePolylinePoint (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: int)

◆ storesOrder()

def storesOrder (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: bool)

◆ threadSafe()

def threadSafe (   self)
Parameters
self(type: Datamanager) self pointer
Returns
(type: bool)