GDAL
gnm.h
1 /******************************************************************************
2  * $Id: gnm.h 38947 2017-06-07 21:01:56Z rouault $
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) CPL_OVERRIDE;
78  virtual char **GetFileList(void) CPL_OVERRIDE;
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:
170  CPLString m_soName;
171  CPLString m_soSRS;
173 };
174 
175 class GNMRule;
177 
184 class CPL_DLL GNMGenericNetwork: public GNMNetwork
185 {
186 public:
188  virtual ~GNMGenericNetwork();
189 
190  // GDALDataset Interface
191 
192  virtual int GetLayerCount() CPL_OVERRIDE;
193  virtual OGRLayer *GetLayer(int) CPL_OVERRIDE;
194  virtual OGRErr DeleteLayer(int) CPL_OVERRIDE;
195 
196  virtual int TestCapability( const char * ) CPL_OVERRIDE;
197 
198  virtual OGRLayer *CopyLayer( OGRLayer *poSrcLayer,
199  const char *pszNewName,
200  char **papszOptions = NULL ) CPL_OVERRIDE;
201 
202  virtual int CloseDependentDatasets() CPL_OVERRIDE;
203  virtual void FlushCache(void) CPL_OVERRIDE;
204 
205  // GNMNetwork Interface
206 
207  virtual CPLErr Create( const char* pszFilename, char** papszOptions ) CPL_OVERRIDE = 0;
208  virtual CPLErr Delete() CPL_OVERRIDE;
209 
210  virtual int GetVersion() const CPL_OVERRIDE;
215  virtual GNMGFID GetNewGlobalFID();
216 
223  virtual CPLString GetAlgorithmName(GNMDirection eAlgorithm, bool bShortName);
224 
232  virtual CPLErr AddFeatureGlobalFID(GNMGFID nFID, const char* pszLayerName);
233 
247  virtual CPLErr ConnectFeatures (GNMGFID nSrcFID,
248  GNMGFID nTgtFID,
249  GNMGFID nConFID = -1,
250  double dfCost = 1,
251  double dfInvCost = 1,
252  GNMDirection eDir = GNM_EDGE_DIR_BOTH);
253 
261  virtual CPLErr DisconnectFeatures (GNMGFID nSrcFID,
262  GNMGFID nTgtFID,
263  GNMGFID nConFID);
264 
271  virtual CPLErr DisconnectFeaturesWithId(GNMGFID nFID);
272 
285  virtual CPLErr ReconnectFeatures (GNMGFID nSrcFID,
286  GNMGFID nTgtFID,
287  GNMGFID nConFID,
288  double dfCost = 1,
289  double dfInvCost = 1,
290  GNMDirection eDir = GNM_EDGE_DIR_BOTH);
291 
293 
294  virtual OGRFeature *GetFeatureByGlobalFID(GNMGFID nFID) CPL_OVERRIDE;
295 
330  virtual CPLErr CreateRule (const char *pszRuleStr);
331 
336  virtual CPLErr DeleteAllRules();
337 
343  virtual CPLErr DeleteRule(const char *pszRuleStr);
344 
349  virtual char** GetRules() const;
350 
375  virtual CPLErr ConnectPointsByLines (char **papszLayerList,
376  double dfTolerance,
377  double dfCost,
378  double dfInvCost,
379  GNMDirection eDir);
380 
387  virtual CPLErr ChangeBlockState (GNMGFID nFID, bool bIsBlock);
388 
397  virtual CPLErr ChangeAllBlockState (bool bIsBlock = false);
398 
399  virtual OGRLayer *GetPath (GNMGFID nStartFID, GNMGFID nEndFID,
400  GNMGraphAlgorithmType eAlgorithm, char** papszOptions) CPL_OVERRIDE;
401 protected:
408  virtual CPLErr CheckLayerDriver(const char* pszDefaultDriverName,
409  char** papszOptions);
415  virtual bool CheckStorageDriverSupport(const char* pszDriverName) = 0;
416 protected:
418  virtual CPLErr CreateMetadataLayer( GDALDataset* const pDS, int nVersion,
419  size_t nFieldSize = 1024 );
420  virtual CPLErr StoreNetworkSrs();
421  virtual CPLErr LoadNetworkSrs();
422  virtual CPLErr CreateGraphLayer( GDALDataset* const pDS );
423  virtual CPLErr CreateFeaturesLayer( GDALDataset* const pDS );
424  virtual CPLErr LoadMetadataLayer( GDALDataset* const pDS );
425  virtual CPLErr LoadGraphLayer( GDALDataset* const pDS );
426  virtual CPLErr LoadGraph();
427  virtual CPLErr LoadFeaturesLayer( GDALDataset* const pDS );
428  virtual CPLErr DeleteMetadataLayer() = 0;
429  virtual CPLErr DeleteGraphLayer() = 0;
430  virtual CPLErr DeleteFeaturesLayer() = 0;
431  virtual CPLErr LoadNetworkLayer(const char* pszLayername) = 0;
432  virtual CPLErr DeleteNetworkLayers() = 0;
433  virtual void ConnectPointsByMultiline(GIntBig nFID,
434  const OGRMultiLineString *poMultiLineString,
435  const std::vector<OGRLayer *> &paPointLayers,
436  double dfTolerance, double dfCost,
437  double dfInvCost, GNMDirection eDir);
438  virtual void ConnectPointsByLine(GIntBig nFID,
439  const OGRLineString *poLineString,
440  const std::vector<OGRLayer *> &paPointLayers,
441  double dfTolerance, double dfCost,
442  double dfInvCost, GNMDirection eDir);
443  virtual GNMGFID FindNearestPoint(const OGRPoint* poPoint,
444  const std::vector<OGRLayer*>& paPointLayers,
445  double dfTolerance);
446  virtual OGRFeature* FindConnection(GNMGFID nSrcFID, GNMGFID nTgtFID,
447  GNMGFID nConFID);
448  virtual void SaveRules();
449  virtual GNMGFID GetNewVirtualFID();
450  virtual void FillResultLayer(OGRGNMWrappedResultLayer* poResLayer,
451  const GNMPATH &path, int nNoOfPath,
452  bool bReturnVertices, bool bReturnEdges);
454 protected:
456  int m_nVersion;
457  GNMGFID m_nGID;
458  GNMGFID m_nVirtualConnectionGID;
459  OGRLayer* m_poMetadataLayer;
460  OGRLayer* m_poGraphLayer;
461  OGRLayer* m_poFeaturesLayer;
462 
463  GDALDriver *m_poLayerDriver;
464 
465  std::map<GNMGFID, CPLString> m_moFeatureFIDMap;
466  std::vector<OGRLayer*> m_apoLayers;
467  std::vector<GNMRule> m_asRules;
468  bool m_bIsRulesChanged;
469 
470  GNMGraph m_oGraph;
471  bool m_bIsGraphLoaded;
473 };
474 
482 class GNMGenericLayer : public OGRLayer
483 {
484 public:
485  GNMGenericLayer(OGRLayer* poLayer, GNMGenericNetwork* poNetwork);
486  virtual ~GNMGenericLayer();
487 
488  // OGRLayer Interface
489 
491  virtual void SetSpatialFilter( OGRGeometry * ) CPL_OVERRIDE;
492  virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
493  double dfMaxX, double dfMaxY ) CPL_OVERRIDE;
494 
495  virtual void SetSpatialFilter( int iGeomField, OGRGeometry * ) CPL_OVERRIDE;
496  virtual void SetSpatialFilterRect( int iGeomField,
497  double dfMinX, double dfMinY,
498  double dfMaxX, double dfMaxY ) CPL_OVERRIDE;
499 
500  virtual OGRErr SetAttributeFilter( const char * ) CPL_OVERRIDE;
501 
502  virtual void ResetReading() CPL_OVERRIDE;
504  virtual OGRErr SetNextByIndex( GIntBig nIndex ) CPL_OVERRIDE;
505 
506  virtual OGRErr DeleteFeature( GIntBig nFID ) CPL_OVERRIDE;
507 
508  virtual const char *GetName() CPL_OVERRIDE;
511  virtual int FindFieldIndex( const char *pszFieldName, int bExactMatch ) CPL_OVERRIDE;
512 
514 
515  virtual GIntBig GetFeatureCount( int bForce = TRUE ) CPL_OVERRIDE;
516  virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE) CPL_OVERRIDE;
517  virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent,
518  int bForce = TRUE) CPL_OVERRIDE;
519 
520  virtual int TestCapability( const char * ) CPL_OVERRIDE;
521 
522  virtual OGRErr CreateField( OGRFieldDefn *poField,
523  int bApproxOK = TRUE ) CPL_OVERRIDE;
524  virtual OGRErr DeleteField( int iField ) CPL_OVERRIDE;
525  virtual OGRErr ReorderFields( int* panMap ) CPL_OVERRIDE;
526  virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn,
527  int nFlagsIn ) CPL_OVERRIDE;
528 
529  virtual OGRErr CreateGeomField( OGRGeomFieldDefn *poField,
530  int bApproxOK = TRUE ) CPL_OVERRIDE;
531 
532  virtual OGRErr SyncToDisk() CPL_OVERRIDE;
533 
535  virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable ) CPL_OVERRIDE;
536 
537  virtual void SetStyleTable(OGRStyleTable *poStyleTable) CPL_OVERRIDE;
538 
542 
543  virtual const char *GetFIDColumn() CPL_OVERRIDE;
544  virtual const char *GetGeometryColumn() CPL_OVERRIDE;
545 
546  virtual OGRErr SetIgnoredFields( const char **papszFields ) CPL_OVERRIDE;
547 
549  OGRErr Intersection( OGRLayer *pLayerMethod,
550  OGRLayer *pLayerResult,
551  char** papszOptions = NULL,
552  GDALProgressFunc pfnProgress = NULL,
553  void * pProgressArg = NULL );
555  OGRErr Union( OGRLayer *pLayerMethod,
556  OGRLayer *pLayerResult,
557  char** papszOptions = NULL,
558  GDALProgressFunc pfnProgress = NULL,
559  void * pProgressArg = NULL );
561  OGRErr SymDifference( OGRLayer *pLayerMethod,
562  OGRLayer *pLayerResult,
563  char** papszOptions,
564  GDALProgressFunc pfnProgress,
565  void * pProgressArg );
567  OGRErr Identity( OGRLayer *pLayerMethod,
568  OGRLayer *pLayerResult,
569  char** papszOptions = NULL,
570  GDALProgressFunc pfnProgress = NULL,
571  void * pProgressArg = NULL );
573  OGRErr Update( OGRLayer *pLayerMethod,
574  OGRLayer *pLayerResult,
575  char** papszOptions = NULL,
576  GDALProgressFunc pfnProgress = NULL,
577  void * pProgressArg = NULL );
579  OGRErr Clip( OGRLayer *pLayerMethod,
580  OGRLayer *pLayerResult,
581  char** papszOptions = NULL,
582  GDALProgressFunc pfnProgress = NULL,
583  void * pProgressArg = NULL );
585  OGRErr Erase( OGRLayer *pLayerMethod,
586  OGRLayer *pLayerResult,
587  char** papszOptions = NULL,
588  GDALProgressFunc pfnProgress = NULL,
589  void * pProgressArg = NULL );
590 
593 
596 
598  /* consider these private */
599  OGRErr InitializeIndexSupport( const char * );
600  OGRLayerAttrIndex *GetIndex();
602 
603 protected:
605  virtual OGRErr ISetFeature( OGRFeature *poFeature ) CPL_OVERRIDE;
606  virtual OGRErr ICreateFeature( OGRFeature *poFeature ) CPL_OVERRIDE;
607 
608 protected:
609  CPLString m_soLayerName;
610  OGRLayer *m_poLayer;
611  GNMGenericNetwork* m_poNetwork;
612  std::map<GNMGFID, GIntBig> m_mnFIDMap;
614 };
615 
616 typedef enum
617 { GRTConnection = 0
619 } GNMRuleType;
620 
630 // cppcheck-suppress copyCtorAndEqOperator
631 class CPL_DLL GNMRule
632 {
633 public:
635  GNMRule();
637  explicit GNMRule(const std::string &oRule );
639  explicit GNMRule(const char* pszRule);
641  GNMRule(const GNMRule &oRule);
642  virtual ~GNMRule();
647  virtual bool IsValid() const;
652  virtual bool IsAcceptAny() const;
658  virtual GNMRuleType GetType() const;
667  virtual bool CanConnect(const CPLString &soSrcLayerName,
668  const CPLString &soTgtLayerName,
669  const CPLString &soConnLayerName = "");
671  virtual CPLString GetSourceLayerName() const;
673  virtual CPLString GetTargetLayerName() const;
675  virtual CPLString GetConnectorLayerName() const;
677  const char* c_str() const;
679  operator const char* (void) const;
680 protected:
682  virtual bool ParseRuleString();
683 protected:
684  CPLString m_soSrcLayerName;
685  CPLString m_soTgtLayerName;
686  CPLString m_soConnLayerName;
687  bool m_bAllow;
688  bool m_bValid;
689  bool m_bAny;
690  CPLString m_soRuleString;
692 };
693 
701 {
702 public:
705 
706  // OGRLayer
707  virtual void ResetReading() CPL_OVERRIDE;
709  virtual OGRErr SetNextByIndex( GIntBig nIndex ) CPL_OVERRIDE;
710  virtual OGRFeature *GetFeature( GIntBig nFID ) CPL_OVERRIDE;
712  virtual GIntBig GetFeatureCount( int bForce = TRUE ) CPL_OVERRIDE;
713  virtual int TestCapability( const char * pszCap ) CPL_OVERRIDE;
714  virtual OGRErr CreateField( OGRFieldDefn *poField, int bApproxOK = TRUE ) CPL_OVERRIDE;
715  virtual OGRErr CreateGeomField( OGRGeomFieldDefn *poField,
716  int bApproxOK = TRUE ) CPL_OVERRIDE;
717  virtual const char *GetFIDColumn() CPL_OVERRIDE;
718  virtual const char *GetGeometryColumn() CPL_OVERRIDE;
720 
721  // OGRGNMWrappedResultLayer
722  virtual OGRErr InsertFeature(OGRFeature* poFeature,
723  const CPLString &soLayerName, int nPathNo,
724  bool bIsEdge);
725 protected:
726  virtual OGRErr ISetFeature( OGRFeature *poFeature ) CPL_OVERRIDE;
727  virtual OGRErr ICreateFeature( OGRFeature *poFeature ) CPL_OVERRIDE;
728 protected:
730  GDALDataset *poDS;
731  OGRLayer *poLayer;
733 };
734 
735 #endif // GNM
virtual OGRErr ISetFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Rewrite an existing feature.
Definition: ogrlayer.cpp:595
virtual OGRErr DeleteLayer(int iLayer)
Delete the indicated layer from the datasource.
Definition: gdaldataset.cpp:4620
GNM layer which represents a geography network layer of generic format.
Definition: gnm.h:482
virtual OGRLayer * GetLayer(int iLayer)
Fetch a layer by index.
Definition: gdaldataset.cpp:6113
virtual OGRFeatureDefn * GetLayerDefn() CPL_OVERRIDE
Fetch the schema information for this layer.
Definition: gnmlayer.cpp:363
virtual GIntBig GetFeatureCount(int bForce=TRUE) CPL_OVERRIDE
Fetch the feature count in this layer.
Definition: gnmlayer.cpp:275
virtual OGRwkbGeometryType GetGeomType() CPL_OVERRIDE
Return the layer geometry type.
Definition: gnmlayer.cpp:260
virtual OGRErr ICreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:634
virtual void SetSpatialFilter(OGRGeometry *) CPL_OVERRIDE
Set a new spatial filter.
Definition: gnmlayer.cpp:181
virtual int TestCapability(const char *) CPL_OVERRIDE
Test if this layer supported the named capability.
Definition: gnmlayer.cpp:290
virtual OGRFeatureDefn * GetLayerDefn() CPL_OVERRIDE
Fetch the schema information for this layer.
Definition: gnmresultlayer.cpp:83
virtual void FlushCache(void)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:430
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_OVERRIDE
Fetch the extent of this layer.
Definition: gnmlayer.cpp:280
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:631
virtual void SetStyleTableDirectly(OGRStyleTable *poStyleTable) CPL_OVERRIDE
Set layer style table.
Definition: gnmlayer.cpp:338
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:141
#define CPL_OVERRIDE
To be used in public headers only.
Definition: cpl_port.h:1055
virtual OGRErr AlterFieldDefn(int iField, OGRFieldDefn *poNewFieldDefn, int nFlagsIn) CPL_OVERRIDE
Alter the definition of an existing field on a layer.
Definition: gnmlayer.cpp:314
virtual ~GNMGenericLayer()
~GNMGenericLayer
Definition: gnmlayer.cpp:50
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField, int bApproxOK=TRUE) CPL_OVERRIDE
Create a new geometry field on a layer.
Definition: gnmresultlayer.cpp:103
virtual OGRErr RollbackTransaction() CPL_OVERRIDE
For datasources which support transactions, RollbackTransaction will roll back a datasource to its st...
Definition: gnmlayer.cpp:358
virtual OGRErr SetIgnoredFields(const char **papszFields) CPL_OVERRIDE
Set which fields can be omitted when retrieving features from the layer.
Definition: gnmlayer.cpp:62
virtual const char * GetGeometryColumn() CPL_OVERRIDE
This method returns the name of the underlying database column being used as the geometry column...
Definition: gnmlayer.cpp:57
virtual void ResetReading() CPL_OVERRIDE
Reset feature reading to start on the first feature.
Definition: gnmresultlayer.cpp:63
virtual const char * GetProjectionRef(void)
Fetch the projection definition string for this dataset.
Definition: gdaldataset.cpp:857
virtual const char * GetGeometryColumn() CPL_OVERRIDE
This method returns the name of the underlying database column being used as the geometry column...
Definition: gnmresultlayer.cpp:114
GNM class which represents a geography network of generic format.
Definition: gnm.h:184
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE) CPL_OVERRIDE
Create a new field on a layer.
Definition: gnmlayer.cpp:295
virtual OGRErr DeleteFeature(GIntBig nFID) CPL_OVERRIDE
Delete feature from layer.
Definition: gnmlayer.cpp:230
virtual OGRFeature * GetFeatureByGlobalFID(GNMGFID nGFID)=0
GetFeatureByGlobalFID search all network layers for given feature identificator.
Convenient string class based on std::string.
Definition: cpl_string.h:338
Definition of a feature class or feature layer.
Definition: ogr_feature.h:207
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField, int bApproxOK=TRUE) CPL_OVERRIDE
Create a new geometry field on a layer.
Definition: gnmlayer.cpp:323
virtual OGRErr SyncToDisk() CPL_OVERRIDE
Flush pending changes to disk.
Definition: gnmlayer.cpp:328
virtual OGRErr DeleteField(int iField) CPL_OVERRIDE
Delete an existing field on a layer.
Definition: gnmlayer.cpp:300
virtual CPLErr Delete()=0
Delete network.
OGRErr Clip(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Clip.
Definition: gnmlayer.cpp:109
OGRErr Erase(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Erase.
Definition: gnmlayer.cpp:117
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:62
virtual OGRLayer * CopyLayer(OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=NULL)
Duplicate an existing layer.
Definition: gdaldataset.cpp:4256
virtual int FindFieldIndex(const char *pszFieldName, int bExactMatch) CPL_OVERRIDE
Find the index of field in the layer.
Definition: gnmlayer.cpp:265
OGRErr Union(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Union.
Definition: gnmlayer.cpp:77
virtual OGRGeometry * GetSpatialFilter() CPL_OVERRIDE
This method returns the current spatial filter for this layer.
Definition: gnmlayer.cpp:176
virtual OGRErr CommitTransaction() CPL_OVERRIDE
For datasources which support transactions, CommitTransaction commits a transaction.
Definition: gnmlayer.cpp:353
virtual OGRErr ICreateFeature(OGRFeature *poFeature) CPL_OVERRIDE
Create and write a new feature within a layer.
Definition: gnmresultlayer.cpp:212
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:314
OGRErr SymDifference(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
SymDifference.
Definition: gnmlayer.cpp:85
virtual OGRErr ISetFeature(OGRFeature *poFeature) CPL_OVERRIDE
Rewrite an existing feature.
Definition: gnmresultlayer.cpp:207
OGRGNMWrappedResultLayer(GDALDataset *poDS, OGRLayer *poLayer)
Constructor.
Definition: gnmresultlayer.cpp:36
virtual OGRErr SetAttributeFilter(const char *) CPL_OVERRIDE
Set a new attribute query.
Definition: gnmlayer.cpp:204
A collection of OGRLineString.
Definition: ogr_geometry.h:1726
virtual OGRErr ReorderFields(int *panMap) CPL_OVERRIDE
Reorder all the fields of a layer.
Definition: gnmlayer.cpp:309
The simple graph class, which holds the appropriate for calculations graph in memory (based on STL co...
Definition: gnmgraph.h:83
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:118
Classes related to registration of format support, and opening datasets.
OGRErr Update(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Update.
Definition: gnmlayer.cpp:101
GIntBig GetFeaturesRead()
GetFeaturesRead.
Definition: gnmlayer.cpp:125
virtual const char * GetFIDColumn() CPL_OVERRIDE
This method returns the name of the underlying database column being used as the FID column...
Definition: gnmlayer.cpp:52
virtual const char * GetName() CPL_OVERRIDE
Return the layer name.
Definition: gnmlayer.cpp:255
Class for dataset open functions.
Definition: gdal_priv.h:248
General GNM class which represents a geography network of common format.
Definition: gnm.h:70
virtual OGRFeature * GetNextFeature() CPL_OVERRIDE
Fetch the next available feature from this layer.
Definition: gnmlayer.cpp:214
virtual OGRErr StartTransaction() CPL_OVERRIDE
For datasources which support transactions, StartTransaction creates a transaction.
Definition: gnmlayer.cpp:348
virtual int CloseDependentDatasets()
Drop references to any other datasets referenced by this dataset.
Definition: gdaldataset.cpp:3429
virtual GIntBig GetFeatureCount(int bForce=TRUE) CPL_OVERRIDE
Fetch the feature count in this layer.
Definition: gnmresultlayer.cpp:88
virtual void ResetReading() CPL_OVERRIDE
Reset feature reading to start on the first feature.
Definition: gnmlayer.cpp:209
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_OVERRIDE
Fetch a feature by its identifier.
Definition: gnmresultlayer.cpp:78
virtual int GetVersion() const
GetVersion return the network version if applicable.
Definition: gnm.h:129
virtual OGRErr SetNextByIndex(GIntBig nIndex) CPL_OVERRIDE
Move read cursor to the nIndex'th feature in the current resultset.
Definition: gnmresultlayer.cpp:73
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:2374
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:132
virtual CPLErr Create(const char *pszFilename, char **papszOptions)=0
Create network system layers.
The simple class for rules.
Definition: gnm.h:631
virtual OGRLayer * GetPath(GNMGFID nStartFID, GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm, char **papszOptions)=0
Create path between start and end GFIDs.
OGRErr Identity(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Identity.
Definition: gnmlayer.cpp:93
virtual OGRStyleTable * GetStyleTable() CPL_OVERRIDE
Returns layer style table.
Definition: gnmlayer.cpp:333
Point class.
Definition: ogr_geometry.h:326
int AttributeFilterEvaluationNeedsGeometry()
AttributeFilterEvaluationNeedsGeometry.
Definition: gnmlayer.cpp:130
virtual OGRSpatialReference * GetSpatialRef() CPL_OVERRIDE
Fetch the spatial reference system for this layer.
Definition: gnmlayer.cpp:270
virtual OGRSpatialReference * GetSpatialRef() CPL_OVERRIDE
Fetch the spatial reference system for this layer.
Definition: gnmresultlayer.cpp:119
virtual OGRFeature * GetNextFeature() CPL_OVERRIDE
Fetch the next available feature from this layer.
Definition: gnmresultlayer.cpp:68
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE) CPL_OVERRIDE
Create a new field on a layer.
Definition: gnmresultlayer.cpp:98
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:68
OGRErr Intersection(OGRLayer *pLayerMethod, OGRLayer *pLayerResult, char **papszOptions=NULL, GDALProgressFunc pfnProgress=NULL, void *pProgressArg=NULL)
Intersection.
Definition: gnmlayer.cpp:67
GNMGenericLayer(OGRLayer *poLayer, GNMGenericNetwork *poNetwork)
GNMGenericLayer.
Definition: gnmlayer.cpp:38
virtual OGRErr InsertFeature(OGRFeature *poFeature, const CPLString &soLayerName, int nPathNo, bool bIsEdge)
Undocumented.
Definition: gnmresultlayer.cpp:125
virtual void SetStyleTable(OGRStyleTable *poStyleTable) CPL_OVERRIDE
Set layer style table.
Definition: gnmlayer.cpp:343
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:279
This class represents a style table.
Definition: ogr_featurestyle.h:83
virtual CPLErr DisconnectAll()=0
DisconnectAll method clears the network graph.
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:324
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:250
virtual int GetLayerCount()
Get the number of layers in this dataset.
Definition: gdaldataset.cpp:6090
virtual OGRErr SetNextByIndex(GIntBig nIndex) CPL_OVERRIDE
Move read cursor to the nIndex'th feature in the current resultset.
Definition: gnmlayer.cpp:225
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:287
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY) CPL_OVERRIDE
Set a new rectangular spatial filter.
Definition: gnmlayer.cpp:186
The OGRGNMWrappedResultLayer class for search paths queries results.
Definition: gnm.h:700
virtual int TestCapability(const char *pszCap) CPL_OVERRIDE
Test if this layer supported the named capability.
Definition: gnmresultlayer.cpp:93
virtual const char * GetFIDColumn() CPL_OVERRIDE
This method returns the name of the underlying database column being used as the FID column...
Definition: gnmresultlayer.cpp:109
virtual int TestCapability(const char *)
Test if capability is available.
Definition: gdaldataset.cpp:6447
Format specific driver.
Definition: gdal_priv.h:1165
CPLErr
Error category.
Definition: cpl_error.h:52

Generated for GDAL by doxygen 1.8.8.