Package osgeo :: Module gnm
[hide private]
[frames] | no frames]

Source Code for Module osgeo.gnm

  1  # This file was automatically generated by SWIG (http://www.swig.org). 
  2  # Version 3.0.12 
  3  # 
  4  # Do not make changes to this file unless you know what you are doing--modify 
  5  # the SWIG interface file instead. 
  6   
  7  from sys import version_info as _swig_python_version_info 
  8  if _swig_python_version_info >= (2, 7, 0): 
9 - def swig_import_helper():
10 import importlib 11 pkg = __name__.rpartition('.')[0] 12 mname = '.'.join((pkg, '_gnm')).lstrip('.') 13 try: 14 return importlib.import_module(mname) 15 except ImportError: 16 return importlib.import_module('_gnm')
17 _gnm = swig_import_helper() 18 del swig_import_helper 19 elif _swig_python_version_info >= (2, 6, 0):
20 - def swig_import_helper():
21 from os.path import dirname 22 import imp 23 fp = None 24 try: 25 fp, pathname, description = imp.find_module('_gnm', [dirname(__file__)]) 26 except ImportError: 27 import _gnm 28 return _gnm 29 try: 30 _mod = imp.load_module('_gnm', fp, pathname, description) 31 finally: 32 if fp is not None: 33 fp.close() 34 return _mod
35 _gnm = swig_import_helper() 36 del swig_import_helper 37 else: 38 import _gnm 39 del _swig_python_version_info 40 41 try: 42 _swig_property = property 43 except NameError: 44 pass # Python < 2.2 doesn't have 'property'. 45 46 try: 47 import builtins as __builtin__ 48 except ImportError: 49 import __builtin__ 50
51 -def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
52 if (name == "thisown"): 53 return self.this.own(value) 54 if (name == "this"): 55 if type(value).__name__ == 'SwigPyObject': 56 self.__dict__[name] = value 57 return 58 method = class_type.__swig_setmethods__.get(name, None) 59 if method: 60 return method(self, value) 61 if (not static): 62 if _newclass: 63 object.__setattr__(self, name, value) 64 else: 65 self.__dict__[name] = value 66 else: 67 raise AttributeError("You cannot add attributes to %s" % self)
68 69
70 -def _swig_setattr(self, class_type, name, value):
71 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
72 73
74 -def _swig_getattr(self, class_type, name):
75 if (name == "thisown"): 76 return self.this.own() 77 method = class_type.__swig_getmethods__.get(name, None) 78 if method: 79 return method(self) 80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
81 82
83 -def _swig_repr(self):
84 try: 85 strthis = "proxy of " + self.this.__repr__() 86 except __builtin__.Exception: 87 strthis = "" 88 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
89 90 try: 91 _object = object 92 _newclass = 1 93 except __builtin__.Exception:
94 - class _object:
95 pass
96 _newclass = 0 97 98
99 -def GetUseExceptions(*args):
100 """GetUseExceptions() -> int""" 101 return _gnm.GetUseExceptions(*args)
102
103 -def UseExceptions(*args):
104 """UseExceptions()""" 105 return _gnm.UseExceptions(*args)
106
107 -def DontUseExceptions(*args):
108 """DontUseExceptions()""" 109 return _gnm.DontUseExceptions(*args)
110 from . import ogr 111 from . import osr 112 GATDijkstraShortestPath = _gnm.GATDijkstraShortestPath 113 GATKShortestPath = _gnm.GATKShortestPath 114 GATConnectedComponents = _gnm.GATConnectedComponents 115 GNM_EDGE_DIR_BOTH = _gnm.GNM_EDGE_DIR_BOTH 116 GNM_EDGE_DIR_SRCTOTGT = _gnm.GNM_EDGE_DIR_SRCTOTGT 117 GNM_EDGE_DIR_TGTTOSRC = _gnm.GNM_EDGE_DIR_TGTTOSRC 118
119 -def CastToNetwork(*args):
120 """CastToNetwork(MajorObject base) -> Network""" 121 return _gnm.CastToNetwork(*args)
122
123 -def CastToGenericNetwork(*args):
124 """CastToGenericNetwork(MajorObject base) -> GenericNetwork""" 125 return _gnm.CastToGenericNetwork(*args)
126 -class Network(ogr.MajorObject):
127 """Proxy of C++ GNMNetworkShadow class.""" 128 129 __swig_setmethods__ = {} 130 for _s in [ogr.MajorObject]: 131 __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) 132 __setattr__ = lambda self, name, value: _swig_setattr(self, Network, name, value) 133 __swig_getmethods__ = {} 134 for _s in [ogr.MajorObject]: 135 __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) 136 __getattr__ = lambda self, name: _swig_getattr(self, Network, name) 137
138 - def __init__(self, *args, **kwargs):
139 raise AttributeError("No constructor defined")
140 __repr__ = _swig_repr 141 __swig_destroy__ = _gnm.delete_Network 142 __del__ = lambda self: None 143
144 - def ReleaseResultSet(self, *args):
145 """ReleaseResultSet(Network self, Layer layer)""" 146 return _gnm.Network_ReleaseResultSet(self, *args)
147 148
149 - def GetVersion(self, *args):
150 """GetVersion(Network self) -> int""" 151 return _gnm.Network_GetVersion(self, *args)
152 153
154 - def GetName(self, *args):
155 """GetName(Network self) -> char const *""" 156 return _gnm.Network_GetName(self, *args)
157 158
159 - def GetFeatureByGlobalFID(self, *args):
160 """GetFeatureByGlobalFID(Network self, GIntBig GFID) -> Feature""" 161 return _gnm.Network_GetFeatureByGlobalFID(self, *args)
162 163
164 - def GetPath(self, *args, **kwargs):
165 """GetPath(Network self, GIntBig nStartFID, GIntBig nEndFID, GNMGraphAlgorithmType eAlgorithm, char ** options=None) -> Layer""" 166 return _gnm.Network_GetPath(self, *args, **kwargs)
167 168
169 - def DisconnectAll(self, *args):
170 """DisconnectAll(Network self) -> CPLErr""" 171 return _gnm.Network_DisconnectAll(self, *args)
172 173
174 - def GetProjection(self, *args):
175 """GetProjection(Network self) -> char const *""" 176 return _gnm.Network_GetProjection(self, *args)
177 178
179 - def GetProjectionRef(self, *args):
180 """GetProjectionRef(Network self) -> char const *""" 181 return _gnm.Network_GetProjectionRef(self, *args)
182 183
184 - def GetFileList(self, *args):
185 """GetFileList(Network self) -> char **""" 186 return _gnm.Network_GetFileList(self, *args)
187 188
189 - def CreateLayer(self, *args, **kwargs):
190 """CreateLayer(Network self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type, char ** options=None) -> Layer""" 191 return _gnm.Network_CreateLayer(self, *args, **kwargs)
192 193
194 - def CopyLayer(self, *args, **kwargs):
195 """CopyLayer(Network self, Layer src_layer, char const * new_name, char ** options=None) -> Layer""" 196 return _gnm.Network_CopyLayer(self, *args, **kwargs)
197 198
199 - def DeleteLayer(self, *args):
200 """DeleteLayer(Network self, int index) -> OGRErr""" 201 return _gnm.Network_DeleteLayer(self, *args)
202 203
204 - def GetLayerCount(self, *args):
205 """GetLayerCount(Network self) -> int""" 206 return _gnm.Network_GetLayerCount(self, *args)
207 208
209 - def GetLayerByIndex(self, *args):
210 """GetLayerByIndex(Network self, int index=0) -> Layer""" 211 return _gnm.Network_GetLayerByIndex(self, *args)
212 213
214 - def GetLayerByName(self, *args):
215 """GetLayerByName(Network self, char const * layer_name) -> Layer""" 216 return _gnm.Network_GetLayerByName(self, *args)
217 218
219 - def TestCapability(self, *args):
220 """TestCapability(Network self, char const * cap) -> bool""" 221 return _gnm.Network_TestCapability(self, *args)
222 223
224 - def StartTransaction(self, *args, **kwargs):
225 """StartTransaction(Network self, int force=False) -> OGRErr""" 226 return _gnm.Network_StartTransaction(self, *args, **kwargs)
227 228
229 - def CommitTransaction(self, *args):
230 """CommitTransaction(Network self) -> OGRErr""" 231 return _gnm.Network_CommitTransaction(self, *args)
232 233
234 - def RollbackTransaction(self, *args):
235 """RollbackTransaction(Network self) -> OGRErr""" 236 return _gnm.Network_RollbackTransaction(self, *args)
237 238 Network_swigregister = _gnm.Network_swigregister 239 Network_swigregister(Network) 240
241 -class GenericNetwork(Network):
242 """Proxy of C++ GNMGenericNetworkShadow class.""" 243 244 __swig_setmethods__ = {} 245 for _s in [Network]: 246 __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) 247 __setattr__ = lambda self, name, value: _swig_setattr(self, GenericNetwork, name, value) 248 __swig_getmethods__ = {} 249 for _s in [Network]: 250 __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) 251 __getattr__ = lambda self, name: _swig_getattr(self, GenericNetwork, name) 252
253 - def __init__(self, *args, **kwargs):
254 raise AttributeError("No constructor defined")
255 __repr__ = _swig_repr 256 __swig_destroy__ = _gnm.delete_GenericNetwork 257 __del__ = lambda self: None 258
259 - def ConnectFeatures(self, *args):
260 """ConnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr""" 261 return _gnm.GenericNetwork_ConnectFeatures(self, *args)
262 263
264 - def DisconnectFeatures(self, *args):
265 """DisconnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID) -> CPLErr""" 266 return _gnm.GenericNetwork_DisconnectFeatures(self, *args)
267 268
269 - def DisconnectFeaturesWithId(self, *args):
270 """DisconnectFeaturesWithId(GenericNetwork self, GIntBig nFID) -> CPLErr""" 271 return _gnm.GenericNetwork_DisconnectFeaturesWithId(self, *args)
272 273
274 - def ReconnectFeatures(self, *args):
275 """ReconnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr""" 276 return _gnm.GenericNetwork_ReconnectFeatures(self, *args)
277 278
279 - def CreateRule(self, *args):
280 """CreateRule(GenericNetwork self, char const * pszRuleStr) -> CPLErr""" 281 return _gnm.GenericNetwork_CreateRule(self, *args)
282 283
284 - def DeleteAllRules(self, *args):
285 """DeleteAllRules(GenericNetwork self) -> CPLErr""" 286 return _gnm.GenericNetwork_DeleteAllRules(self, *args)
287 288
289 - def DeleteRule(self, *args):
290 """DeleteRule(GenericNetwork self, char const * pszRuleStr) -> CPLErr""" 291 return _gnm.GenericNetwork_DeleteRule(self, *args)
292 293
294 - def GetRules(self, *args):
295 """GetRules(GenericNetwork self) -> char **""" 296 return _gnm.GenericNetwork_GetRules(self, *args)
297 298
299 - def ConnectPointsByLines(self, *args, **kwargs):
300 """ConnectPointsByLines(GenericNetwork self, char ** papszLayerList, double dfTolerance, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr""" 301 return _gnm.GenericNetwork_ConnectPointsByLines(self, *args, **kwargs)
302 303
304 - def ChangeBlockState(self, *args):
305 """ChangeBlockState(GenericNetwork self, GIntBig nFID, bool bIsBlock) -> CPLErr""" 306 return _gnm.GenericNetwork_ChangeBlockState(self, *args)
307 308
309 - def ChangeAllBlockState(self, *args):
310 """ChangeAllBlockState(GenericNetwork self, bool bIsBlock=False) -> CPLErr""" 311 return _gnm.GenericNetwork_ChangeAllBlockState(self, *args)
312 313 GenericNetwork_swigregister = _gnm.GenericNetwork_swigregister 314 GenericNetwork_swigregister(GenericNetwork) 315 316 # This file is compatible with both classic and new-style classes. 317