Closed inkenbrandt closed 1 year ago
@inkenbrandt charge code for this work is UNG6
@inkenbrandt I think I've got this working. Attached is the output CSV from the SQL query (shown below)- please review it, then let's chat about next steps. Make sure you change Column B to a number to get it to display properly. The Shape field matches the Shape field in the monitoring locations table - so even though it looks weird, I think it's right
DROP VIEW IF EXISTS sde.reading_summary_ngwmn; CREATE OR REPLACE VIEW sde.reading_summary_ngwmn AS
SELECT (row_number() OVER ())::integer AS objectid, a.locationid as usgsid, date(r.readingdate) as readingdate, r.locationid as locationid, '-7' as timezone, 'feet' as uom, r.measureddtw as depth_to_water, 'transducer' as wlmethod, r.driftcorrection as quality, a.latitude as latitude, a.longitude as longitude, a.shape as shape
FROM sde.ugs_ngwmn_monitoring_locations as a INNER JOIN reading r
ON a.altlocationid=r.locationid;
We provide a service to the USGS NGWMN of water levels for select wells in Snake Valley. They require that the data are aggregated to daily averages, and that additional informative fields are provided to meet their data standards. New iterations of our database should try to follow WaterML (https://www.ogc.org/standards/waterml) standards.
I would like to modify the view query or the
reading
table so that data generated in thereading_summary
view can be consumed as a service by the USGS NGWMN. This would streamline the workflow for providing those data. This may just result in a modified sql query that we can use to generate the service.Here is a link to the current service that the USGS NGWMN consumes: https://webmaps.geology.utah.gov/arcgis/rest/services/Groundwater/NGWMN_USGS_V2/MapServer/0
Here are the fields in the service with an explanation of the source of each:
locationid
field in theugs_ngwmn_monitoring_locations
table; not to be confused withaltlocationid
, which is the field that joins to thelocationid
field in ourreading
tablelocationid
field in ourreading
tabledriftcorrection
field inreading
tableugs_ngwmn_monitoring_locations
table;ugs_ngwmn_monitoring_locations
table;