GDAL
Public Member Functions | Protected Member Functions | List of all members
GNMNetwork Class Referenceabstract

General GNM class which represents a geography network of common format. More...

#include <gnm.h>

Inheritance diagram for GNMNetwork:
GDALDataset GDALMajorObject GNMGenericNetwork

Public Member Functions

virtual const char * GetProjectionRef (void) override
 Fetch the projection definition string for this dataset. More...
 
virtual char ** GetFileList (void) override
 Fetch files forming dataset. More...
 
virtual CPLErr Create (const char *pszFilename, char **papszOptions)=0
 Create network system layers. More...
 
virtual CPLErr Open (GDALOpenInfo *poOpenInfo)=0
 Open a network. More...
 
virtual CPLErr Delete ()=0
 Delete network. More...
 
virtual const char * GetName () const
 GetName - a network name. More...
 
virtual int GetVersion () const
 GetVersion return the network version if applicable. More...
 
virtual CPLErr DisconnectAll ()=0
 DisconnectAll method clears the network graph. More...
 
virtual OGRFeatureGetFeatureByGlobalFID (GNMGFID nGFID)=0
 GetFeatureByGlobalFID search all network layers for given feature identificator. More...
 
virtual OGRLayerGetPath (GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions)=0
 Create path between start and end GFIDs. More...
 
- Public Member Functions inherited from GDALDataset
 ~GDALDataset () override
 Destroy an open GDALDataset. More...
 
int GetRasterXSize ()
 Fetch raster width in pixels. More...
 
int GetRasterYSize ()
 Fetch raster height in pixels. More...
 
int GetRasterCount ()
 Fetch the number of raster bands on this dataset. More...
 
GDALRasterBandGetRasterBand (int)
 Fetch a band object for a dataset. More...
 
Bands GetBands ()
 Function that returns an iterable object over GDALRasterBand in the dataset. More...
 
virtual void FlushCache (void)
 Flush all write cached data to disk. More...
 
virtual CPLErr SetProjection (const char *pszProjection)
 Set the projection reference string for this dataset. More...
 
virtual CPLErr GetGeoTransform (double *padfTransform)
 Fetch the affine transformation coefficients. More...
 
virtual CPLErr SetGeoTransform (double *padfTransform)
 Set the affine transformation coefficients. More...
 
virtual CPLErr AddBand (GDALDataType eType, char **papszOptions=nullptr)
 Add a band to a dataset. More...
 
virtual void * GetInternalHandle (const char *pszHandleName)
 Fetch a format specific internally meaningful handle. More...
 
virtual GDALDriverGetDriver (void)
 Fetch the driver to which this dataset relates. More...
 
virtual const char * GetDriverName ()
 Return driver name. More...
 
virtual int GetGCPCount ()
 Get number of GCPs. More...
 
virtual const char * GetGCPProjection ()
 Get output projection for GCPs. More...
 
virtual const GDAL_GCPGetGCPs ()
 Fetch GCPs. More...
 
virtual CPLErr SetGCPs (int nGCPCount, const GDAL_GCP *pasGCPList, const char *pszGCPProjection)
 Assign GCPs. More...
 
virtual CPLErr AdviseRead (int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, int nBandCount, int *panBandList, char **papszOptions)
 Advise driver of upcoming read requests. More...
 
virtual CPLErr CreateMaskBand (int nFlagsIn)
 Adds a mask band to the dataset. More...
 
virtual GDALAsyncReaderBeginAsyncReader (int nXOff, int nYOff, int nXSize, int nYSize, void *pBuf, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, int nLineSpace, int nBandSpace, char **papszOptions)
 Sets up an asynchronous data request. More...
 
virtual void EndAsyncReader (GDALAsyncReader *)
 End asynchronous request. More...
 
CPLErr RasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, GSpacing, GSpacing, GSpacing, GDALRasterIOExtraArg *psExtraArg) CPL_WARN_UNUSED_RESULT
 Read/write a region of image data from multiple bands. More...
 
int Reference ()
 Add one to dataset reference count. More...
 
int Dereference ()
 Subtract one from dataset reference count. More...
 
int ReleaseRef ()
 Drop a reference to this object, and destroy if no longer referenced. More...
 
GDALAccess GetAccess () const
 Return access mode. More...
 
int GetShared () const
 Returns shared flag. More...
 
void MarkAsShared ()
 Mark this dataset as available for sharing.
 
void MarkSuppressOnClose ()
 Set that the dataset must be deleted on close. More...
 
char ** GetOpenOptions ()
 Return open options. More...
 
CPLErr BuildOverviews (const char *, int, int *, int, int *, GDALProgressFunc, void *)
 Build raster overview(s) More...
 
