GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
GNMGenericNetwork Class Referenceabstract

GNM class which represents a geography network of generic format. More...

`#include <gnm.h>`

Inheritance diagram for GNMGenericNetwork:

## Public Member Functions
virtual int | GetLayerCount () override
| Get the number of layers in this dataset. More...
virtual OGRLayer * | GetLayer (int) override
| Fetch a layer by index. More...
virtual OGRErr | DeleteLayer (int) override
| Delete the indicated layer from the datasource. More...
virtual int | TestCapability (const char *) override
| Test if capability is available. More...
virtual OGRLayer * | CopyLayer (OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=nullptr) override
| Duplicate an existing layer. More...
virtual int | CloseDependentDatasets () override
| Drop references to any other datasets referenced by this dataset. More...
virtual void | FlushCache (void) override
| Flush all write cached data to disk. More...
virtual CPLErr | Create (const char *pszFilename, char **papszOptions) override=0
| Create network system layers. More...
virtual CPLErr | Delete () override
| Delete network. More...
virtual int | GetVersion () const override
| GetVersion return the network version if applicable. More...
virtual GNMGFID | GetNewGlobalFID ()
| GetNewGlobalFID increase the global ID counter. More...
virtual CPLString | GetAlgorithmName (GNMDirection eAlgorithm, bool bShortName)
| Get the algorithm name. More...
virtual CPLErr | AddFeatureGlobalFID (GNMGFID nFID, const char *pszLayerName)
| AddFeatureGlobalFID add the FID <-> Layer name link to fast access features by global FID. More...
virtual CPLErr | ConnectFeatures (GNMGFID nSrcFID, GNMGFID nTgtFID, GNMGFID nConFID=-1, double dfCost=1, double dfInvCost=1, GNMDirection eDir=GNM_EDGE_DIR_BOTH)
| Connects two features via third feature (may be virtual, so the identificator should be -1). More...
virtual CPLErr | DisconnectFeatures (GNMGFID nSrcFID, GNMGFID nTgtFID, GNMGFID nConFID)
| Remove features connection. More...
virtual CPLErr | DisconnectFeaturesWithId (GNMGFID nFID)
| Find the corresponding identificator in graph (source, target, connector) and remove such connections. More...
virtual CPLErr | ReconnectFeatures (GNMGFID nSrcFID, GNMGFID nTgtFID, GNMGFID nConFID, double dfCost=1, double dfInvCost=1, GNMDirection eDir=GNM_EDGE_DIR_BOTH)
| Change connection attributes. More...
virtual CPLErr | DisconnectAll () override
| DisconnectAll method clears the network graph. More...
virtual OGRFeature * | GetFeatureByGlobalFID (GNMGFID nFID) override
| GetFeatureByGlobalFID search all network layers for given feature identificator. More...
virtual CPLErr | CreateRule (const char *pszRuleStr)
| Create network rule. More...
virtual CPLErr | DeleteAllRules ()
| Delete all rules from network. More...
virtual CPLErr | DeleteRule (const char *pszRuleStr)
| Delete the specified rule. More...
virtual char ** | GetRules () const
| Get the rule list. More...
virtual CPLErr | ConnectPointsByLines (char **papszLayerList, double dfTolerance, double dfCost, double dfInvCost, GNMDirection eDir)
| Attempts to build the network topology automatically. More...
virtual CPLErr | ChangeBlockState (GNMGFID nFID, bool bIsBlock)
| Change the block state of edge or vertex. More...
virtual CPLErr | ChangeAllBlockState (bool bIsBlock=false)
| Change all vertices and edges block state. More...
virtual OGRLayer * | GetPath (GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions) override
| Create path between start and end GFIDs. More...
Public Member Functions inherited from GNMNetwork
const OGRSpatialReference * | GetSpatialRef () const override
| Fetch the spatial reference for this dataset. More...
virtual char ** | GetFileList (void) override
| Fetch files forming dataset. More...
virtual CPLErr | Open (GDALOpenInfo *poOpenInfo)=0
| Open a network. More...
virtual const char * | GetName () const
| GetName - a network name. 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...
GDALRasterBand * | GetRasterBand (int)
| Fetch a band object for a dataset. More...
Bands | GetBands ()
| Function that returns an iterable object over GDALRasterBand in the dataset. More...
virtual CPLErr | SetSpatialRef (const OGRSpatialReference *poSRS)
| Set the spatial reference system for this dataset. More...
const char * | GetProjectionRef (void) const
| Fetch the projection definition string for this dataset. More...
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 GDALDriver * | GetDriver (void)
| Fetch the driver to which this dataset relates. More...
virtual const char * | GetDriverName ()
| Return driver name. More...
virtual const OGRSpatialReference * | GetGCPSpatialRef () const
| Get output spatial reference system for GCPs. More...
virtual int | GetGCPCount ()
| Get number of GCPs. More...
virtual const GDAL_GCP * | GetGCPs ()
| Fetch GCPs. More...
virtual CPLErr | SetGCPs (int nGCPCount, const GDAL_GCP *pasGCPList, const OGRSpatialReference *poGCP_SRS)
| Assign GCPs. More...
const char * | GetGCPProjection ()
| Get output projection for GCPs. More...
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 GDALAsyncReader * | BeginAsyncReader (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...
Layers | GetLayers ()
| Function that returns an iterable object over layers in the dataset. More...
virtual OGRLayer * | GetLayerByName (const char *)
| Fetch a layer by name. More...
virtual void | ResetReading ()
| Reset feature reading to start on the first feature. More...
virtual OGRFeature * | GetNextFeature (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 OGRLayer * | CreateLayer (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 OGRStyleTable * | GetStyleTable ()
| 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 OGRLayer * | ExecuteSQL (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...
virtual std::shared_ptr< GDALGroup > | GetRootGroup () const
| Return the root GDALGroup of this dataset. 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 CPLErr | CheckLayerDriver (const char *pszDefaultDriverName, char **papszOptions)
| Check or create layer OGR driver. More...
virtual bool | CheckStorageDriverSupport (const char *pszDriverName)=0
| Check if provided OGR driver accepted as storage for network data. More...
Protected Member Functions inherited from GNMNetwork
virtual int | CheckNetworkExist (const char *pszFilename, char **papszOptions)=0
| Check if network already exist. More...
Protected Member Functions inherited from GDALDataset
virtual OGRLayer * | ICreateLayer (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 GDALDataset * | FromHandle (GDALDatasetH hDS)
| Convert a GDALDatasetH to a GDALDataset*. More...
static GDALDataset * | Open (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 GDALMajorObject * | FromHandle (GDALMajorObjectH hMajorObject)
| Convert a GDALMajorObjectH to a GDALMajorObject*. More...

## Detailed Description

GNM class which represents a geography network of generic format.

Since
  GDAL 2.1

## Member Function Documentation

virtual CPLErr GNMGenericNetwork::AddFeatureGlobalFID | ( | GNMGFID | nFID,
|  | const char * | pszLayerName
| ) |  |
| virtual

AddFeatureGlobalFID add the FID <-> Layer name link to fast access features by global FID.

Parameters

  nFID | - global FID
  pszLayerName | - layer name

Returns
  CE_None on success

virtual CPLErr GNMGenericNetwork::ChangeAllBlockState | ( | bool | bIsBlock = `false` | ) |
| virtual

Change all vertices and edges block state.

This is mainly use for unblock all vertices and edges.

Parameters

  bIsBlock | Block or unblock

Returns
  CE_None on success

virtual CPLErr GNMGenericNetwork::ChangeBlockState | ( | GNMGFID | nFID,
|  | bool | bIsBlock
| ) |  |
| virtual

Change the block state of edge or vertex.

Parameters

  nFID | Identificator
  bIsBlock | Block or unblock

Returns
  CE_None on success

virtual CPLErr GNMGenericNetwork::CheckLayerDriver | ( | const char * | pszDefaultDriverName,
|  | char ** | papszOptions
| ) |  |
| protected virtual

Check or create layer OGR driver.

Parameters

  pszDefaultDriverName | - default driver name
  papszOptions | - create options

Returns
  CE_None if driver is exist or CE_Failure

virtual bool GNMGenericNetwork::CheckStorageDriverSupport | ( | const char * | pszDriverName | ) |
| protected pure virtual

Check if provided OGR driver accepted as storage for network data.

Parameters

  pszDriverName | The driver name

Returns
  true if supported, else false

virtual int GNMGenericNetwork::CloseDependentDatasets | ( |  | ) |
| override virtual

Drop references to any other datasets referenced by this dataset.

This method should release any reference to other datasets (e.g. a VRT dataset to its sources), but not close the current dataset itself.

If at least, one reference to a dependent dataset has been dropped, this method should return TRUE. Otherwise it should return FALSE. (Failure to return the proper value might result in infinite loop)

This method can be called several times on a given dataset. After the first time, it should not do anything and return FALSE.

The driver implementation may choose to destroy its raster bands, so be careful not to call any method on the raster bands afterwards.

Basically the only safe action you can do after calling CloseDependentDatasets() is to call the destructor.

Note: the only legitimate caller of CloseDependentDatasets() is GDALDriverManager::~GDALDriverManager()

Returns
  TRUE if at least one reference to another dataset has been dropped.

Reimplemented from GDALDataset.

virtual CPLErr GNMGenericNetwork::ConnectFeatures | ( | GNMGFID | nSrcFID,
|  | GNMGFID | nTgtFID,
|  | GNMGFID | nConFID = `-1`,
|  | double | dfCost = `1`,
|  | double | dfInvCost = `1`,
|  | GNMDirection | eDir = `GNM_EDGE_DIR_BOTH`
| ) |  |
| virtual

Connects two features via third feature (may be virtual, so the identificator should be -1).

The features may be at the same layer or different layers.

Parameters

  nSrcFID | - source feature identificator
  nTgtFID | - target feature identificator
  nConFID | - connection feature identificator (-1 for virtual connection)
  dfCost | - cost moving from source to target (default 1)
  dfInvCost | - cost moving from target to source (default 1)
  eDir | - direction, may be source to target, traget to source or both. (default - both)

Returns
  CE_None on success

virtual CPLErr GNMGenericNetwork::ConnectPointsByLines | ( | char ** | papszLayerList,
|  | double | dfTolerance,
|  | double | dfCost,
|  | double | dfInvCost,
|  | GNMDirection | eDir
| ) |  |
| virtual

Attempts to build the network topology automatically.

The method simply gets point and line or multiline layers from the papszLayerList and searches for each line which connects two points: start and end, so it can be not so effective in performance when it is called on huge networks. Note, when passing your tolerance value: this value will depend of spatial reference system of the network, and especially of its 0,0 position because dfTolerance is just divided by 2 and added/subtracted to/from both sides of each line-feature end point forming thus the square area around it. The first point-feature occurred inside this area will be given as a start/end point for the current connection. So it is also desirable that at least two layers are passed in papszLayerList (one point and one line), and they are already connected "visually" ("geometrically").

Parameters

  papszLayerList | A list of layers to connect. The list should be freed via CSLDestroy.
  dfTolerance | Snapping tolerance.
  dfCost | Direct cost.
  dfInvCost | Inverse cost.
  eDir | Direction.

Returns
  CE_None on success

virtual OGRLayer* GNMGenericNetwork::CopyLayer | ( | OGRLayer * | poSrcLayer,
|  | const char * | pszNewName,
|  | char ** | papszOptions = `nullptr`
| ) |  |
| override virtual

Duplicate an existing layer.

This method creates a new layer, duplicate the field definitions of the source layer and then duplicate each features of the source layer. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation. The source layer may come from another dataset.

This method is the same as the C function GDALDatasetCopyLayer() and the deprecated OGR_DS_CopyLayer().

In GDAL 1.X, this method used to be in the OGRDataSource class.

Parameters

  poSrcLayer | source layer.
  pszNewName | the name of the layer to create.
  papszOptions | a StringList of name=value options. Options are driver specific. There is a common option to set output layer spatial reference: DST_SRSWKT. The option should be in WKT format.

Returns
  an handle to the layer, or NULL if an error occurs.

Reimplemented from GDALDataset.

virtual CPLErr GNMGenericNetwork::Create | ( | const char * | pszFilename,
|  | char ** | papszOptions
| ) |  |
| override 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

Implements GNMNetwork.

virtual CPLErr GNMGenericNetwork::CreateRule | ( | const char * | pszRuleStr | ) |
| virtual

Create network rule.

Creates the rule in the network according to the special syntax. These rules are declarative and make an effect for the network when they exist. Each rule for layer can be created only if the corresponding layer existed and removed when the layer is being deleted.

Rules syntax for the common network format in GNM contains the key words (words in capital letters or signs) and the modifiers which refers to the network objects. All the following combinations are available:

Notation: layer1, layer2, layer3 - a layer names (the corresponding layers must be exist; field1 - a field name (field must be exist); constant1 - any double constant; string1 - any string;

Rules describing which layer can be connected or not connected with each other, and (optional) which layer must serve as a connector. By default all connections are forbidden. But while network creation process the rule to allow any connection added. During the connection process each rule tested if this connection can be created.

"ALLOW CONNECTS ANY" "DENY CONNECTS ANY" "DENY CONNECTS layer1 WITH layer2" "ALLOW CONNECTS layer1 WITH layer2 VIA layer3"

Parameters

  pszRuleStr | Rule string which will parsed. If the parsing was successful, the rule will start having effect immediately.

Returns
  CE_None on success.

virtual CPLErr GNMGenericNetwork::Delete | ( |  | ) |
| override virtual

Delete network.

Delete all dependent layers

Returns
  CE_None on success

Implements GNMNetwork.

virtual CPLErr GNMGenericNetwork::DeleteAllRules | ( |  | ) |
| virtual

Delete all rules from network.

Returns
  CE_None on success.

virtual OGRErr GNMGenericNetwork::DeleteLayer | ( | int | iLayer | ) |
| override virtual

Delete the indicated layer from the datasource.

If this method is supported the ODsCDeleteLayer capability will test TRUE on the GDALDataset.

This method is the same as the C function GDALDatasetDeleteLayer() and the deprecated OGR_DS_DeleteLayer().

In GDAL 1.X, this method used to be in the OGRDataSource class.

Parameters

  iLayer | the index of the layer to delete.

Returns
  OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting layers is not supported for this datasource.

Reimplemented from GDALDataset.

virtual CPLErr GNMGenericNetwork::DeleteRule | ( | const char * | pszRuleStr | ) |
| virtual

Delete the specified rule.

Parameters

  pszRuleStr | - the rule to delete

Returns
  CE_None on success.

virtual CPLErr GNMGenericNetwork::DisconnectAll | ( |  | ) |
| override virtual

DisconnectAll method clears the network graph.

Returns
  CE_None on success

Implements GNMNetwork.

virtual CPLErr GNMGenericNetwork::DisconnectFeatures | ( | GNMGFID | nSrcFID,
|  | GNMGFID | nTgtFID,
|  | GNMGFID | nConFID
| ) |  |
| virtual

Remove features connection.

Parameters

  nSrcFID | - source feature identificator
  nTgtFID | - target feature identificator
  nConFID | - connection feature identificator

Returns
  CE_None on success

virtual CPLErr GNMGenericNetwork::DisconnectFeaturesWithId | ( | GNMGFID | nFID | ) |
| virtual

Find the corresponding identificator in graph (source, target, connector) and remove such connections.

Parameters

  nFID | - identificator to find.

Returns
  CE_None on success

virtual void GNMGenericNetwork::FlushCache | ( | void |  | ) |
| override virtual

Flush all write cached data to disk.

Any raster (or other GDAL) data written via GDAL calls, but buffered internally will be written to disk.

The default implementation of this method just calls the FlushCache() method on each of the raster bands and the SyncToDisk() method on each of the layers. Conceptionally, calling FlushCache() on a dataset should include any work that might be accomplished by calling SyncToDisk() on layers in that dataset.

Using this method does not prevent use from calling GDALClose() to properly close a dataset and ensure that important data not addressed by FlushCache() is written in the file.

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

Reimplemented from GDALDataset.

virtual CPLString GNMGenericNetwork::GetAlgorithmName | ( | GNMDirection | eAlgorithm,
|  | bool | bShortName
| ) |  |
| virtual

Get the algorithm name.

Parameters

  eAlgorithm | GNM algorithm type
  bShortName | Indicator which name to return - short or long

Returns
  String with algorithm name

virtual OGRFeature* GNMGenericNetwork::GetFeatureByGlobalFID | ( | GNMGFID | nGFID | ) |
| override virtual

GetFeatureByGlobalFID search all network layers for given feature identificator.

Parameters

  nGFID | feature identificator.

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

Implements GNMNetwork.

virtual OGRLayer* GNMGenericNetwork::GetLayer | ( | int | iLayer | ) |
| override virtual

Fetch a layer by index.

The returned layer remains owned by the GDALDataset and should not be deleted by the application.

See GetLayers() for a C++ iterator version of this method.

This method is the same as the C function GDALDatasetGetLayer() and the deprecated OGR_DS_GetLayer().

In GDAL 1.X, this method used to be in the OGRDataSource class.

Parameters

  iLayer | a layer number between 0 and GetLayerCount()-1.

Returns
  the layer, or NULL if iLayer is out of range or an error occurs.

See also
  GetLayers()

Reimplemented from GDALDataset.

virtual int GNMGenericNetwork::GetLayerCount | ( |  | ) |
| override virtual

Get the number of layers in this dataset.

This method is the same as the C function GDALDatasetGetLayerCount(), and the deprecated OGR_DS_GetLayerCount().

In GDAL 1.X, this method used to be in the OGRDataSource class.

Returns
  layer count.

Reimplemented from GDALDataset.

virtual GNMGFID GNMGenericNetwork::GetNewGlobalFID | ( |  | ) |
| virtual

GetNewGlobalFID increase the global ID counter.

Returns
  New global feature ID.

virtual OGRLayer* GNMGenericNetwork::GetPath | ( | GNMGFID | nStartFID,
|  | GNMGFID | nEndFID,
|  | GNMGraphAlgorithmType | eAlgorithm,
|  | char ** | papszOptions
| ) |  |
| override 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().

Implements GNMNetwork.

virtual char** GNMGenericNetwork::GetRules | ( |  | ) | const
| virtual

Get the rule list.

Returns
  list of rule strings. The caller have to free the lis via CPLDestroy.

virtual int GNMGenericNetwork::GetVersion | ( |  | ) | const
| override virtual

GetVersion return the network version if applicable.

Returns
  version value

Reimplemented from GNMNetwork.

virtual CPLErr GNMGenericNetwork::ReconnectFeatures | ( | GNMGFID | nSrcFID,
|  | GNMGFID | nTgtFID,
|  | GNMGFID | nConFID,
|  | double | dfCost = `1`,
|  | double | dfInvCost = `1`,
|  | GNMDirection | eDir = `GNM_EDGE_DIR_BOTH`
| ) |  |
| virtual

Change connection attributes.

Search the connection by source feature identificator, target feature identificator and connection identificator.

Parameters

  nSrcFID | - source feature identificator
  nTgtFID | - target feature identificator
  nConFID | - connection feature identificator
  dfCost | - new cost moving from source to target
  dfInvCost | - new cost moving from target to source
  eDir | - new direction

Returns
  CE_None on success

virtual int GNMGenericNetwork::TestCapability | ( | const char * | pszCap | ) |
| override virtual

Test if capability is available.

One of the following dataset capability names can be passed into this method, and a TRUE or FALSE value will be returned indicating whether or not the capability is available for this object.

- ODsCCreateLayer: True if this datasource can create new layers.

- ODsCDeleteLayer: True if this datasource can delete existing layers.

- ODsCCreateGeomFieldAfterCreateLayer: True if the layers of this datasource support CreateGeomField() just after layer creation.

- ODsCCurveGeometries: True if this datasource supports curve geometries.

- ODsCTransactions: True if this datasource supports (efficient) transactions.

- ODsCEmulatedTransactions: True if this datasource supports transactions through emulation.

- ODsCRandomLayerRead: True if this datasource has a dedicated GetNextFeature() implementation, potentially returning features from layers in a non sequential way.

- ODsCRandomLayerWrite: True if this datasource supports calling CreateFeature() on layers in a non sequential way.

The #define macro forms of the capability names should be used in preference to the strings themselves to avoid misspelling.

This method is the same as the C function GDALDatasetTestCapability() and the deprecated OGR_DS_TestCapability().

In GDAL 1.X, this method used to be in the OGRDataSource class.

Parameters

  pszCap | the capability to test.

Returns
  TRUE if capability available otherwise FALSE.

Reimplemented from GDALDataset.

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

- gnm.h