GDAL
Public Member Functions | Protected Member Functions
GNMNetwork Class Reference

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

#include <gnm.h>

Inheritance diagram for GNMNetwork:
GDALDataset GDALMajorObject GNMGenericNetwork

List of all members.

Public Member Functions

virtual const char * GetProjectionRef (void) CPL_OVERRIDE
 Fetch the projection definition string for this dataset.
virtual char ** GetFileList (void) CPL_OVERRIDE
 Fetch files forming dataset.
virtual CPLErr Create (const char *pszFilename, char **papszOptions)=0
 Create network system layers.
virtual CPLErr Open (GDALOpenInfo *poOpenInfo)=0
 Open a network.
virtual CPLErr Delete ()=0
 Delete network.
virtual const char * GetName () const
 GetName - a network name.
virtual int GetVersion () const
 GetVersion return the network version if applicable.
virtual CPLErr DisconnectAll ()=0
 DisconnectAll method clears the network graph.
virtual OGRFeatureGetFeatureByGlobalFID (GNMGFID nGFID)=0
 GetFeatureByGlobalFID search all network layers for given feature identificator.
virtual OGRLayerGetPath (GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions)=0
 Create path between start and end GFIDs.

Protected Member Functions

virtual int CheckNetworkExist (const char *pszFilename, char **papszOptions)=0
 Check if network already exist.

Detailed Description

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

Since:
GDAL 2.1

Member Function Documentation

virtual int GNMNetwork::CheckNetworkExist ( const char *  pszFilename,
char **  papszOptions 
) [protected, pure 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
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.

virtual CPLErr GNMNetwork::Delete ( ) [pure virtual]

Delete network.

Delete all dependent layers

Returns:
CE_None on success

Implemented in GNMGenericNetwork.

virtual CPLErr GNMNetwork::DisconnectAll ( ) [pure virtual]

DisconnectAll method clears the network graph.

Returns:
CE_None on success

Implemented in GNMGenericNetwork.

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.

char ** GNMNetwork::GetFileList ( void  ) [virtual]

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.

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

const char * GNMNetwork::GetProjectionRef ( void  ) [virtual]

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.

virtual int GNMNetwork::GetVersion ( ) const [inline, virtual]

GetVersion return the network version if applicable.

Returns:
version value

Reimplemented in GNMGenericNetwork.

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.7.6.1.