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