-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPARQL path query for the following resources #16
Comments
SPARQL query for review PREFIX hyf: <https://www.opengis.net/def/schema/hy_features/hyf/>
select ?le ?relsubjects where {
<https://geoconnex.us/ref/gages/1118104> hyf:referencedPosition ?rp .
?rp hyf:HY_IndirectPosition ?ip .
?ip hyf:linearElement ?le .
BIND (?le as ?target)
?relsubjects hyf:referencedPosition ?rp2 .
?rp2 hyf:HY_IndirectPosition ?ip2.
?ip2 hyf:linearElement ?target .
} Need to connect this to the output in something like https://search.geoconnex.us/?search=Lake+site+01554469 |
Query that collects mainstem results: PREFIX hyf: <https://www.opengis.net/def/schema/hy_features/hyf/>
select * where {
?relsubjects hyf:referencedPosition ?rp .
?rp hyf:HY_IndirectPosition ?ip .
?ip hyf:linearElement <https://geoconnex.us/ref/mainstems/324976> .
} |
version of the query with the WKT for gage and mainstem (need to not replicate the mainstem each row) PREFIX hyf: <https://www.opengis.net/def/schema/hy_features/hyf/>
PREFIX schema: <https://schema.org/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
select DISTINCT ?mainstem ?gage ?name ?gwkt ?mswkt where {
<https://geoconnex.us/ref/gages/1118104> hyf:referencedPosition ?rp .
?rp hyf:HY_IndirectPosition ?ip .
?ip hyf:linearElement ?mainstem .
BIND (?mainstem as ?target)
?gage hyf:referencedPosition ?rp2 .
?rp2 hyf:HY_IndirectPosition ?ip2.
?ip2 hyf:linearElement ?target .
?mainstem schema:name ?name .
?mainstem geo:hasGeometry ?msgeom .
?msgeom geo:asWKT ?mswkt .
?gage geo:hasGeometry ?ggeom .
?ggeom geo:asWKT ?gwkt
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resource reference
https://reference.geoconnex.us/collections/gages/items/1009257?f=jsonld
find all resources that have similar path to this
10:15
linearElement (the mainstem one in particular)
The text was updated successfully, but these errors were encountered: