Interface to an Datamanager (ODM) object. More...
#include "IDatamanager.hpp"
Public Types | |
typedef ConstIterator< IGeometry > | const_iterator_geometry |
Geometry iterator. | |
typedef ConstIterator< IPoint > | const_iterator_point |
Point iterator. | |
typedef ConstIterator< IPolyline > | const_iterator_line |
Polyline iterator. | |
typedef ConstIterator< IFile > | const_iterator_file |
File iterator. | |
typedef InsertIterator< IGeometry > | insert_iterator_geometry |
Geometry insert iterator (used in searchGeometry function) | |
typedef InsertIterator< IPoint > | insert_iterator_point |
Point insert iterator (used in searchPoint functions) | |
typedef InsertIterator< IPolyline > | insert_iterator_line |
Polyline insert iterator (used in searchPolyline functions) | |
Public Member Functions | |
virtual BoxHandle | getLimit () const =0 |
virtual int64_t | sizeGeometry () const =0 |
virtual int64_t | sizePoint () const =0 |
virtual int64_t | sizePolyline () const =0 |
virtual int64_t | sizePolylinePoint () const =0 |
virtual int64_t | sizePolygon () const =0 |
virtual int64_t | sizePolygonPoint () const =0 |
virtual DatamanagerHeaderHandle | getHeader () const =0 |
virtual bool | storesOrder () const =0 |
virtual bool | threadSafe () const =0 |
virtual int | indexDim () const =0 |
virtual bool | readOnly () const =0 |
virtual PointIndexHandle | getPointIndex ()=0 |
virtual PolylineIndexHandle | getPolylineIndex ()=0 |
virtual PolygonHandle | getBoundary (BoundaryOption type, double alphaRadius=0.) const =0 |
virtual bool | getBoundaryFlag (BoundaryOption type) const =0 |
virtual GeometryHandle | getGeometry (int64_t id) const =0 |
access object by its id | |
virtual UnsignedRasterHandle | getDensityOverview (double &xLowerLeftCellCenter, double &yLowerLeftCellCenter, double &cellSize)=0 |
Get a matrix of point counts in native resolution. | |
virtual DoubleRasterHandle | getZMatrixOverview (double &xLowerLeftCellCenter, double &yLowerLeftCellCenter, double &cellSize, const double &nullValue=0)=0 |
virtual void | save ()=0 |
virtual ImportError | doImport (IImport &impObj, DM::ControlObjectHandle control=ControlObjectHandle(), bool preserveFileIdOrder=false)=0 |
import from import object More... | |
virtual ExportError | doExport (IExport &expObj, bool restoreOrder=false, DM::ControlObjectHandle control=ControlObjectHandle())=0 |
virtual ExportError | doExport (IExport &expObj, BoxHandle box, DM::ControlObjectHandle control=ControlObjectHandle())=0 |
virtual ExportError | doExport (IExport &expObj, bool ascending, DM::AddInfoLayoutHandle &layout, DM::ControlObjectHandle control=ControlObjectHandle())=0 |
virtual const_iterator_geometry | beginGeometry (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_geometry | endGeometry (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_point | beginPoint (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_point | endPoint (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_line | beginPolyline (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_line | endPolyline (IteratorOrder order=IteratorOrder::internal) const =0 |
virtual const_iterator_file | beginFile () const =0 |
virtual const_iterator_file | endFile () const =0 |
virtual PointIndexLeafHandle | getPointIndexLeaf (const_iterator_geometry &it)=0 |
virtual void | searchGeometry (const IWindow &win, insert_iterator_geometry &instIt, bool includeRightBoundary=true)=0 |
virtual void | searchGeometry (const IBox &box, insert_iterator_geometry &instIt, bool includeRightBoundary=true)=0 |
virtual void | searchGeometry (const IPolygon &p, insert_iterator_geometry &instIt)=0 |
virtual void | searchPoint (const IWindow &win, insert_iterator_point &instIt, bool includeRightBoundary=true, DM::ControlObjectHandle control=ControlObjectHandle())=0 |
virtual void | searchPoint (const IBox &box, insert_iterator_point &instIt, bool includeRightBoundary=true, DM::ControlObjectHandle control=ControlObjectHandle())=0 |
virtual void | searchPoint (const IPolygon &p, insert_iterator_point &instIt)=0 |
virtual void | searchPolyline (const IWindow &win, insert_iterator_line &instIt, bool includeRightBoundary=true)=0 |
virtual void | searchPolyline (const IBox &box, insert_iterator_line &instIt, bool includeRightBoundary=true)=0 |
virtual void | searchPolyline (const IPolygon &p, insert_iterator_line &instIt)=0 |
virtual int64_t | addPoint (const IPoint &p, bool cloneAddInfo=true, int fileId=-1, int layerId=-1)=0 |
virtual void | replacePoint (const IPoint &p, bool attributeOnly=false)=0 |
virtual void | deletePoint (int64_t id)=0 |
virtual int64_t | addPolyline (const IPolyline &l, bool cloneAddInfo=true, int fileId=-1, int layerId=-1)=0 |
virtual void | replacePolyline (const IPolyline &l, bool attributeOnly=false)=0 |
virtual void | deletePolyline (int64_t id)=0 |
virtual int64_t | addPolygon (const IPolygon &p, bool cloneAddInfo=true, int fileId=-1, int layerId=-1)=0 |
virtual void | replacePolygon (const IPolygon &p, bool attributeOnly=false)=0 |
virtual void | deletePolygon (int64_t id)=0 |
virtual AddInfoStatisticsHandle | getAddInfoStatistics () const =0 |
get the statistics of all addinfo objects | |
virtual const char * | getFilename () const =0 |
get filename of manager; | |
virtual void | outputDiskmanagerStatistics () const =0 |
output statistics parameter how the data are actually stored on disk | |
virtual void | freeMemory () const =0 |
drop all freeable memory object | |
virtual void | interrupt (bool inter=true)=0 |
mark the odm that processing should be interrupted | |
virtual bool | isInterrupted () const =0 |
check if the interrupt flag was set | |
virtual bool | isManagerCorrupt () const =0 |
virtual HistogramSetHandle | getHistogramSet (const IAddInfoLayout &layout, int maxDistinctValues=1000, FilterHandle filter=FilterHandle())=0 |
get histograms of all attributes described by the layout | |
virtual const char * | getCRS () const =0 |
get the coordinate reference system as a WKT string | |
virtual void | setCRS (const char *crs)=0 |
set the coordinate reference system from a WKT string | |
virtual void | prepareLayout (const IAddInfoLayout &layout, bool readOnly) const =0 |
virtual void | prepareLayout (const ICalculator &calc) const =0 |
![]() | |
virtual void | Delete () |
Static Public Member Functions | |
static IDatamanager * | New (const char *filename, bool openIfExists=true, bool readOnly=false, bool threadSafety=true) |
static IDatamanager * | New (const char *filename, const IParameterSet &, bool openIfExists=true, bool readOnly=false, bool threadSafety=true) |
static IDatamanager * | New (void *instance, const char *filename, bool openIfExists=true, bool readOnly=false, bool threadSafety=true) |
Create a new datamanager instance from an existing ODM file or by creating an ODM file. More... | |
static IDatamanager * | New (void *instance, const char *filename, const IParameterSet &, bool openIfExists=true, bool readOnly=false, bool threadSafety=true) |
static IDatamanager * | load (const char *filename, bool readOnly=false, bool threadSafety=true) |
static IDatamanager * | create (const char *filename, bool threadSafety=true) |
static bool | existsODM (const char *filename) |
static bool | isValidODM (const char *filename) |
static bool | isValidODM (const char *filename, TextHandle &errorMsg) |
static DatamanagerHeaderHandle | getHeaderODM (const char *filename) |
get the full header information of an odm, without actually openning the odm (much faster) | |
static BoxHandle | getLimitODM (const char *filename) |
get the limits of an odm, without actually openning the odm (internally uses getHeaderODM) | |
static OverviewHandle | getOverviewODM (const char *filename) |
get the overview object of an odm, without actually openning the odm | |
static PolygonHandle | getBoundaryODM (const char *filename, BoundaryOption type, double alphaRadius=0.) |
get the boundary polygon of an odm, without actually opening the odm. Derives of overview matrix, if not already otherwise calculated. | |
static bool | setCRStoODM (const char *filename, const char *crs) |
set the CRS of an odm (uses opalsImport or ODM license) | |
static void | SetPointInMemoryLimit (unsigned limit) |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
remove a point from from the datamanager by its id
[in] | id | point id |
|
pure virtual |
remove a polygon object from from the datamanager by its id
[in] | id | polygon id |
|
pure virtual |
remove a polyline object from from the datamanager by its id
[in] | id | polyline id |
|
pure virtual |
import from import object
[in] | impObj | import object |
[in] | control | control object for handling progress |
[in] | preserveFileIdOrder | in case of odm import object, this variable allows preserving the order of the file ids of the import odm. if false, the file ids will be assigned by import occurrence. do not use import filter in conjunction with the flag being set to true. |
|
static |
checks if the odm file exists
[in] | filename | valid names are <name>.odm, <name>.odm.dat and <name>.odm.idx |
|
pure virtual |
Get the boundary polygon of the data set
[in] | type | type of boundary output polygon ( |
[in] | alphaRadius | in case of alpha shapes a radius can be specified (if radius is zero, the smalles possible radius is select to result as sinlge part alpha shape) The approximative boundaries are computed on the fly, whereas the exact outlines needed to be computed using opalsBounds |
|
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 |
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 |
|
static |
Create a new datamanager instance from an existing ODM file or by creating an ODM file.
Don't use this function outside OPALS, since it requires a pointer to an OPALS module instance as a first parameter
|
pure virtual |
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 |
|
pure virtual |
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 |
|
pure virtual |
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 |