void ReportError (CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...) CPL_PRINT_FUNC_FORMAT(4
 Emits an error related to a dataset. More...
 
void char ** GetMetadata (const char *pszDomain="") override
 Fetch metadata. More...
 
CPLErr SetMetadata (char **papszMetadata, const char *pszDomain) override
 Set metadata. More...
 
const char * GetMetadataItem (const char *pszName, const char *pszDomain) override
 Fetch single metadata item. More...
 
CPLErr SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain) override
 Set single metadata item. More...
 
char ** GetMetadataDomainList () override
 Fetch list of metadata domains. More...
 
virtual int GetLayerCount ()
 Get the number of layers in this dataset. More...
 
virtual OGRLayerGetLayer (int iLayer)
 Fetch a layer by index. More...
 
Layers GetLayers ()
 Function that returns an iterable object over layers in the dataset. More...
 
virtual OGRLayerGetLayerByName (const char *)
 Fetch a layer by name. More...
 
virtual OGRErr DeleteLayer (int iLayer)
 Delete the indicated layer from the datasource. More...
 
virtual void ResetReading ()
 Reset feature reading to start on the first feature. More...
 
virtual OGRFeatureGetNextFeature (OGRLayer **ppoBelongingLayer, double *pdfProgressPct, GDALProgressFunc pfnProgress, void *pProgressData)
 Fetch the next available feature from this dataset. More...
 
Features GetFeatures ()
 Function that return an iterable object over features in the dataset layer. More...
 
virtual int TestCapability (const char *)
 Test if capability is available. More...
 
virtual OGRLayerCreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=nullptr, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=nullptr)
 This method attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type. More...
 
virtual OGRLayerCopyLayer (OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=nullptr)
 Duplicate an existing layer. More...
 
virtual OGRStyleTableGetStyleTable ()
 Returns dataset style table. More...
 
virtual void SetStyleTableDirectly (OGRStyleTable *poStyleTable)
 Set dataset style table. More...
 
virtual void SetStyleTable (OGRStyleTable *poStyleTable)
 Set dataset style table. More...
 
virtual OGRLayerExecuteSQL (const char *pszStatement, OGRGeometry *poSpatialFilter, const char *pszDialect)
 Execute an SQL statement against the data store. More...
 
virtual void ReleaseResultSet (OGRLayer *poResultsSet)
 Release results of ExecuteSQL(). More...
 
int GetRefCount () const
 Fetch reference count. More...
 
int GetSummaryRefCount () const
 Fetch reference count of datasource and all owned layers. More...
 
OGRErr Release ()
 Drop a reference to this dataset, and if the reference count drops to one close (destroy) the dataset. More...
 
