Skip to content

Commit

Permalink
Add huc containingCatchment and counties stWithin (#24)
Browse files Browse the repository at this point in the history
* Add huc containingCatchment

* Add huc containingCatchment

* Add counties j2 template

* Update counties.jsonld
  • Loading branch information
webb-ben authored Sep 13, 2024
1 parent 120f4ff commit b5c58be
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 24 deletions.
20 changes: 20 additions & 0 deletions pygeoapi-skin-dashboard/templates/jsonld/counties.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@context": {
"schema": "https://schema.org/",
"gsp": "http://www.opengis.net/ont/geosparql#",
"name": "schema:name",
"census_profile": {
"@id": "schema:subjectOf",
"@type": "@id"
}
},
"@id": "{{ data['@id'] }}",
"@type": "schema:Place",
"schema:name": "{{ data['name'] }}",
"census_profile": "{{ data['census_profile'] }}",
"geosparql:sfWithin": {
"@id": "https://geoconnex.us/ref/states/{{ data['statefp'] }}"
},
"gsp:hasGeometry": {{ data['gsp:hasGeometry'] | to_json }},
"geo": {{ data['schema:geo'] | to_json | safe }}
}
18 changes: 18 additions & 0 deletions pygeoapi-skin-dashboard/templates/jsonld/hu04.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"@context": {
"schema": "https://schema.org/",
"gsp": "http://www.opengis.net/ont/geosparql#",
"hyf": "https://www.opengis.net/def/schema/hy_features/hyf/",
"gnis_url": {
"@id": "schema:subjectOf",
"@type": "@id"
}
},
"@id": "{{ data['@id'] }}",
"@type": "schema:Place",
"schema:name": "{{ data['name'] }}",
"gnis_url": "{{ data['gnis_url'] }}",
"hyf:containingCatchment": {"@id": "https://geoconnex.us/ref/hu02/{{ data['id'][0:2] }}"},
"gsp:hasGeometry": {{ data['gsp:hasGeometry'] | to_json }},
"geo": {{ data['schema:geo'] | to_json | safe }}
}
22 changes: 22 additions & 0 deletions pygeoapi-skin-dashboard/templates/jsonld/hu06.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"@context": {
"schema": "https://schema.org/",
"gsp": "http://www.opengis.net/ont/geosparql#",
"hyf": "https://www.opengis.net/def/schema/hy_features/hyf/",
"gnis_url": {
"@id": "schema:subjectOf",
"@type": "@id"
}
},
"@id": "{{ data['@id'] }}",
"@type": "schema:Place",
"schema:name": "{{ data['name'] }}",
"gnis_url": "{{ data['gnis_url'] }}",
"hyf:containingCatchment": [
{"@id": "https://geoconnex.us/ref/hu06/{{ data['id'][0:6] }}"},
{"@id": "https://geoconnex.us/ref/hu04/{{ data['id'][0:4] }}"},
{"@id": "https://geoconnex.us/ref/hu02/{{ data['id'][0:2] }}"}
],
"gsp:hasGeometry": {{ data['gsp:hasGeometry'] | to_json }},
"geo": {{ data['schema:geo'] | to_json | safe }}
}
23 changes: 23 additions & 0 deletions pygeoapi-skin-dashboard/templates/jsonld/hu08.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"@context": {
"schema": "https://schema.org/",
"gsp": "http://www.opengis.net/ont/geosparql#",
"hyf": "https://www.opengis.net/def/schema/hy_features/hyf/",
"gnis_url": {
"@id": "schema:subjectOf",
"@type": "@id"
}
},
"@id": "{{ data['@id'] }}",
"@type": "schema:Place",
"schema:name": "{{ data['name'] }}",
"gnis_url": "{{ data['gnis_url'] }}",
"hyf:containingCatchment": [
{"@id": "https://geoconnex.us/ref/hu08/{{ data['id'][0:8] }}"},
{"@id": "https://geoconnex.us/ref/hu06/{{ data['id'][0:6] }}"},
{"@id": "https://geoconnex.us/ref/hu04/{{ data['id'][0:4] }}"},
{"@id": "https://geoconnex.us/ref/hu02/{{ data['id'][0:2] }}"}
],
"gsp:hasGeometry": {{ data['gsp:hasGeometry'] | to_json }},
"geo": {{ data['schema:geo'] | to_json | safe }}
}
23 changes: 23 additions & 0 deletions pygeoapi-skin-dashboard/templates/jsonld/hu10.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"@context": {
"schema": "https://schema.org/",
"gsp": "http://www.opengis.net/ont/geosparql#",
"hyf": "https://www.opengis.net/def/schema/hy_features/hyf/",
"gnis_url": {
"@id": "schema:subjectOf",
"@type": "@id"
}
},
"@id": "{{ data['@id'] }}",
"@type": "schema:Place",
"schema:name": "{{ data['name'] }}",
"gnis_url": "{{ data['gnis_url'] }}",
"hyf:containingCatchment": [
{"@id": "https://geoconnex.us/ref/hu08/{{ data['id'][0:8] }}"},
{"@id": "https://geoconnex.us/ref/hu06/{{ data['id'][0:6] }}"},
{"@id": "https://geoconnex.us/ref/hu04/{{ data['id'][0:4] }}"},
{"@id": "https://geoconnex.us/ref/hu02/{{ data['id'][0:2] }}"}
],
"gsp:hasGeometry": {{ data['gsp:hasGeometry'] | to_json }},
"geo": {{ data['schema:geo'] | to_json | safe }}
}
29 changes: 5 additions & 24 deletions pygeoapi.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,7 @@ resources:
- Hydrologic Subregions
- USGS
linked-data:
context:
- schema: https://schema.org/
name: schema:name
gnis_url:
"@id": schema:subjectOf
"@type": "@id"
item_template: jsonld/hu04.jsonld
links:
- type: application/html
rel: canonical
Expand All @@ -158,12 +153,7 @@ resources:
- Hydrologic Basins
- USGS
linked-data:
context:
- schema: https://schema.org/
name: schema:name
gnis_url:
"@id": schema:subjectOf
"@type": "@id"
item_template: jsonld/hu06.jsonld
links:
- type: application/html
rel: canonical
Expand All @@ -188,12 +178,7 @@ resources:
- Hydrologic Subbasins
- USGS
linked-data:
context:
- schema: https://schema.org/
name: schema:name
gnis_url:
"@id": schema:subjectOf
"@type": "@id"
item_template: jsonld/hu08.jsonld
links:
- type: application/html
rel: canonical
Expand All @@ -218,12 +203,7 @@ resources:
- Watersheds
- USGS
linked-data:
context:
- schema: https://schema.org/
name: schema:name
gnis_url:
"@id": schema:subjectOf
"@type": "@id"
item_template: jsonld/hu10.jsonld
links:
- type: application/html
rel: canonical
Expand Down Expand Up @@ -607,6 +587,7 @@ resources:
- Counties
- Census
linked-data:
item_template: jsonld/counties.jsonld
context:
- schema: https://schema.org/
name: schema:name
Expand Down

0 comments on commit b5c58be

Please sign in to comment.