-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from internetofwater/json-ld
Update JSON-LD responses
- Loading branch information
Showing
5 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"@context":[{"schema":"https://schema.org/","geo":"schema:geo","hyf":"https://www.opengis.net/def/schema/hy_features/hyf/","gsp":"http://www.opengis.net/ont/geosparql#","name":"schema:name","comid":{"@id":"schema:geoWithin","@type":"@id"},"hyf:linearElement":{"@type":"@id"}}],"@id":"_:graph","@graph":[{% for feature in data %}{% set props = feature.properties %}{"@id":"{{ props.uri }}","@type":"https://www.opengis.net/def/schema/hy_features/hyf/HY_HydroLocation","schema:subjectOf":{"@type":"schema:CreativeWork","schema:identifier":"{{ props.source }}","schema:name":"{{ props.sourceName }}"},"name":"{{ props.name }}",{% if props.comid %}"comid":"https://geoconnex.us/nhdplusv2/comid/{{ props.comid }}",{% endif %}"hyf:referencedPosition":[{% if props.mainstem %}{"hyf:HY_IndirectPosition":{"hyf:linearElement":"{{ props.mainstem }}"}}{% endif %}{% if props.measure and props.reachcode %}{% if props.mainstem %},{% endif %}{"hyf:HY_IndirectPosition":{"hyf:distanceExpression":{"hyf:HY_IndirectPosition":{"hyf:interpolative":{{ props.measure }}}},"hyf:distanceDescription":{"hyf:HY_DistanceDescription":"upstream"},"hyf:HY_IndirectPosition":{"hyf:linearElement":"https://geoconnex.us/nhdplusv2/reachcode/{{ props.reachcode }}"}}}{% endif %}]{% if feature.geometry.type == "Point" %}{% set lon = feature.geometry.coordinates[0] %}{% set lat = feature.geometry.coordinates[1] %},"geo":{"@type":"schema:GeoCoordinates","schema:longitude":{{ lon }},"schema:latitude":{{ lat }}},"gsp:hasGeometry":{"@type":"http://www.opengis.net/ont/sf#Point","gsp:asWKT":{"@value":"POINT({{ lon }} {{ lat }})","@type":"http://www.opengis.net/ont/geosparql#wktLiteral"}}{% endif %}}{% if not loop.last %},{% endif %}{% endfor %}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"@context":[{"schema":"https://schema.org/","geo":"schema:geo","hyf":"https://www.opengis.net/def/schema/hy_features/hyf/","gsp":"http://www.opengis.net/ont/geosparql#","name":"schema:name","comid":{"@id":"schema:geoWithin","@type":"@id"},"hyf:linearElement":{"@type":"@id"}}],{% for feature in data %}{% set props = feature.properties %}"@id":"{{ props.uri }}","@type":"https://www.opengis.net/def/schema/hy_features/hyf/HY_HydroLocation","schema:subjectOf":{"@type":"schema:CreativeWork","schema:identifier":"{{ props.source }}","schema:name":"{{ props.sourceName }}"},"name":"{{ props.name }}",{% if props.comid %}"comid":"https://geoconnex.us/nhdplusv2/comid/{{ props.comid }}",{% endif %}"hyf:referencedPosition":[{% if props.mainstem %}{"hyf:HY_IndirectPosition":{"hyf:linearElement":"{{ props.mainstem }}"}}{% endif %}{% if props.measure and props.reachcode %}{% if props.mainstem %},{% endif %}{"hyf:HY_IndirectPosition":{"hyf:distanceExpression":{"hyf:HY_IndirectPosition":{"hyf:interpolative":{{ props.measure }}}},"hyf:distanceDescription":{"hyf:HY_DistanceDescription":"upstream"},"hyf:HY_IndirectPosition":{"hyf:linearElement":"https://geoconnex.us/nhdplusv2/reachcode/{{ props.reachcode }}"}}}{% endif %}]{% if feature.geometry.type == "Point" %}{% set lon = feature.geometry.coordinates[0] %}{% set lat = feature.geometry.coordinates[1] %},"geo":{"@type":"schema:GeoCoordinates","schema:longitude":{{ lon }},"schema:latitude":{{ lat }}},"gsp:hasGeometry":{"@type":"http://www.opengis.net/ont/sf#Point","gsp:asWKT":{"@value":"POINT({{ lon }} {{ lat }})","@type":"http://www.opengis.net/ont/geosparql#wktLiteral"}}{% endif %}{% endfor %}} |