|
18 | 18 | "ssn": "http://www.w3.org/ns/ssn/", |
19 | 19 | "ssn-system": "http://www.w3.org/ns/ssn/systems/" |
20 | 20 | }, |
21 | | - "@id": "{{ data['@id'] }}", |
| 21 | + "@id": "https://geoconnex.us/iow/usgs/sta/{{ data['name'] }}", |
22 | 22 | "@type": [ |
23 | 23 | "hyf:HY_HydrometricFeature", |
24 | | - "hyf:HY_HydroLocation", |
25 | | - {% if data['monitoringLocationType'] %} |
26 | | - "locType:{{ data['monitoringLocationType'] }}" |
| 24 | + "hyf:HY_HydroLocation" |
| 25 | + {% if data['monitoringLocationType'] %}, |
| 26 | + {% set locTypes = data['monitoringLocationType'].replace(' ', '').split(',') %} |
| 27 | + {% for type_ in locTypes %} |
| 28 | + "locType:{{ type_ }}" |
| 29 | + {% if not loop.last %},{% endif %} |
| 30 | + {% endfor %} |
27 | 31 | {% endif %} |
28 | 32 | ], |
29 | 33 |
|
30 | 34 |
|
31 | 35 | {% if data['monitoringLocationType'] %} |
32 | | - "hyf:HydroLocationType": "{{ data['monitoringLocationType'] }}", |
| 36 | + "hyf:HydroLocationType": "{{ locTypes[0] }}", |
33 | 37 | {% endif %} |
34 | 38 |
|
35 | 39 | {#Was told to not worry about changing this for time being, no way to get this without a geospatial query #} |
|
169 | 173 |
|
170 | 174 | {#`sites` is the same as the Thing id but the hyphen is replaced by a colon. if there is no hyphen, then you just pipe in the thing id #} |
171 | 175 | {# We then need to remove the surrounding '' to make sure the query is properly formatted #} |
172 | | - "contentUrl": "https://waterservices.usgs.gov/nwis/iv/?sites={{data['id'] | replace("-", ":" ) | replace("'", "")}}¶meterCd={{ stream["properties"]["ParameterCode"] }}&format=rdb", |
| 176 | + "contentUrl": "https://waterservices.usgs.gov/nwis/iv/?parameterCd={{ stream["properties"]["ParameterCode"] }}&sites={{data['id'] | replace("-", ":" ) | replace("'", "")}}&format=rdb", |
173 | 177 | "encodingFormat": [ |
174 | 178 | "text/tab-separated-values" |
175 | 179 | ], |
|
0 commit comments