ODM2 / WOFpy

A server-side implementation of CUAHSI's Water One Flow service stack in Python.
http://odm2.github.io/WOFpy/
9 stars 9 forks source link

Adapting ODM2 timeseries DAO to Luquillo CZO ODM2 PostgreSQL DB #73

Closed emiliom closed 7 years ago

emiliom commented 7 years ago

From @miguelcleon:

using my postgresql LCZO database. I see now what your talking about with Sites, Emilio. I added in a Sites record related to a Stream gage sampling feature and a URL like the below pulled back the expected site information. http://127.0.0.1:8080/odm2timeseries/rest/1_1/GetSiteInfo??site=odm2timeseries:Rio%20Icacos%20Trib-IO

The below did not work and yielded the attached ‘WofPyGetValuesError.xml’ file. Maybe there are some other database records that are expected but which I haven’t populated. http://127.0.0.1:8080/odm2timeseries/rest/1_1/GetValuesForASite?site=odm2timeseries:Rio%20Icacos%20Trib-IO&startDate=2016-10-01T00:00:00&endDate=2016-10-03T02:30:00

(Regarding use of Site SamplingFeatures vs other SamplingFeature types)

Yes, I’m using Weather station, Observation well, and Stream gage sampling features although I do have at least one sampling feature defined as a site with a number of time series associated with it (http://odm2admin.cuahsi.org/LCZO/LCZO/graphfa/dataset=5/resultidu=16695/startdate=2014-11-14/enddate=2016-02-24/ ).

Is there any example of any setup DAOs?

examples/flask/odm2/timeseries, developed using the sample LBR ODM2 timeseries MySQL DB, is effectively the example DAO setup. For the LCZO (and other ODM2 DB's with timeseries result types) our approach will be to adapt and/or generalize that DAO, once we understand what's different.

cc'ing @lsetiawan so he's pinged on this isue