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]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

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]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

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]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

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]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

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

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
def existsODM (   arg1)
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
selfself pointer
layouta view of the corresponding layout will be set onto each geometry
readOnlyflag 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
selfself pointer
filterfilter 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
selfself pointer
filterfilter object for subselection
layouta view of the corresponding layout will be set onto each geometry
readOnlyflag 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)
def getLimitODM (   arg1)
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)
def isValidODM (   arg1)
static
Parameters
arg1(type: str) mandatory parameter
Returns
(type: bool)
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

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
selfself pointer
layouta view of the corresponding layout will be set onto each point
readOnlyflag 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
selfself pointer
filterfilter 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
selfself pointer
filterfilter object for subselection
layouta view of the corresponding layout will be set onto each point
readOnlyflag 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]ppoint object
[in]attributeOnlyflag 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]ppolygon object
[in]attributeOnlyflag 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]lpolyline object
[in]attributeOnlyflag 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)