GDAL
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:
GNMNetwork GDALDataset GDALMajorObject

Public Member Functions

virtual int GetLayerCount () CPL_OVERRIDE
 Get the number of layers in this dataset. More...
 
virtual OGRLayerGetLayer (int) CPL_OVERRIDE
 Fetch a layer by index. More...
 
virtual OGRErr DeleteLayer (int) CPL_OVERRIDE
 Delete the indicated layer from the datasource. More...
 
virtual int TestCapability (const char *) CPL_OVERRIDE
 Test if capability is available. More...
 
virtual OGRLayerCopyLayer (OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=NULL) CPL_OVERRIDE
 Duplicate an existing layer. More...
 
virtual int CloseDependentDatasets () CPL_OVERRIDE
 Drop references to any other datasets referenced by this dataset. More...
 
virtual void FlushCache (void) CPL_OVERRIDE
 Flush all write cached data to disk. More...
 
virtual CPLErr Create (const char *pszFilename, char **papszOptions) CPL_OVERRIDE=0
 Create network system layers. More...
 
virtual CPLErr Delete () CPL_OVERRIDE
 Delete network. More...
 
virtual int GetVersion () const CPL_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 () CPL_OVERRIDE
 DisconnectAll method clears the network graph. More...
 
virtual OGRFeatureGetFeatureByGlobalFID (GNMGFID nFID) CPL_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 OGRLayerGetPath (GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions) CPL_OVERRIDE
 Create path between start and end GFIDs. More...
 
- Public Member Functions inherited from GNMNetwork
virtual const char * GetProjectionRef (void) CPL_OVERRIDE
 Fetch the projection definition string for this dataset. More...
 
virtual char ** GetFileList (void) CPL_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
virtual ~GDALDataset ()
 Destroy an open GDALDataset. More...
 
int GetRasterXSize (void)
 Fetch raster width in pixels. More...
 
int GetRasterYSize (void)
 Fetch raster height in pixels. More...
 
int GetRasterCount (void)
 Fetch the number of raster bands on this dataset. More...
 
GDALRasterBandGetRasterBand (int)
 Fetch a band object for a dataset. 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=NULL)
 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 virtual char ** GetMetadata (const char *pszDomain="") CPL_OVERRIDE
 Fetch metadata. More...
 
virtual CPLErr SetMetadata (char **papszMetadata, const char *pszDomain) CPL_OVERRIDE
 Set metadata. More...
 
virtual const char * GetMetadataItem (const char *pszName, const char *pszDomain) CPL_OVERRIDE
 Fetch single metadata item. More...
 
virtual CPLErr SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain) CPL_OVERRIDE
 Set single metadata item. More...
 
virtual char ** GetMetadataDomainList () CPL_OVERRIDE
 Fetch list of metadata domains. More...
 
virtual OGRLayerGetLayerByName (const char *)
 Fetch a layer by name. 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...
 
virtual OGRLayerCreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)
 This method attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type. 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 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 OGRLayerICreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)
 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...
 

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
bIsBlockBlock 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
nFIDIdentificator
bIsBlockBlock or unblock
Returns
CE_None on success
virtual CPLErr GNMGenericNetwork::CheckLayerDriver ( const char *  pszDefaultDriverName,
char **  papszOptions 
)
protectedvirtual

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)
protectedpure virtual

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

Parameters
pszDriverNameThe driver name
Returns
true if supported, else false
virtual int GNMGenericNetwork::CloseDependentDatasets ( )
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
papszLayerListA list of layers to connect. The list should be freed via CSLDestroy.
dfToleranceSnapping tolerance.
dfCostDirect cost.
dfInvCostInverse cost.
eDirDirection.
Returns
CE_None on success
virtual OGRLayer* GNMGenericNetwork::CopyLayer ( OGRLayer poSrcLayer,
const char *  pszNewName,
char **  papszOptions = NULL 
)
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
poSrcLayersource layer.
pszNewNamethe name of the layer to create.
papszOptionsa 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 
)
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
pszRuleStrRule 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 ( )
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)
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
iLayerthe 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 ( )
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  )
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
eAlgorithmGNM algorithm type
bShortNameIndicator which name to return - short or long
Returns
String with algorithm name
virtual OGRFeature* GNMGenericNetwork::GetFeatureByGlobalFID ( GNMGFID  nGFID)
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().

Implements GNMNetwork.

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

Fetch a layer by index.

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

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
iLayera layer number between 0 and GetLayerCount()-1.
Returns
the layer, or NULL if iLayer is out of range or an error occurs.

Reimplemented from GDALDataset.

virtual int GNMGenericNetwork::GetLayerCount ( )
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 
)
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
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)
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
pszCapthe capability to test.
Returns
TRUE if capability available otherwise FALSE.

Reimplemented from GDALDataset.


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

Generated for GDAL by doxygen 1.8.8.