virtual OGRErr StartTransaction (int bForce=FALSE)
 For datasources which support transactions, StartTransaction creates a `transaction. More...
 
virtual OGRErr CommitTransaction ()
 For datasources which support transactions, CommitTransaction commits a transaction. More...
 
virtual OGRErr RollbackTransaction ()
 For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction. More...
 
- Public Member Functions inherited from GDALMajorObject
int GetMOFlags () const
 Returns the GMO_ flags. More...
 
void SetMOFlags (int nFlagsIn)
 Assign GMO_flags. More...
 
virtual const char * GetDescription () const
 Fetch object description. More...
 
virtual void SetDescription (const char *)
 Set object description. More...
 

Protected Member Functions

virtual int CheckNetworkExist (const char *pszFilename, char **papszOptions)=0
 Check if network already exist. More...
 
- Protected Member Functions inherited from GDALDataset
virtual int CloseDependentDatasets ()
 Drop references to any other datasets referenced by this dataset. More...
 
virtual OGRLayerICreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=nullptr, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=nullptr)
 This method attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type. More...
 
- Protected Member Functions inherited from GDALMajorObject
char ** BuildMetadataDomainList (char **papszList, int bCheckNonEmpty,...) CPL_NULL_TERMINATED
 Helper function for custom implementations of GetMetadataDomainList() More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GDALDataset
static GDALDataset ** GetOpenDatasets (int *pnDatasetCount)
 Fetch all open GDAL dataset handles. More...
 
static GDALDatasetH ToHandle (GDALDataset *poDS)
 Convert a GDALDataset* to a GDALDatasetH. More...
 
static GDALDatasetFromHandle (GDALDatasetH hDS)
 Convert a GDALDatasetH to a GDALDataset*. More...
 
static GDALDatasetOpen (const char *pszFilename, unsigned int nOpenFlags=0, const char *const *papszAllowedDrivers=nullptr, const char *const *papszOpenOptions=nullptr, const char *const *papszSiblingFiles=nullptr)
 
- Static Public Member Functions inherited from GDALMajorObject
static GDALMajorObjectH ToHandle (GDALMajorObject *poMajorObject)
 Convert a GDALMajorObject* to a GDALMajorObjectH. More...
 
static GDALMajorObjectFromHandle (GDALMajorObjectH hMajorObject)
 Convert a GDALMajorObjectH to a GDALMajorObject*. More...
 

Detailed Description

General GNM class which represents a geography network of common format.

Since
GDAL 2.1

Member Function Documentation

◆ CheckNetworkExist()

virtual int GNMNetwork::CheckNetworkExist ( const char *  pszFilename,
char **  papszOptions 
)
protectedpure virtual

Check if network already exist.

Parameters
pszFilename- path to network (folder or database
papszOptions- create options
Returns
TRUE if exist and not overwrite or FALSE

◆ Create()

virtual CPLErr GNMNetwork::Create ( const char *  pszFilename,
char **  papszOptions 
)
pure virtual

Create network system layers.

Creates the connectivity (the "network path" of data) over the dataset and returns the resulting network. NOTE: This method does not create any connections among features but creates the necessary set of fields, layers, etc. NOTE: After the successful creation the passed dataset must not be modified outside (but can be read as usual). NOTE: For the common network format the creation is forbidden if the passed dataset already has network system layers and OVERWRITE creation option is FALSE.

Parameters
pszFilename- A path there the network folder (schema, etc.) will be created. The folder (schema, etc.) name get options.
papszOptions- create network options. The create options specific for gnm driver.
Returns
CE_None on success

Implemented in GNMGenericNetwork.

◆ Delete()

virtual CPLErr GNMNetwork::Delete ( )
pure virtual

Delete network.

Delete all dependent layers

Returns
CE_None on success

Implemented in GNMGenericNetwork.

◆ DisconnectAll()

virtual CPLErr GNMNetwork::DisconnectAll ( )
pure virtual

DisconnectAll method clears the network graph.

Returns
CE_None on success

Implemented in GNMGenericNetwork.

◆ GetFeatureByGlobalFID()

virtual OGRFeature* GNMNetwork::GetFeatureByGlobalFID ( GNMGFID  nGFID)
pure virtual

GetFeatureByGlobalFID search all network layers for given feature identificator.

Parameters
nGFIDfeature identificator.
Returns
OGRFeature pointer or NULL. The pointer should be freed via OGRFeature::DestroyFeature().

Implemented in GNMGenericNetwork.

◆ GetFileList()

char ** GNMNetwork::GetFileList ( void  )
overridevirtual

Fetch files forming dataset.

Returns a list of files believed to be part of this dataset. If it returns an empty list of files it means there is believed to be no local file system files associated with the dataset (for instance a virtual dataset). The returned file list is owned by the caller and should be deallocated with CSLDestroy().

The returned filenames will normally be relative or absolute paths depending on the path used to originally open the dataset. The strings will be UTF-8 encoded.

This method is the same as the C GDALGetFileList() function.

Returns
NULL or a NULL terminated array of file names.

Reimplemented from GDALDataset.

◆ GetName()

const char * GNMNetwork::GetName ( ) const
virtual

GetName - a network name.

The value provided to create function in GNM_MD_NAME key. While creation this value used to create the folder or db schema name. But can be changed after creation.

Returns
Network name string

◆ GetPath()

virtual OGRLayer* GNMNetwork::GetPath ( GNMGFID  nStartFID,
GNMGFID  nEndFID,
GNMGraphAlgorithmType  eAlgorithm,
char **  papszOptions 
)
pure virtual

Create path between start and end GFIDs.

Parameters
nStartFID- start identificator
nEndFID- end identificator
eAlgorithm- The algorithm to get path
papszOptions- algorithm specific options
Returns
In memory OGRLayer pointer with features constituting the shortest path (or paths). The caller have to free the pointer via
See also
ReleaseResultSet().

Implemented in GNMGenericNetwork.

◆ GetProjectionRef()

const char * GNMNetwork::GetProjectionRef ( void  )
overridevirtual

Fetch the projection definition string for this dataset.

Same as the C function GDALGetProjectionRef().

The returned string defines the projection coordinate system of the image in OpenGIS WKT format. It should be suitable for use with the OGRSpatialReference class.

When a projection definition is not available an empty (but not NULL) string is returned.

Returns
a pointer to an internal projection reference string. It should not be altered, freed or expected to last for long.
See also
http://www.gdal.org/osr_tutorial.html

Reimplemented from GDALDataset.

◆ GetVersion()

virtual int GNMNetwork::GetVersion ( ) const
inlinevirtual

GetVersion return the network version if applicable.

Returns
version value

Reimplemented in GNMGenericNetwork.

◆ Open()

virtual CPLErr GNMNetwork::Open ( GDALOpenInfo poOpenInfo)
pure virtual

Open a network.

Parameters
poOpenInfoGDALOpenInfo pointer
Returns
CE_None on success

The documentation for this class was generated from the following files:

Generated for GDAL by doxygen 1.8.13.