Beispiel #1
0
    def __init__(self, s=None, aff=None):
        """Initialize WOF Site Object.

        :param s: ODM2 SamplingFeature Object
        """
        self.SiteID = s.SamplingFeatureID
        self.Latitude = s.Latitude
        self.Longitude = s.Longitude
        self.LatLongDatumID = s.SpatialReferenceID
        self.SiteCode = s.SamplingFeatureCode
        self.SiteName = s.SamplingFeatureName
        self.Elevation_m = s.Elevation_m
        self.Comments = s.SamplingFeatureDescription
        sr = wof_base.BaseSpatialReference()
        sr.SpatialReferenceId = s.SpatialReferenceObj.SpatialReferenceID
        sr.SRSID = s.SpatialReferenceObj.SRSCode
        sr.SRSName = s.SpatialReferenceObj.SRSName
        sr.Notes = s.SpatialReferenceObj.SRSDescription
        self.LatLongDatum = sr
        if aff is not None:
            if aff.OrganizationObj.OrganizationTypeCV in [
                    'Government agency', 'Research agency'
            ]:
                self.AgencyName = aff.OrganizationObj.OrganizationName
                self.AgencyCode = aff.OrganizationObj.OrganizationCode
Beispiel #2
0
class Site(Base, wof_base.BaseSite):
    __tablename__ = 'site'

    SiteID = Column('id', Integer, primary_key=True)
    SiteCode = Column('site_code', String)
    SiteName = Column('name', String)
    #Geom = GeometryColumn('geom', Point(2)) #TODO Andy

    @property
    def Latitude(self):
        #x, y = self.Geom.coords(db_session) #TODO Andy
        #return y
        return 0.0

    @property
    def Longitude(self):
        #x, y = self.Geom.coords(db_session) #TODO Andy
        #return x
        return 0.0

    #Elevation_m = Column(Float)
    #VerticalDatum = Column(String)

    #All sites are in WGS84
    LatLongDatum = wof_base.BaseSpatialReference()
    LatLongDatum.SRSID = 4326
    LatLongDatum.SRSName = "WGS84"
 def __init__(self, s=None):
     self.SiteID = s.SamplingFeatureID
     self.Latitude = s.Latitude
     self.Longitude = s.Longitude
     self.LatLongDatumID = s.SpatialReferenceID
     self.SiteCode = s.SamplingFeatureCode
     self.SiteName = s.SamplingFeatureName
     self.Elevation_m = s.Elevation_m
     self.Comments = s.SamplingFeatureDescription
     sr = wof_base.BaseSpatialReference()
     sr.SpatialReferenceId = s.SpatialReferenceObj.SpatialReferenceID
     sr.SRSID = s.SpatialReferenceObj.SRSCode
     sr.SRSName = s.SpatialReferenceObj.SRSName
     sr.Notes = s.SpatialReferenceObj.SRSDescription
     self.LatLongDatum = sr
Beispiel #4
0
class Site(wof_base.BaseSite):
    # Properties common to all sites in this example
    LatLongDatum = wof_base.BaseSpatialReference()
    LatLongDatum.SRSID = 4269 # EPSG code
    LatLongDatum.SRSName = 'NAD83'
    State = 'Texas'