libhydro.core.sitehydro (version 0.4.4, 2017-09-22)
index
/home/seb/PHyC_source/libhydro3/libhydro/core/sitehydro.py

Module sitehydro.
 
Ce module contient les classes:
    # Sitehydro
    # Station
    # Capteur
    # Tronconvigilance

 
Modules
       
libhydro.core._composant
libhydro.core._composant_site

 
Classes
       
builtins.object
PlageUtil
Tronconvigilance
_Entitehydro(builtins.object)
Capteur
_Site_or_station(_Entitehydro)
Sitehydro
Station

 
class Capteur(_Entitehydro)
    Classe Capteur.
 
Classe pour manipuler des capteurs hydrometriques.
 
Proprietes:
    code (string(12)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typemesure (caractere parmi NOMENCLATURE[520]) = H ou Q
    typecapteur (int parmi NOMENCLATURE[519])
    libelle (string)
    plages (PlageUtil ou un iterable
        de PlageUtil ou None) = plages d'utilisation
 
 
Method resolution order:
Capteur
_Entitehydro
builtins.object

Methods defined here:
__init__(self, code, codeh2=None, typemesure='H', libelle=None, typecapteur=0, plages=None, strict=True)
Initialisation.
 
Arguments:
    code (string(12)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typemesure (caractere parmi NOMENCLATURE[520], defaut H) = H ou Q
    typecapteur (int parmi NOMENCLATURE[519])
    libelle (string)
    plages (PlageUtil ou un iterable
        de PlageUtil ou None) = plages d'utilisation
    strict (bool, defaut True) = le mode permissif permet de lever les
        controles de validite du code et du type de mesure
__str__(self)
Return string representation from __unicode__ method.
__unicode__(self)
Return unicode representation.

Data descriptors defined here:
plages
Return plages.
typecapteur
Class Nomenclatureitem.
 
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
 
Should raise only a ValueError when value is not allowed (even with
the None case).
 
Properties:
    nomenclature (int) = the nomenclature ref
    valuetype (type) = a function to cast values to the nomenclature's
        items type
    strict (bool, default True) = wether or not the instance value has
        to be in the nomenclature items
    required (bool, defaut True) = wether or not instance's value can
        be None
    default =  a defautl value returned if the instance's value is not
        in the dictionnary. Should be unused if the property has been
        initialized.
    data (weakref.WeakKeyDictionary)
typemesure
Class Nomenclatureitem.
 
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
 
Should raise only a ValueError when value is not allowed (even with
the None case).
 
Properties:
    nomenclature (int) = the nomenclature ref
    valuetype (type) = a function to cast values to the nomenclature's
        items type
    strict (bool, default True) = wether or not the instance value has
        to be in the nomenclature items
    required (bool, defaut True) = wether or not instance's value can
        be None
    default =  a defautl value returned if the instance's value is not
        in the dictionnary. Should be unused if the property has been
        initialized.
    data (weakref.WeakKeyDictionary)

Data and other attributes defined here:
__all__attrs__ = ('code', 'codeh2', 'typemesure', 'libelle', 'typecapteur', 'plages')

Methods inherited from _Entitehydro:
__eq__(self, other, attrs=None, ignore=None, lazzy=False)
Equal elaborate function.
 
Arguments:
    self, other
    attrs (iterable of strings, default to self.__class__.__all__attrs__ or
        __self.__dict__.keys() = the attrs to compare
    ignore (iterable of strings, default None) = attrs to ignore in the
        comparison
    lazzy (bool, default False) = if True does not test an attribute
        whose counterpart is None
 
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
__hash__(self)
__ne__(self, other, attrs=[], ignore=[], lazzy=False)

Data descriptors inherited from _Entitehydro:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
code
Return code hydro.
codeh2
Return code hydro2.

 
class PlageUtil(builtins.object)
    Classe  PlageUtil.
 
Classe pour manipuler les plages d'activations des capteurs et stations.
 
Proprietes:
    dteb (datetime.datetime) = date de début
    dtfin (datetime.datetime or None) = datefin
    dtactivation (datetime.datetime or None) = date d'activation
    dtdesactivation (datetime.datetime or None) = date de desactivation
    active (bool or None) = True plage activé
 
  Methods defined here:
__eq__(self, other, attrs=None, ignore=None, lazzy=False)
Equal elaborate function.
 
Arguments:
    self, other
    attrs (iterable of strings, default to self.__class__.__all__attrs__ or
        __self.__dict__.keys() = the attrs to compare
    ignore (iterable of strings, default None) = attrs to ignore in the
        comparison
    lazzy (bool, default False) = if True does not test an attribute
        whose counterpart is None
 
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
__hash__(self)
__init__(self, dtdeb=None, dtfin=None, dtactivation=None, dtdesactivation=None, active=True)
Initialisation.
__ne__(self, other, attrs=[], ignore=[], lazzy=False)
__str__(self)
Return string representation from __unicode__ method.
__unicode__(self)
Return unicode representation.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
active
Return active.
dtactivation
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
dtdeb
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
dtdesactivation
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
dtfin
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.

Data and other attributes defined here:
__all__attrs__ = ('dtdeb', 'dtfin', 'dtactivation', 'dtdesactivation', 'active')

 
class Sitehydro(_Site_or_station)
    Classe Sitehydro.
 
Classe pour manipuler des sites hydrometriques.
 
Proprietes:
    code (string(8)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typesite (string parmi NOMENCLATURE[530])
    libelle (string)
    libelleusuel (string)
    coord (Coord) =
        x, y (float)
        proj (int parmi NOMENCLATURE[22]) = systeme de projection
    stations (une liste de Station)
    communes (une liste de codes communes, string(5)) = code INSEE commune
    tronconsvigilance (une liste de Tronconvigilance)
    entitehydro (string(8) = entité hydrographique
    zonehydro (string(4)) = zone hydrographique
    tronconhydro (string(8)) = troncon hydrographique
    precisioncoursdeau (string) = precision du cours d'eau
 
 
Method resolution order:
Sitehydro
_Site_or_station
_Entitehydro
builtins.object

Methods defined here:
__init__(self, code, codeh2=None, typesite='REEL', libelle=None, libelleusuel=None, coord=None, stations=None, communes=None, tronconsvigilance=None, entitehydro=None, zonehydro=None, tronconhydro=None, precisioncoursdeau=None, strict=True)
Initialisation.
 
Arguments:
    code (string(8)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typesite (string parmi NOMENCLATURE[530], defaut REEL)
    libelle (string)
    libelleusuel (string)
    coord (list ou dict) =
        (x, y, proj) ou {'x': x, 'y': y, 'proj': proj}
        avec proj (int parmi NOMENCLATURE[22]) = systeme de projection
    stations (une Station ou un iterable de Station)
    communes (un code commmune ou un iterable de codes)
    tronconsvigilance (un Tronconvigilance ou un iterable)
    entitehydro (string(8) = entité hydrographique
    zonehydro (string(4)) = zone hydrographique
    tronconhydro (string(8)) = troncon hydrographique
    precisioncoursdeau (string) = precision du cours d'eau
    strict (bool, defaut True) = le mode permissif permet de lever les
        controles de validite du type, du code et des stations
__str__(self)
Return string representation from __unicode__ method.
__unicode__(self)
Return unicode representation.

Data descriptors defined here:
communes
Return codes communes.
entitehydro
Return zonehydro.
stations
Return stations.
tronconhydro
Return tronconhydro.
tronconsvigilance
Return tronconsvigilance.
typesite
Class Nomenclatureitem.
 
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
 
Should raise only a ValueError when value is not allowed (even with
the None case).
 
Properties:
    nomenclature (int) = the nomenclature ref
    valuetype (type) = a function to cast values to the nomenclature's
        items type
    strict (bool, default True) = wether or not the instance value has
        to be in the nomenclature items
    required (bool, defaut True) = wether or not instance's value can
        be None
    default =  a defautl value returned if the instance's value is not
        in the dictionnary. Should be unused if the property has been
        initialized.
    data (weakref.WeakKeyDictionary)
zonehydro
Return zonehydro.

Data and other attributes defined here:
__all__attrs__ = ('code', 'codeh2', 'typesite', 'libelle', 'libelleusuel', 'coord', 'stations', 'communes', 'tronconsvigilance', 'entitehydro', 'zonehydro', 'tronconhydro', 'precisioncoursdeau')

Data descriptors inherited from _Site_or_station:
coord
Return coord.

Methods inherited from _Entitehydro:
__eq__(self, other, attrs=None, ignore=None, lazzy=False)
Equal elaborate function.
 
Arguments:
    self, other
    attrs (iterable of strings, default to self.__class__.__all__attrs__ or
        __self.__dict__.keys() = the attrs to compare
    ignore (iterable of strings, default None) = attrs to ignore in the
        comparison
    lazzy (bool, default False) = if True does not test an attribute
        whose counterpart is None
 
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
__hash__(self)
__ne__(self, other, attrs=[], ignore=[], lazzy=False)

Data descriptors inherited from _Entitehydro:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
code
Return code hydro.
codeh2
Return code hydro2.

 
class Station(_Site_or_station)
    Classe Station.
 
Classe pour manipuler des stations hydrometriques.
 
Proprietes:
    code (string(10)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typestation (string parmi NOMENCLATURE[531])
    libelle (string)
    libellecomplement (string)
    descriptif (string)
    niveauaffichage (int) = niveau d'affichage
    coord (Coord) =
        x, y (float)
        proj (int parmi NOMENCLATURE[22]) = systeme de projection
    pointk (float) = point kilomètrique
    dtmiseservice (datetime.datetime) = Date de mise en service
    dtfermeture (datetime.datetime) = Date de fermeture
    surveillance (boolean) = statin à surveiller
    capteurs (une liste de Capteur)
    commune (string(5)) = code INSEE commune
    ddcs (liste de string(10)) = liste de reseaux de mesure SANDRE
        (dispositifs de collecte)
    plages (PlageUtil ou un iterable
        de PlageUtil) = plages d'utilisation
 
 
Method resolution order:
Station
_Site_or_station
_Entitehydro
builtins.object

Methods defined here:
__init__(self, code, codeh2=None, typestation='LIMNI', libelle=None, libellecomplement=None, descriptif=None, dtmaj=None, pointk=None, dtmiseservice=None, dtfermeture=None, surveillance=None, niveauaffichage=0, coord=None, capteurs=None, commune=None, ddcs=None, plages=None, strict=True)
Initialisation.
 
Arguments:
    code (string(10)) = code hydro
    codeh2 (string(8)) = ancien code hydro2
    typestation (string parmi NOMENCLATURE[531], defaut LIMNI)
    libelle (string)
    libellecomplement (string)
    descriptif (string)
    dtmaj (datetime.datetime)
    niveauaffichage (int) = niveau d'affichage
    coord (list ou dict) =
        (x, y, proj) ou {'x': x, 'y': y, 'proj': proj}
        avec proj (int parmi NOMENCLATURE[22]) = systeme de projection
    pointk (float) = point kilomètrique
    dtmiseservice (datetime.datetime) = Date de mise en service
    dtfermeture (datetime.datetime) = Date de fermeture
    surveillance (boolean) = statin à surveiller
    capteurs (un Capteur ou un iterable de Capteur)
    commune (string(5)) = code INSEE commune
    ddcs (un code string(10) ou un iterable de string(10)) = reseaux de
        mesure SANDRE
    plages (PlageUtil ou un iterable
        de PlageUtil) = plages d'utilisation
    strict (bool, defaut True) = le mode permissif permet de lever les
        controles de validite du type et du code
__str__(self)
Return string representation from __unicode__ method.
__unicode__(self)
Return unicode representation.

Data descriptors defined here:
capteurs
Return capteurs.
commune
Return code commune.
ddcs
Return ddcs.
dtfermeture
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
dtmaj
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
dtmiseservice
Class Datefromeverything.
 
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
niveauaffichage
Return niveau d'affichage.
plages
Return plages.
pointk
Return pointk.
surveillance
Return surveillance.
typestation
Class Nomenclatureitem.
 
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
 
Should raise only a ValueError when value is not allowed (even with
the None case).
 
Properties:
    nomenclature (int) = the nomenclature ref
    valuetype (type) = a function to cast values to the nomenclature's
        items type
    strict (bool, default True) = wether or not the instance value has
        to be in the nomenclature items
    required (bool, defaut True) = wether or not instance's value can
        be None
    default =  a defautl value returned if the instance's value is not
        in the dictionnary. Should be unused if the property has been
        initialized.
    data (weakref.WeakKeyDictionary)

Data and other attributes defined here:
__all__attrs__ = ('code', 'codeh2', 'typestation', 'libelle', 'libellecomplement', 'descriptif', 'niveauaffichage', 'coord', 'capteurs', 'commune', 'ddcs', 'plages')

Data descriptors inherited from _Site_or_station:
coord
Return coord.

Methods inherited from _Entitehydro:
__eq__(self, other, attrs=None, ignore=None, lazzy=False)
Equal elaborate function.
 
Arguments:
    self, other
    attrs (iterable of strings, default to self.__class__.__all__attrs__ or
        __self.__dict__.keys() = the attrs to compare
    ignore (iterable of strings, default None) = attrs to ignore in the
        comparison
    lazzy (bool, default False) = if True does not test an attribute
        whose counterpart is None
 
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
__hash__(self)
__ne__(self, other, attrs=[], ignore=[], lazzy=False)

Data descriptors inherited from _Entitehydro:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
code
Return code hydro.
codeh2
Return code hydro2.

 
class Tronconvigilance(builtins.object)
    Classe Tronconvigilance.
 
Classe pour manipuler les troncons de vigilance.
 
Proprietes:
    code (string(8)) = code alphanumerique du troncon
    libelle (string) = libelle du troncon
 
  Methods defined here:
__eq__(self, other, attrs=None, ignore=None, lazzy=False)
Equal elaborate function.
 
Arguments:
    self, other
    attrs (iterable of strings, default to self.__class__.__all__attrs__ or
        __self.__dict__.keys() = the attrs to compare
    ignore (iterable of strings, default None) = attrs to ignore in the
        comparison
    lazzy (bool, default False) = if True does not test an attribute
        whose counterpart is None
 
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
__init__(self, code=None, libelle=None)
Initialisation.
 
Arguments:
    code (string(8)) = code alphanumerique du troncon
    libelle (string) = libelle du troncon
__ne__(self, other, attrs=[], ignore=[], lazzy=False)
__str__(self)
Return string representation from __unicode__ method.
__unicode__(self)
Return unicode representation.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
__all__attrs__ = ('code', 'libelle')
__hash__ = None