Skip to content

Commit 8b9d65b

Browse files
authored
Add wqp uri (#10)
* Add wqp uri * Add state information
1 parent 5b788b8 commit 8b9d65b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

sta.config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ resources:
448448
name: SensorThings
449449
data: https://wqp.internetofwater.app/FROST-Server/v1.1/Things
450450
name_field: name
451+
uri_field: uri
451452
expand: Locations,Datastreams/ObservedProperty
452453

453454
# WQIE-WQP/Datastreams:

templates/wqp-location-oriented.j2

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@
2121
"@id": "{{ data['@id'] }}",
2222
"@type": [
2323
"hyf:HY_HydrometricFeature",
24-
"hyf:HY_HydroLocation",
25-
{% if data['monitoringLocationType'] %}
26-
"locType:{{ data['monitoringLocationType'] }}"
27-
{% endif %}
24+
"hyf:HY_HydroLocation"
2825
],
2926

30-
3127
{%- if data['monitoringLocationType'] %}
3228
"hyf:HydroLocationType": "{{ data['monitoringLocationType'] }}",
3329
{% endif -%}
@@ -82,6 +78,18 @@
8278
],
8379
{% endif -%}
8480

81+
{%- if data["county"] or data["state"] -%}
82+
"gsp:sfWithin": [
83+
{%- if data["county"] -%}
84+
{ "@id": "{{ data['county'] }}" }
85+
{%- if data["state"] -%}, {%- endif -%}
86+
{%- endif -%}
87+
{%- if data["state"] -%}
88+
{ "@id": "{{ data['state'] }}" }
89+
{%- endif -%}
90+
],
91+
{% endif -%}
92+
8593
"subjectOf": [
8694
{%- for stream in data['Datastreams'] %}
8795
{

0 commit comments

Comments
 (0)