GDAL

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

gnm.h
1 /******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL/OGR Geography Network support (Geographic Network Model)
5 * Purpose: GNM general public declarations.
6 * Authors: Mikhail Gusev (gusevmihs at gmail dot com)
7 * Dmitry Baryshnikov, polimax@mail.ru
8 *
9 ******************************************************************************
10 * Copyright (c) 2014, Mikhail Gusev
11 * Copyright (c) 2014-2015, NextGIS <info@nextgis.com>
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
19 *
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 ****************************************************************************/
31
32 #ifndef GNM
33 #define GNM
34
35 #include "ogrsf_frmts.h"
36 #include "gnmgraph.h"
37
38 // Direction of an edge.
39 typedef int GNMDirection; // We use int values in order to save them to the
40 // network data.
41
42 // Network's metadata parameters names.
43 #define GNM_MD_NAME "net_name"
44 #define GNM_MD_DESCR "net_description"
45 #define GNM_MD_SRS "net_srs"
46 #define GNM_MD_VERSION "net_version"
47 #define GNM_MD_RULE "net_rule"
48 #define GNM_MD_FORMAT "FORMAT"
49 #define GNM_MD_FETCHEDGES "fetch_edge"
50 #define GNM_MD_FETCHVERTEX "fetch_vertex"
51 #define GNM_MD_NUM_PATHS "num_paths"
52 #define GNM_MD_EMITTER "emitter"
53
54 // TODO: Constants for capabilities.
55 //#define GNMCanChangeConnections "CanChangeConnections"
56
57 typedef enum
58 { GATDijkstraShortestPath = 1, GATKShortestPath, GATConnectedComponents
62 } GNMGraphAlgorithmType;
63
70 class CPL_DLL GNMNetwork : public GDALDataset
71 {
72 public:
73 GNMNetwork();
74 virtual ~GNMNetwork();
75
76 // GDALDataset Interface
77 virtual const char *GetProjectionRef(void);
78 virtual char **GetFileList(void);
79
80 // GNMNetwork Interface
81
102 virtual CPLErr Create( const char* pszFilename, char** papszOptions ) = 0;
103
109 virtual CPLErr Open( GDALOpenInfo* poOpenInfo ) = 0;
110
115 virtual CPLErr Delete() = 0;
116
123 virtual const char* GetName() const;
124
129 virtual int GetVersion() const { return 0;}
130
135 virtual CPLErr DisconnectAll () = 0;
136
144 virtual OGRFeature *GetFeatureByGlobalFID (GNMGFID nGFID) = 0;
145
156 virtual OGRLayer *GetPath (GNMGFID nStartFID, GNMGFID nEndFID,
157 GNMGraphAlgorithmType eAlgorithm, char** papszOptions) = 0;
158 protected:
165 virtual int CheckNetworkExist( const char* pszFilename,
166 char** papszOptions ) = 0;
167
168 protected:
169 CPLString m_soName;
170 CPLString m_soSRS;
171 };
172
173 class GNMRule;
174 class OGRGNMWrappedResultLayer;
175
182 class CPL_DLL GNMGenericNetwork: public GNMNetwork
183 {
184 public:
185 GNMGenericNetwork();
186 virtual ~GNMGenericNetwork();
187
188 // GDALDataset Interface
189
190 virtual int GetLayerCount();
191 virtual OGRLayer *GetLayer(int);
192 virtual OGRErr DeleteLayer(int);
193
194 virtual int TestCapability( const char * );
195
196 virtual OGRLayer *CopyLayer( OGRLayer *poSrcLayer,
197 const char *pszNewName,
198 char **papszOptions = NULL );
199
200 virtual int CloseDependentDatasets();
201 virtual void FlushCache(void);
202
203 // GNMNetwork Interface
204
205 virtual CPLErr Create( const char* pszFilename, char** papszOptions ) = 0;
206 virtual CPLErr Delete();
207
208 virtual int GetVersion() const;
213 virtual GNMGFID GetNewGlobalFID();
214
221 virtual CPLString GetAlgorithmName(GNMDirection eAlgorithm, bool bShortName);
222
230 virtual CPLErr AddFeatureGlobalFID(GNMGFID nFID, const char* pszLayerName);
231
245 virtual CPLErr ConnectFeatures (GNMGFID nSrcFID,
246 GNMGFID nTgtFID,
247 GNMGFID nConFID = -1,
248 double dfCost = 1,
249 double dfInvCost = 1,
250 GNMDirection eDir = GNM_EDGE_DIR_BOTH);
251
259 virtual CPLErr DisconnectFeatures (GNMGFID nSrcFID,
260 GNMGFID nTgtFID,
261 GNMGFID nConFID);
262
269 virtual CPLErr DisconnectFeaturesWithId(GNMGFID nFID);
270
283 virtual CPLErr ReconnectFeatures (GNMGFID nSrcFID,
284 GNMGFID nTgtFID,
285 GNMGFID nConFID,
286 double dfCost = 1,
287 double dfInvCost = 1,
288 GNMDirection eDir = GNM_EDGE_DIR_BOTH);
289
290 virtual CPLErr DisconnectAll();
291
292 virtual OGRFeature *GetFeatureByGlobalFID(GNMGFID nFID);
293
328 virtual CPLErr CreateRule (const char *pszRuleStr);
329
334 virtual CPLErr DeleteAllRules();
335
341 virtual CPLErr DeleteRule(const char *pszRuleStr);
342
347 virtual char** GetRules() const;
348
370 virtual CPLErr ConnectPointsByLines (char **papszLayerList,
371 double dfTolerance,
372 double dfCost,
373 double dfInvCost,
374 GNMDirection eDir);
375
382 virtual CPLErr ChangeBlockState (GNMGFID nFID, bool bIsBlock);
383
392 virtual CPLErr ChangeAllBlockState (bool bIsBlock = false);
393
394 virtual OGRLayer *GetPath (GNMGFID nStartFID, GNMGFID nEndFID,
395 GNMGraphAlgorithmType eAlgorithm, char** papszOptions);
396 protected:
403 virtual CPLErr CheckLayerDriver(const char* pszDefaultDriverName,
404 char** papszOptions);
410 virtual bool CheckStorageDriverSupport(const char* pszDriverName) = 0;
411 protected:
412 virtual CPLErr CreateMetadataLayer( GDALDataset* const pDS, int nVersion,
413 size_t nFieldSize = 1024 );
414 virtual CPLErr StoreNetworkSrs();
415 virtual CPLErr LoadNetworkSrs();
416 virtual CPLErr CreateGraphLayer( GDALDataset* const pDS );
417 virtual CPLErr CreateFeaturesLayer( GDALDataset* const pDS );
418 virtual CPLErr LoadMetadataLayer( GDALDataset* const pDS );
419 virtual CPLErr LoadGraphLayer( GDALDataset* const pDS );
420 virtual CPLErr LoadGraph();
421 virtual CPLErr LoadFeaturesLayer( GDALDataset* const pDS );
422 virtual CPLErr DeleteMetadataLayer() = 0;
423 virtual CPLErr DeleteGraphLayer() = 0;
424 virtual CPLErr DeleteFeaturesLayer() = 0;
425 virtual CPLErr LoadNetworkLayer(const char* pszLayername) = 0;
426 virtual CPLErr DeleteNetworkLayers() = 0;
427 virtual void ConnectPointsByMultiline(GIntBig nFID,
428 const OGRMultiLineString *poMultiLineString,
429 const std::vector<OGRLayer *> &paPointLayers,
430 double dfTolerance, double dfCost,
431 double dfInvCost, GNMDirection eDir);
432 virtual void ConnectPointsByLine(GIntBig nFID,
433 const OGRLineString *poLineString,
434 const std::vector<OGRLayer *> &paPointLayers,
435 double dfTolerance, double dfCost,
436 double dfInvCost, GNMDirection eDir);
437 virtual GNMGFID FindNearestPoint(const OGRPoint* poPoint,
438 const std::vector<OGRLayer*>& paPointLayers,
439 double dfTolerance);
440 virtual OGRFeature* FindConnection(GNMGFID nSrcFID, GNMGFID nTgtFID,
441 GNMGFID nConFID);
442 virtual void SaveRules();
443 virtual GNMGFID GetNewVirtualFID();
444 virtual void FillResultLayer(OGRGNMWrappedResultLayer* poResLayer,
445 const GNMPATH &path, int nNoOfPath,
446 bool bReturnVertices, bool bReturnEdges);
447 protected:
448 int m_nVersion;
449 GNMGFID m_nGID;
450 GNMGFID m_nVirtualConnectionGID;
451 OGRLayer* m_poMetadataLayer;
452 OGRLayer* m_poGraphLayer;
453 OGRLayer* m_poFeaturesLayer;
454
455 GDALDriver *m_poLayerDriver;
456
457 std::map<GNMGFID, CPLString> m_moFeatureFIDMap;
458 std::vector<OGRLayer*> m_apoLayers;
459 std::vector<GNMRule> m_asRules;
460 bool m_bIsRulesChanged;
461
462 GNMGraph m_oGraph;
463 bool m_bIsGraphLoaded;
464 };
465
473 class GNMGenericLayer : public OGRLayer
474 {
475 public:
476 GNMGenericLayer(OGRLayer* poLayer, GNMGenericNetwork* poNetwork);
477 virtual ~GNMGenericLayer();
478
479 // OGRLayer Interface
480
481 virtual OGRGeometry *GetSpatialFilter();
482 virtual void SetSpatialFilter( OGRGeometry * );
483 virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
484 double dfMaxX, double dfMaxY );
485
486 virtual void SetSpatialFilter( int iGeomField, OGRGeometry * );
487 virtual void SetSpatialFilterRect( int iGeomField,
488 double dfMinX, double dfMinY,
489 double dfMaxX, double dfMaxY );
490
491 virtual OGRErr SetAttributeFilter( const char * );
492
493 virtual void ResetReading();
494 virtual OGRFeature *GetNextFeature();
495 virtual OGRErr SetNextByIndex( GIntBig nIndex );
496
497 virtual OGRErr DeleteFeature( GIntBig nFID );
498
499 virtual const char *GetName();
500 virtual OGRwkbGeometryType GetGeomType();
501 virtual OGRFeatureDefn *GetLayerDefn();
502 virtual int FindFieldIndex( const char *pszFieldName, int bExactMatch );
503
504 virtual OGRSpatialReference *GetSpatialRef();
505
506 virtual GIntBig GetFeatureCount( int bForce = TRUE );
507 virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
508 virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent,
509 int bForce = TRUE);
510
511 virtual int TestCapability( const char * );
512
513 virtual OGRErr CreateField( OGRFieldDefn *poField,
514 int bApproxOK = TRUE );
515 virtual OGRErr DeleteField( int iField );
516 virtual OGRErr ReorderFields( int* panMap );
517 virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn,
518 int nFlagsIn );
519
520 virtual OGRErr CreateGeomField( OGRGeomFieldDefn *poField,
521 int bApproxOK = TRUE );
522
523 virtual OGRErr SyncToDisk();
524
525 virtual OGRStyleTable *GetStyleTable();
526 virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
527
528 virtual void SetStyleTable(OGRStyleTable *poStyleTable);
529
530 virtual OGRErr StartTransaction();
531 virtual OGRErr CommitTransaction();
532 virtual OGRErr RollbackTransaction();
533
534 virtual const char *GetFIDColumn();
535 virtual const char *GetGeometryColumn();
536
537 virtual OGRErr SetIgnoredFields( const char **papszFields );
538
539 OGRErr Intersection( OGRLayer *pLayerMethod,
540 OGRLayer *pLayerResult,
541 char** papszOptions = NULL,
542 GDALProgressFunc pfnProgress = NULL,
543 void * pProgressArg = NULL );
544 OGRErr Union( OGRLayer *pLayerMethod,
545 OGRLayer *pLayerResult,
546 char** papszOptions = NULL,
547 GDALProgressFunc pfnProgress = NULL,
548 void * pProgressArg = NULL );
549 OGRErr SymDifference( OGRLayer *pLayerMethod,
550 OGRLayer *pLayerResult,
551 char** papszOptions,
552 GDALProgressFunc pfnProgress,
553 void * pProgressArg );
554 OGRErr Identity( OGRLayer *pLayerMethod,
555 OGRLayer *pLayerResult,
556 char** papszOptions = NULL,
557 GDALProgressFunc pfnProgress = NULL,
558 void * pProgressArg = NULL );
559 OGRErr Update( OGRLayer *pLayerMethod,
560 OGRLayer *pLayerResult,
561 char** papszOptions = NULL,
562 GDALProgressFunc pfnProgress = NULL,
563 void * pProgressArg = NULL );
564 OGRErr Clip( OGRLayer *pLayerMethod,
565 OGRLayer *pLayerResult,
566 char** papszOptions = NULL,
567 GDALProgressFunc pfnProgress = NULL,
568 void * pProgressArg = NULL );
569 OGRErr Erase( OGRLayer *pLayerMethod,
570 OGRLayer *pLayerResult,
571 char** papszOptions = NULL,
572 GDALProgressFunc pfnProgress = NULL,
573 void * pProgressArg = NULL );
574
575 GIntBig GetFeaturesRead();
576
577 int AttributeFilterEvaluationNeedsGeometry();
578
579 /* consider these private */
580 OGRErr InitializeIndexSupport( const char * );
581 OGRLayerAttrIndex *GetIndex();
582
583 protected:
584 virtual OGRErr ISetFeature( OGRFeature *poFeature );
585 virtual OGRErr ICreateFeature( OGRFeature *poFeature );
586
587 protected:
588 CPLString m_soLayerName;
589 OGRLayer *m_poLayer;
590 GNMGenericNetwork* m_poNetwork;
591 std::map<GNMGFID, GIntBig> m_mnFIDMap;
592 };
593
594 typedef enum
595 { GRTConnection = 0
597 } GNMRuleType;
598
608 class CPL_DLL GNMRule
609 {
610 public:
611 GNMRule();
612 GNMRule(const std::string &oRule );
613 GNMRule(const char* pszRule);
614 GNMRule(const GNMRule &oRule);
615 virtual ~GNMRule();
620 virtual bool IsValid() const;
625 virtual bool IsAcceptAny() const;
631 virtual GNMRuleType GetType() const;
640 virtual bool CanConnect(const CPLString &soSrcLayerName,
641 const CPLString &soTgtLayerName,
642 const CPLString &soConnLayerName = "");
643 virtual CPLString GetSourceLayerName() const;
644 virtual CPLString GetTargetLayerName() const;
645 virtual CPLString GetConnectorLayerName() const;
646 const char* c_str() const;
647 operator const char* (void) const;
648 protected:
649 virtual bool ParseRuleString();
650 protected:
651 CPLString m_soSrcLayerName;
652 CPLString m_soTgtLayerName;
653 CPLString m_soConnLayerName;
654 bool m_bAllow;
655 bool m_bValid;
656 bool m_bAny;
657 CPLString m_soRuleString;
658 };
659
666 class OGRGNMWrappedResultLayer : public OGRLayer
667 {
668 public:
669 OGRGNMWrappedResultLayer(GDALDataset* poDS, OGRLayer* poLayer);
670 ~OGRGNMWrappedResultLayer();
671
672 // OGRLayer
673 virtual void ResetReading();
674 virtual OGRFeature *GetNextFeature();
675 virtual OGRErr SetNextByIndex( GIntBig nIndex );
676 virtual OGRFeature *GetFeature( GIntBig nFID );
677 virtual OGRFeatureDefn *GetLayerDefn();
678 virtual GIntBig GetFeatureCount( int bForce = TRUE );
679 virtual int TestCapability( const char * pszCap );
680 virtual OGRErr CreateField( OGRFieldDefn *poField, int bApproxOK = TRUE );
681 virtual OGRErr CreateGeomField( OGRGeomFieldDefn *poField,
682 int bApproxOK = TRUE );
683 virtual const char *GetFIDColumn();
684 virtual const char *GetGeometryColumn();
685 virtual OGRSpatialReference *GetSpatialRef();
686
687 // OGRGNMWrappedResultLayer
688 virtual OGRErr InsertFeature(OGRFeature* poFeature,
689 const CPLString &soLayerName, int nPathNo,
690 bool bIsEdge);
691 protected:
692 virtual OGRErr ISetFeature( OGRFeature *poFeature );
693 virtual OGRErr ICreateFeature( OGRFeature *poFeature );
694 protected:
695 GDALDataset *poDS;
696 OGRLayer *poLayer;
697 };
698
699 #endif // GNM
OGRGNMWrappedResultLayer::CreateField
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE)
Create a new field on a layer.
Definition: gnmresultlayer.cpp:96
OGRGNMWrappedResultLayer::GetNextFeature
virtual OGRFeature * GetNextFeature()
Fetch the next available feature from this layer.
Definition: gnmresultlayer.cpp:66
GNMGenericLayer
GNM layer which represents a geography network layer of generic format.
Definition: gnm.h:473
GNMGenericLayer::SetStyleTable
virtual void SetStyleTable(OGRStyleTable *poStyleTable)
Set layer style table.
Definition: gnmlayer.cpp:342
GNMGenericLayer::GetExtent
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer.
Definition: gnmlayer.cpp:279
GDALDataset::FlushCache
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:374
OGRLineString
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:527
OGRGeomFieldDefn
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:143
OGRGNMWrappedResultLayer::ICreateFeature
virtual OGRErr ICreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: gnmresultlayer.cpp:209
GNMGenericLayer::~GNMGenericLayer
virtual ~GNMGenericLayer()
~GNMGenericLayer
Definition: gnmlayer.cpp:48
GNMGenericLayer::GetSpatialRef
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: gnmlayer.cpp:269
OGRGNMWrappedResultLayer::CreateGeomField
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField, int bApproxOK=TRUE)
Create a new geometry field on a layer.
Definition: gnmresultlayer.cpp:101
GDALDataset::GetProjectionRef
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:803
GNMGenericLayer::FindFieldIndex
virtual int FindFieldIndex(const char *pszFieldName, int bExactMatch)
Find the index of field in the layer.
Definition: gnmlayer.cpp:264
GNMGenericNetwork
GNM class which represents a geography network of generic format.
Definition: gnm.h:182
GNMGenericLayer::ResetReading
virtual void ResetReading()
Reset feature reading to start on the first feature.
Definition: gnmlayer.cpp:208
OGRGNMWrappedResultLayer::GetFeature
virtual OGRFeature * GetFeature(GIntBig nFID)
Fetch a feature by its identifier.
Definition: gnmresultlayer.cpp:76
GNMGenericLayer::GetFeatureCount
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: gnmlayer.cpp:274
GNMNetwork::GetFeatureByGlobalFID
virtual OGRFeature * GetFeatureByGlobalFID(GNMGFID nGFID)=0
GetFeatureByGlobalFID search all network layers for given feature identificator.
GNMGenericLayer::SetIgnoredFields
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: gnmlayer.cpp:63
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:283
OGRFeatureDefn
Definition of a feature class or feature layer.
Definition: ogr_feature.h:206
GNMGenericLayer::DeleteField
virtual OGRErr DeleteField(int iField)
Delete an existing field on a layer.
Definition: gnmlayer.cpp:299
OGRGNMWrappedResultLayer::GetSpatialRef
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: gnmresultlayer.cpp:117
GNMGenericLayer::GetSpatialFilter
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: gnmlayer.cpp:175
GNMNetwork::Delete
virtual CPLErr Delete()=0
Delete network.
GDALDataset::GetLayer
virtual OGRLayer * GetLayer(int)
Fetch a layer by index.
Definition: gdaldataset.cpp:5805
GNMGenericLayer::DeleteFeature
virtual OGRErr DeleteFeature(GIntBig nFID)
Delete feature from layer.
Definition: gnmlayer.cpp:229
GNMGenericLayer::SetNextByIndex
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: gnmlayer.cpp:224
GDALDataset::DeleteLayer
virtual OGRErr DeleteLayer(int)
Delete the indicated layer from the datasource.
Definition: gdaldataset.cpp:4369
OGRFieldDefn
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:62
GDALDataset::CopyLayer
virtual OGRLayer * CopyLayer(OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=NULL)
Duplicate an existing layer.
Definition: gdaldataset.cpp:4014
OGRGNMWrappedResultLayer::ResetReading
virtual void ResetReading()
Reset feature reading to start on the first feature.
Definition: gnmresultlayer.cpp:61
OGRGNMWrappedResultLayer::GetFIDColumn
virtual const char * GetFIDColumn()
This method returns the name of the underlying database column being used as the FID column...
Definition: gnmresultlayer.cpp:107
GNMGenericLayer::GetGeomType
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: gnmlayer.cpp:259
OGRwkbGeometryType
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:333
GNMGenericLayer::GetFIDColumn
virtual const char * GetFIDColumn()
This method returns the name of the underlying database column being used as the FID column...
Definition: gnmlayer.cpp:53
OGRGNMWrappedResultLayer::GetGeometryColumn
virtual const char * GetGeometryColumn()
This method returns the name of the underlying database column being used as the geometry column...
Definition: gnmresultlayer.cpp:112
GNMGenericLayer::SetSpatialFilterRect
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: gnmlayer.cpp:185
OGRMultiLineString
A collection of OGRLineString.
Definition: ogr_geometry.h:1292
GNMGraph
The simple graph class, which holds the appropriate for calculations graph in memory (based on STL co...
Definition: gnmgraph.h:74
OGRGNMWrappedResultLayer::GetFeatureCount
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: gnmresultlayer.cpp:86
OGRGeometry
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
ogrsf_frmts.h
Classes related to registration of format support, and opening datasets.
GNMGenericLayer::CreateGeomField
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField, int bApproxOK=TRUE)
Create a new geometry field on a layer.
Definition: gnmlayer.cpp:322
GNMGenericLayer::ISetFeature
virtual OGRErr ISetFeature(OGRFeature *poFeature)
Rewrite an existing feature.
Definition: gnmlayer.cpp:146
GDALOpenInfo
Definition: gdal_priv.h:238
GNMNetwork
General GNM class which represents a geography network of common format.
Definition: gnm.h:70
OGRGNMWrappedResultLayer::ISetFeature
virtual OGRErr ISetFeature(OGRFeature *poFeature)
Rewrite an existing feature.
Definition: gnmresultlayer.cpp:204
GDALDataset::CloseDependentDatasets
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3280
GNMNetwork::GetVersion
virtual int GetVersion() const
GetVersion return the network version if applicable.
Definition: gnm.h:129
GDALDataset::GetFileList
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:2303
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:129
GNMNetwork::Create
virtual CPLErr Create(const char *pszFilename, char **papszOptions)=0
Create network system layers.
GNMRule
The simple class for rules.
Definition: gnm.h:608
GNMGenericLayer::GetName
virtual const char * GetName()
Return the layer name.
Definition: gnmlayer.cpp:254
GNMGenericLayer::SetStyleTableDirectly
virtual void SetStyleTableDirectly(OGRStyleTable *poStyleTable)
Set layer style table.
Definition: gnmlayer.cpp:337
GNMNetwork::GetPath
virtual OGRLayer * GetPath(GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions)=0
Create path between start and end GFIDs.
OGRPoint
Point class.
Definition: ogr_geometry.h:264
OGRGNMWrappedResultLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()
Fetch the schema information for this layer.
Definition: gnmresultlayer.cpp:81
OGREnvelope
Simple container for a bounding region.
Definition: ogr_core.h:48
GNMGenericLayer::AlterFieldDefn
virtual OGRErr AlterFieldDefn(int iField, OGRFieldDefn *poNewFieldDefn, int nFlagsIn)
Alter the definition of an existing field on a layer.
Definition: gnmlayer.cpp:313
GNMGenericLayer::SetAttributeFilter
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: gnmlayer.cpp:203
OGRLayer
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:66
OGRGNMWrappedResultLayer::TestCapability
virtual int TestCapability(const char *pszCap)
Test if this layer supported the named capability.
Definition: gnmresultlayer.cpp:91
GNMGenericLayer::GNMGenericLayer
GNMGenericLayer(OGRLayer *poLayer, GNMGenericNetwork *poNetwork)
GNMGenericLayer.
Definition: gnmlayer.cpp:37
GNMGenericLayer::TestCapability
virtual int TestCapability(const char *)
Test if this layer supported the named capability.
Definition: gnmlayer.cpp:289
OGRFeature
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:274
OGRStyleTable
This class represents a style table.
Definition: ogr_featurestyle.h:82
GNMNetwork::DisconnectAll
virtual CPLErr DisconnectAll()=0
DisconnectAll method clears the network graph.
GDALDataset
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:296
GDALDataset::GetLayerCount
virtual int GetLayerCount()
Get the number of layers in this dataset.
Definition: gdaldataset.cpp:5780
GNMGenericLayer::ICreateFeature
virtual OGRErr ICreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: gnmlayer.cpp:163
GNMGenericLayer::GetNextFeature
virtual OGRFeature * GetNextFeature()
Fetch the next available feature from this layer.
Definition: gnmlayer.cpp:213
GNMGenericLayer::GetStyleTable
virtual OGRStyleTable * GetStyleTable()
Returns layer style table.
Definition: gnmlayer.cpp:332
OGRGNMWrappedResultLayer::SetNextByIndex
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: gnmresultlayer.cpp:71
OGRLayerAttrIndex
Definition: ogr_attrind.h:66
OGRGNMWrappedResultLayer
The OGRGNMWrappedResultLayer class for search paths queries results.
Definition: gnm.h:666
GNMGenericLayer::SetSpatialFilter
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: gnmlayer.cpp:180
GNMGenericLayer::CreateField
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE)
Create a new field on a layer.
Definition: gnmlayer.cpp:294
GDALDataset::TestCapability
virtual int TestCapability(const char *)
Test if capability is available.
Definition: gdaldataset.cpp:5844
GDALDriver
Format specific driver.
Definition: gdal_priv.h:1034
GNMGenericLayer::SyncToDisk
virtual OGRErr SyncToDisk()
Flush pending changes to disk.
Definition: gnmlayer.cpp:327
GNMGenericLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()
Fetch the schema information for this layer.
Definition: gnmlayer.cpp:362
GNMGenericLayer::ReorderFields
virtual OGRErr ReorderFields(int *panMap)
Reorder all the fields of a layer.
Definition: gnmlayer.cpp:308
GNMGenericLayer::GetGeometryColumn
virtual const char * GetGeometryColumn()
This method returns the name of the underlying database column being used as the geometry column...
Definition: gnmlayer.cpp:58

Generated for GDAL by 1.8.8.