diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 410a89e..4f21a5a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -42,6 +42,9 @@ jobs: - name: Trace direction run: npm run check-trace-direction + - name: Flowline scope + run: npm run check-flowline-scope + - name: Cache key run: npm run check-cache-key @@ -51,6 +54,15 @@ jobs: - name: Substance labels run: npm run check-substance-labels + - name: Query join order and observation joins + run: npm run check-query-joins + + # Golden-file diff of the SPARQL every shape generates. The one above + # asserts a rule; this one notices when a change moves a shape nobody was + # thinking about, which is the failure mode of a shared query builder. + - name: Query snapshots + run: npm run check-query-snapshots + # Not blocking yet: `npm run lint` reports 15 pre-existing errors, all in # components and none related to the engine. Make this a required step in # the same change that clears them, not before, or the signal is noise diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 6928896..93d865e 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -760,7 +760,31 @@ supply — see [Bounded Execution](#bounded-execution). - Easy to debug — copy query into SPARQL editor to test - Full control — no library limitations -### 5. Why Transform SPARQL Rows to Features? +### 5. Why Each Filter Declares Its Own Joins + +**Problem:** In SPARQL a triple pattern is an inner join, so *every required +triple is also a filter*. Asking for a field that some records lack deletes +those records, silently and with no filter anywhere in the query saying so. + +**What went wrong:** `bindEntityInCell` used one boolean — did the user set any +sample filter? — and if so fetched the whole measurement record. Ticking a +substance therefore pulled in `coso:measurementUnit`, and a non-detect has no +unit (there is no quantity to put a unit on; the record carries detection limits +instead). So a substance-only question dropped **774 of 1,688** Cumberland PFOS +observations while "Include non-detects" sat ticked. Non-detects are 77% of +Maine's observations, so this understated PFAS presence across the app, and +nothing looked broken: the map still drew, with fewer dots. + +**We chose:** `sampleJoinsNeeded` maps each active filter to the joins that +filter actually reads. Substance needs two triples. A concentration range +genuinely reads the unit, so that case keeps it. Nothing ever needs the material +*label*, which is display-only. + +**The rule to carry into new templates:** fetch what you project or filter on, +nothing else, and reach for `OPTIONAL` the moment a field is not universal. +`scripts/check-query-joins.mts` asserts this across all 108 shapes in CI. + +### 6. Why Transform SPARQL Rows to Features? **Problem:** SPARQL returns flat rows with WKT strings: ```javascript @@ -909,6 +933,18 @@ anything past the budget, then extends one segment further so the drawn line does not stop mid-channel. On one Maine question, a 30 km bound cut 15,782 reaches to 3,705 while keeping all 616 facilities. +**A closure needs both ends bound, and a distance cap is not a substitute.** The +pattern above is safe because it ends at `?spC`, a real target. The stream layer +(`buildFusedFlowlineQuery`) drew its geometry from the seed side only, with +nothing on the right of the closure, and that is not a narrower version of the +same query — it is a fan-out to the end of the network. An anchor near a +drainage divide brought back the neighbouring basin: on "facilities upstream +from PFOS samples in York County, ME", 122 segments of the Merrimack and 21 of +the Winnipesaukee, 130 km away. Intersecting the closure with the flowlines that +reach the resolved targets removed 755 flowlines and added 0. A 25 km cap did +*not* prevent it, because the wrong basin was inside the budget. See +DEBUGGING.md, 2026-09-19. + **Upstream questions use this same pattern, unchanged.** There is no upstream query. "A upstream from C" seeds from block A and traces downstream to block C, which is the same relation read from the other end. The templates can build a diff --git a/docs/DEBUGGING.md b/docs/DEBUGGING.md index 1d8cf8a..cc84b92 100644 --- a/docs/DEBUGGING.md +++ b/docs/DEBUGGING.md @@ -499,3 +499,235 @@ side does not (`?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor` before attaching to a flowline). So "A upstream from C" and "C downstream from A" are not exactly reciprocal even now, which is part of the 840 vs 474 gap above. Making them reciprocal means applying that tolerance to both sides or neither. + +--- + +## 2026-09-17: Two silent filters in the fused queries, join order and the unit join + +Both found while running "What facilities are upstream from PFOS samples in York +and Cumberland counties (Maine)?" with the facilities block left empty. The +pipeline failed at step 1 after 116.3s with `500 out-of-memory` ("tried to +allocate 204.8 MB, only 159.3 MB available"), sliced into the two counties, and +both slices failed the same way. + +**Join order (fixed).** `buildFusedWhereBody` always wrote the anchor side +first, and for an upstream question the planner puts block A on the anchor side. +With no region and no industry filter on block A, the query started from every +facility in the graph and traced the national flowline network to look for +samples in two Maine counties. + +QLever does not search join orders exhaustively at these body sizes (12-14 +triples), so it follows the query text. Writing the constrained side first is +the whole fix: same triples, same variables, different order. Measured across +all 72 hydrology shape/config pairs, one county scope: 5 shapes rescued, 0 +regressions, 0 rows lost, faster in 50 of 66 comparable runs. + +Two things this is *not*, both measured, so nobody re-derives them: + +- **Not volume.** Rows materialised through the trace from Cumberland seeds: + samples + PFOS 872,385, facilities 681,299, wells 4,183,432. The samples seed + materialises more than the facilities seed and succeeds where it fails. +- **Not a sub-SELECT.** Fencing the constrained side in a sub-SELECT rescues the + same 5 shapes but breaks 7 that work today, all OOM: a sub-SELECT is an + optimiser barrier, so it forces one plan and forbids every other. A variant + that carried only the distinct cells through the fence and re-joined the + entity last failed the same 7, three of them degrading from OOM into 60s + timeouts. + +**The unit join (fixed).** `bindEntityInCell` emitted the entire observation +chain whenever *any* sample filter was set, including +`?result coso:measurementUnit ?unit`. A non-detect has no +`coso:measurementUnit` (`templates/samples.ts` documents this, and the by-IRI +templates already gated it behind `needsUnitJoin`), so a substance-only question +with "include non-detects" ticked silently dropped every non-detect. Cumberland +PFOS observations: 1,688 total, 914 with a unit, 774 non-detect with none. At +sample-point level, 23 points and 13 facilities became 32 and 15 once the joins +a substance filter actually reads were the only ones emitted. + +The same required join was hiding non-detects in the popup's observation table +(`buildSampleDetailByIriQuery`): on sample point 64220, **474 of 3,334 rows**, +the missing 2,860 all non-detects. `OPTIONAL` in place OOMs at 819.7 MB; joining +it after `resultValueClauses()` with the symbol lookup nested inside costs what +it did before (6.88s vs 6.59s). + +**Lessons** + +- **Every required triple is also a filter.** Joining detail the query only + displays, or that an inactive filter would have read, deletes rows. Both bugs + here are one habit: an all-or-nothing gate that conflated "the user set a + filter" with "fetch the whole record". +- **Textual triple order is a semantic-free change with a non-semantic-free + cost.** It cannot alter the answer, and it decided whether this question + answered at all. That makes it cheap to try and worth asserting: + `scripts/check-query-joins.mts` reads the emitted SPARQL and fails if the + unconstrained side leads, or if the unit join appears without a concentration + range. +- **Measure the fix against the shapes it touches, not the one that prompted + it.** The sub-SELECT looked like a 48% median win on the question at hand and + was a net regression across the shape space. + +## 2026-09-19: The stream layer drew rivers in a basin no sample drains from (FIXED) + +Reported from outside the team: "What facilities are upstream from PFOS samples?" +scoped to York County, ME drew the entire Merrimack River, which is in another +state and another watershed. + +**What was broken.** `GET_FLOWLINE_GEOMETRIES` is a separate query from +discovery, and it traced a one-sided transitive closure. It seeded from the +cells of every resolved anchor, widened each by `sfTouches`, and followed +`hyf:downstreamFlowPathTC` to the end of the network: + +```sparql +?upstream_flowline rdf:type hyf:HY_FlowPath ; + spatial:connectedTo ?s2cellus ; + hyf:downstreamFlowPathTC ?flowline . +``` + +Nothing in it references the target. An anchor sitting near a drainage divide +therefore pulled in the whole of the neighbouring basin. Drawn for that +question: 122 segments of the Merrimack, 40 of the Presumpscot, 37 of the +Suncook, 24 of Cohas Brook, 21 of the Winnipesaukee (~130km away), 16 of the +Powwow. + +**Where it was not.** The discovery query was innocent, which is why the first +guess was wrong. Filtering its own `?upstream_flowline` set for those names +returns zero rows. Only the layer query was one-sided. + +**The fix.** Intersect the closure with the flowlines that reach the resolved +targets. Measured with the real answer sets (1,497 facilities, 200 sample +points): 3,271 flowlines down to 2,516 in the same 7s, **755 removed and 0 +added**, so the change can only subtract flowlines that were never on a path +from a facility to a sample. Of the 755, 684 are in a different basin and 71 lie +below a sample, the latter being a deliberate behaviour change: the drawn river +now stops at the sample instead of running on to the sea. + +**Two forms measured and rejected.** + +- *The direct membership test*, `?flowline hyf:downstreamFlowPathTC? ?_flTarget`, + leaves `?flowline` unbound on the left and QLever times out at 31s ("Join on + ?flowline"). Two `SELECT DISTINCT` closures intersected on `?flowline` run in + the same 7s the one-sided query took. +- *A reflexive reach*, `TC?` instead of `TC` on the target side, recovers **0** + flowlines and costs 8s. `hyf:downstreamFlowPathTC` is already reflexive, so + `TC?` is the same relation spelled more expensively: `X TC X` holds for 2,104 + of 2,104 York County flowlines and there are 434,501 self-pairs graph-wide. + ARCHITECTURE.md Pattern 3 already said so. The segment a target sits on is + therefore drawn; what the intersection excludes is the river *below* it. + +**A distance bound is not a substitute.** The bounded branch got the same +intersection. At 25km it went 3,034 to 2,516, matching the unbounded set, +because connectivity dominates the cap at that range; at 5km the cap still bites +(2,314), so the two constraints compose. The shipped bounded query had been +drawing a Merrimack segment straight through its own 25km cap. + +`scripts/check-flowline-scope.mts` asserts both ends are bound for all 100 +shapes that draw the layer, bounded and unbounded. + +**Also fixed here: `includeNondetects: true` counted as a filter.** The +seed-side rule added on 2026-09-17 asked "is this side narrowed" with a generic +"any filter field is non-null" scan. `includeNondetects: true` is the UI's +default ticked state and narrows nothing, so a samples block carrying only that +was read as constrained and reordered the entire body. Ticking the checkbox and +un-ticking it back therefore changed the emitted SPARQL for a semantically +identical question. Samples now delegate to `sampleJoinsNeeded`, which already +drew the line at `=== false`. + +The same predicate existed three times (`scope.ts` as `hasBlockFilters`, +`sparqlErrors.ts` as `isNarrowed`, and the new copy). `scope.ts` asks it to pick +a chunking axis, so a drift means the executor slices on an axis the template +already led with. It is now one exported `blockIsFiltered`. + +**Lessons** + +- **A one-sided closure is not a filter, it is a fan-out.** Seeding from the + answer set feels bounded and is not: transitive closure from any seed reaches + the end of the network. If both ends of a relationship are known, bind both. +- **The query that produces the wrong output is not always the query that looks + wrong.** Three queries feed one map. Name-filtering each layer's own result + set located this in one step after a day of reading the wrong query. +- **"Stop at the cutoff" and "stop where it stops mattering" are different + bounds.** A distance cap looked like it should have prevented this and did + not, because the wrong basin was well within range. + +## 2026-09-20: A distance bound failed whenever block A was left open (FIXED) + +Picking any "within N km of flow" on "what facilities are upstream from PFOS +samples in York County" returned nothing. Every option, 5, 10 and 30 km, both +projections, six queries, six identical failures: HTTP 429 carrying +`Operation timed out. Last operation: Query planning`. Note *planning*, not +execution. The engine could not even build a plan inside its 30s budget. + +**The bound was not the problem; the side it seeded from was.** The +constrained-side-first reorder that landed on 2026-09-17 deliberately skipped +bounded queries, with a comment recording that the shape had not been measured +either way. It has now. `boundedTrace` duplicates its seed block inside an +aggregate that sums `nhdplusv2:hasFlowPathLength` across two +`hyf:downstreamFlowPathTC` hops, so seeding the unconstrained side sums path +lengths over the national flowline graph. With block A left as plain Facilities +that seed is 1,506,326 facilities. + +Isolated by varying one thing. Same 30 km bound, same target type, only the +block A scope differing: + +| Block A | Result | +| --- | --- | +| wide open | 500, tried to allocate 4.3 GB | +| scoped to York County | 1,429 rows in 4s | + +And the control that proves bounded queries were fine in general: the Cook +County dashboard question, whose block A carries both a county and a NAICS +filter, answers in 28s and 6s throughout. + +**The fix** gives `boundedTrace` a seed side and drops one clause from the +guard, so a bounded trace is reordered by the same rule as everything else. The +trace, the `GROUP BY` and the `+1` fringe all follow the seed. The fringe still +extends away from the seed, which means the physical end that receives the extra +segment follows the seed side; on a question where both forms run, the result +sets were identical, so nothing observable turns on it. + +Measured before trusting the speed: + +- where both forms run, identical IRI sets on both projections +- against the unbounded answer, the bounded one is a strict subset, 918 of 1,494 + facilities, 0 added +- across 5, 10, 30 and 50 km the answers nest, each bound's set inside the next +- the York question answers in 20s and 3s, 132 samples and 918 facilities, + against two 429s before + +**What it did not fix.** Step 0 of the statewide MD shapes still fails; both +rescued rows are step 1. `facilities upstream(30km) streams [ME on C]` changed +failure mode rather than passing. Wells remains unchanged on all four bounded +combinations. Details in `docs/QUERY-MATRIX.md` Part 10. + +### The tripwire this nearly disarmed + +`check-trace-direction.mts` kept `?_flEnd hyf:downstreamFlowPathTC ?_flMid` on a +blacklist of reversed traces. A block seeded from the target writes that exact +triple while tracing correctly, so the string cannot decide it any more. Deleting +the entry would have quietly removed the only guard against the 2026-09-16 +direction bug. + +Queries that name both ends are now checked by reachability instead: build the +directed edges from `hyf:downstreamFlowPathTC` and `hyf:downstreamFlowPath?`, +where `?a ?b` always means a flows into b, and assert a path from +`?upstream_flowline` to `?ds_flowline`. That is the property the string was +standing in for, and it admits both seed sides. Verified by mutation: +reintroducing the 2026-09-16 bug still fails it, and a half-applied reorder that +moves the query text while leaving the aggregate seeded from the anchor fails +the new `seedsFrom` assertion in `check-query-joins.mts`. + +### Two measurement traps worth not repeating + +**Cold against warm.** The first MD sweep was the phase's first ever run, so it +was entirely cold, and the post-fix sweep was warm. Compared directly it credits +the fix with three flips instead of two; the extra row is unbounded and +anchor-constrained, its SPARQL byte-identical at 1,950 characters either side, +timing out cold and answering in 15s warm. Re-run the old engine warm before +quoting a delta. Run-to-run noise, once both halves are warm, is zero: three +consecutive sweeps at identical code agreed on every row. + +**Your own load.** Three bounded queries were measured failing with +out-of-memory, one reporting only 2.9 MB available, while a full pipeline run of +mine was hammering the same endpoint. Re-run alone, they failed differently, as +planning timeouts. The header of `query-matrix.mts` warns about this; it applies +to ad-hoc curl measurements just as much. diff --git a/docs/QUERY-MATRIX.md b/docs/QUERY-MATRIX.md index 7ade3fc..1445292 100644 --- a/docs/QUERY-MATRIX.md +++ b/docs/QUERY-MATRIX.md @@ -821,3 +821,89 @@ comid/1001 -> comid/1005 a_end == b_start: true a_start == b_end: false So `A TC B` means B is downstream of A, as the predicate name says, and as Part 8 already concluded by a different route. This is the cheaper check to repeat if it is ever in doubt again. + +## Part 10: Flow-distance bounds and the seed side (2026-09-20) + +Until this date the harness never swept the flow-distance bound at all. +`maxDistanceKm` appeared zero times in `scripts/query-matrix.mts`, `mk()` had no +distance parameter, and M4, which the header called a distance sweep, sweeps the +`near` relationship's hop distance in miles instead. The only bounded shape the +matrix ever ran was one dashboard prebuilt inside M5. + +There was a second gap behind that one. `mk()` attached the region to block A +unconditionally, and for an upstream question the planner maps block A to the +anchor, so the anchor was always the constrained side. The join order that only +fires when the *target* is narrowed was unreachable from this harness, and so +was every bounded question that leaves block A wide open, which is the shape +users build. + +Phase MD closes both: four shapes, each bounded and unbounded, with the region +on block A and on block C, on both discovery steps. 32 rows. + +### 10.1 What the bound was doing + +Every bounded shape whose constrained side was the target failed, and the bound +was the thing breaking it. `boundedTrace` embeds its seed inside an aggregate +that sums path lengths across two closure hops, so seeding the wide-open side +sums them over the national flowline graph, all 1,506,326 facilities. The +failure is a 30s timeout in *query planning*, before execution starts, or a 4.3 +GB allocation failure. + +The isolating measurement, same bound, same target type, only the block A scope +differing: + +| Block A | Result | +| --- | --- | +| wide open | 500, tried to allocate 4.3 GB | +| scoped to York County | 1,429 rows in 4s | + +### 10.2 Before and after, warm against warm + +`ec221d9` seeds the bounded block from whichever side is constrained, the same +rule the unbounded path already followed. + +| | pre-fix warm | post-fix warm | +| --- | ---: | ---: | +| MD rows passing | 12/32 | **14/32** | + +| Row | Before | After | +| --- | --- | --- | +| `facilities upstream(30km) samples [ME on C] step1` | out of memory | **3,213 rows, 17s** | +| `samples downstream(30km) facilities [ME on A] step1` | out of memory | **3,213 rows, 15s** | +| all 8 bounded rows constrained on the anchor | unchanged | unchanged | + +0 regressed, and no row-count drift on any row that passed both times. Three +consecutive post-fix sweeps agree on every row, so run-to-run noise on this +phase is zero. + +### 10.3 Three things this phase says that a spot check did not + +**Step 0 of both fixed shapes still fails.** The fix lands on step 1 both times. +MD runs statewide Maine with no filters, where the samples projection is the +heavier half; the York County question that prompted the work passes both steps +in 20s and 3s. So "bounded upstream questions work now" is false as a general +claim, and the honest one is that the bound no longer fails *because* block A is +open. + +**`facilities upstream(30km) streams [ME on C]` did not start passing.** It +changed failure mode, from a timeout to an out-of-memory on step 0 and to a +sort-estimate timeout on step 1. + +**Wells is unchanged on all four bounded combinations**, as it was before, for +the reasons in Part 9 and W38 entry 12. + +### 10.4 The cold-cache trap, which cost three extra sweeps + +The first MD sweep was the first ever run of the phase, so every query in it +missed the engine's cache, and the sweep taken after the fix was warm. Compared +directly, that credits the fix with three flips instead of two. The extra one is +`facilities upstream samples [ME on A] step1`, which is unbounded and +anchor-constrained: the reorder cannot reach it, and its generated SPARQL is +byte-identical at 1,950 characters either side of the fix. It times out cold and +answers in 15s warm. + +The header of `query-matrix.mts` has always said results are cache-sensitive. +This is what ignoring it looks like in practice: a plausible number, in the +right direction, that attributes a cache effect to a code change. The pre-fix +engine was re-run warm into `2026-09-20-raw-e84a11f.csv`, and that file, not the +cold one, is the before-half of 10.2. The cold sweep carries a `.note` saying so. diff --git a/docs/changelog/2026-W38.md b/docs/changelog/2026-W38.md index 3a02d06..4cef85e 100644 --- a/docs/changelog/2026-W38.md +++ b/docs/changelog/2026-W38.md @@ -115,3 +115,65 @@ **A wells-upstream question was attempted and abandoned**, which is worth recording so nobody tries it again without knowing. "Maine landfills and DoD sites upstream from private wells" timed out on all four scopings measured (statewide and Penobscot-only, 10 km and 30 km), always on the wells side. The direction is not the problem: "wells downstream of landfills" builds the identical query, since the planner seeds from the filtered facilities either way. Wells as the far end of a hydrology trace is simply the expensive shape, which is why all three existing wells questions use proximity. *Files:* `src/constants/prebuiltQueries.ts`, `.github/workflows/health-check.yml` + +13. **Fixed: Two Silent Filters in the Fused Queries** (2026-09-17) + Both surfaced on "What facilities are upstream from PFOS samples?" with block A left as plain Facilities and block C set to PFOS samples in York and Cumberland counties. The question failed at step 1 with `500 out-of-memory` after 116s, sliced into its two counties, and failed both slices. + + **Join order.** `buildFusedWhereBody` always wrote the anchor block first, and an upstream question puts block A there. With no region and no industry filter on block A, the query started from every facility in the graph and traced the national flowline network looking for samples in two Maine counties. QLever does not search join orders exhaustively at these body sizes, so it follows the query text: writing the constrained side first is the whole fix, same triples and same variables in a different order. Measured across all 72 hydrology shape and config pairs: **5 rescued, 0 regressions, 0 rows lost, faster in 50 of 66 comparable runs.** The reorder is deliberately narrow, firing only when one side is narrowed and the other is wide open, because the unconditional version was measured too and rescued the same 5 while breaking 7. "Narrowed" is not "small": a county of wells is narrowed and still enormous. + + **The unit join.** `bindEntityInCell` emitted the whole observation chain whenever any sample filter was set, including `coso:measurementUnit`. A non-detect has no unit recorded, because no quantity was measured; the record carries detection limits instead. So ticking a substance silently deleted every non-detect while "Include non-detects" sat ticked, and the checkbox did nothing in either position. Cumberland PFOS: **774 of 1,688 observations** dropped, turning 23 sample points and 13 facilities into 32 and 15. The same required join hid **2,860 of 3,334 rows** in the sample popup. Non-detects are 77% of Maine's observations, so this understated PFAS presence everywhere in the app, and nothing looked broken: the map still drew, with fewer dots. Any figure taken off the app before this date understates. + + Each filter now declares the joins it actually reads. A concentration range genuinely needs the unit and keeps it; nothing ever needs the material label. Expect dashboard counts to move **up** when this deploys. That is the fix landing, not a regression. + + `scripts/check-query-joins.mts` asserts both rules on the emitted SPARQL (265 checks) and runs in CI. `docs/DEBUGGING.md` records the measurements and the two designs tried and rejected, including the sub-SELECT that rescued 5 shapes and broke 7. + + *Files:* `src/engine/templates/fusedQueries.ts`, `src/engine/templates/downstreamSamples.ts`, `scripts/check-query-joins.mts` (new), `.github/workflows/checks.yml`, `package.json`, `docs/DEBUGGING.md`, `docs/plans/active/2026-09-17-fused-seed-side-and-observation-joins.md` (new) + +14. **Fixed: The Stream Layer Drew Rivers in a Basin No Sample Drains From** (2026-09-19) + Reported by the project's PI: the same York County question drew the entire Merrimack River, which is in another state and another watershed. + + The river layer is a separate query from discovery, and it traced a one-sided transitive closure. It seeded from the cells of every resolved facility, widened each by `sfTouches`, and followed the network to its end. Nothing in it referenced the samples at all, so a facility near a drainage divide pulled in the whole neighbouring basin: **122 segments of the Merrimack, 40 of the Presumpscot, 37 of the Suncook, 21 of the Winnipesaukee** about 130 km away. + + Worth recording where it was *not*, because the first guess was wrong and cost a day. The discovery query was innocent. Filtering its own flowline set for those river names returns zero rows. Only the layer query was one-sided. + + The closure is now intersected with the flowlines that reach the resolved samples. Measured with the real answer sets (1,497 facilities, 200 sample points): **3,271 flowlines down to 2,516 in the same 7s, 755 removed and 0 added**, so the change can only subtract flowlines that were never on a path from a facility to a sample. Of those 755, 684 are in a different basin and 71 lie below a sample, the latter a deliberate behaviour change: the drawn river now stops at the sample instead of running on to the sea. If the full river to the coast is wanted back, that is one clause and a decision, not a rebuild. + + A distance bound is not a substitute and was never going to be. The shipped bounded query had been drawing a Merrimack segment straight through its own 25 km cap, because the wrong basin was inside the budget. + + Two forms were measured and rejected. The direct membership test leaves `?flowline` unbound on the left and times out at 31s; two intersected subqueries run in the original 7s. A reflexive reach adds nothing, because `hyf:downstreamFlowPathTC` is already reflexive (`X TC X` holds for 2,104 of 2,104 York County flowlines). + + **Also fixed, found while reviewing the above:** the seed-side rule from entry 13 counted `includeNondetects: true` as a filter. That is the UI's default ticked state and narrows nothing, so a samples block carrying only that was read as a narrowed side and reordered the entire query. Ticking the checkbox and un-ticking it back therefore changed the emitted SPARQL for a question that had not changed. The same "is this side narrowed" predicate also existed in three places, one of which the executor uses to pick a chunking axis, so a drift between them would have had the executor slicing on a side the query already led with. Now one definition. + + **Documented, not only fixed.** A new wiki page, [Include non-detects](https://github.com/SAWGraph/explorer-app/blob/main/docs/wiki/Samples%20Non%20Detects.md), covers what the checkbox does now that it works: it filters at two levels, so unticking removes 84 of York County's 451 sample points *and* strips 14,712 non-detect readings from popups that stay on the map. Ticked, a dot means "someone sampled here"; unticked, it means "PFAS was found here", and the absence of a dot is what misleads. `docs/ARCHITECTURE.md` gains the principle behind both this entry and entry 13: in SPARQL every required triple is also a filter, so asking for detail you do not need silently deletes the rows that lack it. + + **Known gap, measured but not fixed.** To connect an entity to a river there has to be a river in its S2 cell (about 1 km across), and often there is not, so the query widens by one ring of neighbouring cells. That widening is applied to exactly one side, and which side is an accident of how the query is written. We widen the facility side, which costs **130 York County sample points, 82 of them carrying measured PFOS detections up to 2,200 ng/L**, roughly 110x Maine's interim drinking water standard. Widening both sides in one query does not run (2.6 GB allocation failure, two formulations tried). Drafted in `docs/plans/drafts/2026-09-19-symmetric-cell-widening.md`. + + `scripts/check-flowline-scope.mts` asserts both ends of the closure are bound for all 100 shapes that draw the layer (400 checks), bounded and unbounded, and runs in CI. + + *Files:* `src/engine/templates/fusedQueries.ts`, `src/engine/planner.ts`, `src/engine/scope.ts`, `scripts/check-flowline-scope.mts` (new), `.github/workflows/checks.yml`, `package.json`, `docs/DEBUGGING.md`, `docs/ARCHITECTURE.md`, `docs/wiki/Samples Non Detects.md` (new), `docs/wiki/_Sidebar.md`, `docs/wiki/Home.md`, `docs/wiki/Dropdowns.md`, `docs/plans/drafts/2026-09-19-symmetric-cell-widening.md` (new) + +15. **Fixed: The Distance Dropdown Did Nothing on the Most Common Question Shape** (2026-09-20) + Reported while verifying the York County map with the PI's question: picking any "within N km of flow" on "what facilities are upstream from PFOS samples" returned nothing at all. Every option, 5, 10 and 30 km, both projections, six queries and six identical failures, each a 30s timeout in *query planning* rather than execution. + + The bound was not the problem. The constrained-side-first reorder from entry 13 deliberately skipped bounded queries, with a comment recording that the shape had never been measured either way. `boundedTrace` duplicates its seed inside an aggregate that sums flow-path lengths across two closure hops, so seeding the unconstrained side sums them over the national flowline graph: with block A left as plain Facilities, 1,506,326 facilities. One variable isolates it. Same bound, same target, block A wide open gives a 4.3 GB allocation failure; block A scoped to York County gives **1,429 rows in 4 seconds**. + + A bounded trace is now seeded from whichever side is constrained, the same rule everything else follows. The York question answers in **20s and 3s, 132 samples and 918 facilities**, against two timeouts before. Correctness was checked before speed: where both forms run they return identical IRI sets on both projections, the bounded answer is a strict subset of the unbounded one (918 of 1,494 facilities, 0 added), and across 5, 10, 30 and 50 km the answers nest. + + **The measurement cost more than the fix.** Three things had to be redone. Three bounded queries were first measured failing with out-of-memory while a pipeline run of ours was hammering the same endpoint. The before-and-after was first taken cold against warm, which credited the fix with three flips instead of two: the extra row is unbounded and anchor-constrained, with SPARQL byte-identical at 1,950 characters either side, timing out cold and answering in 15s warm. Re-run warm against warm, the honest number is **2 rows fixed, 0 regressed, 0 row-count drift**, identical across three consecutive sweeps. + + **Stated rather than buried:** step 0 of the statewide sweep shapes still fails, both rescued rows are step 1, and "bounded upstream questions work now" would be false. What is true is that the bound no longer fails *because* block A is open. `facilities upstream(30km) streams` changed failure mode rather than passing, and wells is unchanged on all four bounded combinations. + + Two guards were rebuilt rather than relaxed. `check-query-joins` asserted that bounded traces keep the anchor-first order, which was the defect; it now asserts the constrained-side rule and, separately, that the aggregate seeds from that side, since a query can read target-first while the cost stays where it was. `check-trace-direction` kept a string on a blacklist of reversed traces that a correctly target-seeded block also writes, so deleting it would have disarmed the only guard against the 2026-09-16 direction bug; queries naming both ends are now checked by reachability through the flow graph. Both verified by mutation. + + *Files:* `src/engine/templates/fusedQueries.ts`, `scripts/check-query-joins.mts`, `scripts/check-trace-direction.mts`, `scripts/query-matrix.mts`, `docs/query-matrix/*` (4 sweeps + a note), `docs/QUERY-MATRIX.md` (Part 10), `docs/DEBUGGING.md` + +16. **The Sweep That Could Not See the Bug, and a Snapshot Test That Was Never Committed** (2026-09-20) + Entry 15 could not be measured when it was found, because nothing in the harness could express the failing shape. `maxDistanceKm` appeared **zero times** in `scripts/query-matrix.mts`; M4, labelled a distance sweep in the header, sweeps the `near` relationship's hop distance in miles. The only bounded shape the matrix ever ran was one dashboard prebuilt. Behind that sat a second gap: `mk()` attached the region to block A unconditionally, and since the planner maps block A to the anchor for an upstream question, the anchor was always the constrained side, so the target-first join order and every question that leaves block A wide open were both unreachable. Phase MD adds the two axes, 32 rows, and measures both discovery steps rather than only the first, because at 30 km the samples projection answered while the facilities projection ran out of memory. + + Separately, `scripts/check-query-snapshots.mts` turned out to already exist, written on 2026-09-17, **untracked**, with `package.json` on another branch registering a command against a file nobody else had. It is committed here with its grid extended, because it was blind in the same two places: region placement and the flow bound. Measured on entry 15's fix, the old grid reports **1** moved shape; the extended grid reports **74**, bucketed by axis. 375 shapes now, and it is blocking in CI. + + Two things keep that snapshot readable rather than enormous. The PREFIX preamble is byte-identical in every query and was 66% of the file, so it is stripped and recorded once. Query bodies are written once each in a hash-keyed table: 375 shapes reference 2,078 step queries but only 603 distinct ones, the region-boundary query alone being identical in 373 of them. Together, 1.7MB down to 688KB, and a one-line change to a shared query stops being 373 lines of diff. + + **Known limit, recorded so it is not discovered later:** the snapshot drives everything through `planPipeline`, so it covers shapes a user can ask for and is blind to builder arguments the planner never produces. A reordering of the anchor-seeded `upstream` branch of `boundedTrace` passes all seven checks. The guarantee is "no reachable shape moved unintentionally", not "no emitted SPARQL moved". + + *Files:* `scripts/query-matrix.mts`, `scripts/check-query-snapshots.mts` (new), `scripts/__snapshots__/query-shapes.txt` (new), `package.json`, `.github/workflows/checks.yml` diff --git a/docs/plans/active/2026-09-17-fused-seed-side-and-observation-joins.md b/docs/plans/active/2026-09-17-fused-seed-side-and-observation-joins.md new file mode 100644 index 0000000..4870730 --- /dev/null +++ b/docs/plans/active/2026-09-17-fused-seed-side-and-observation-joins.md @@ -0,0 +1,318 @@ +# Seed the fused trace from the constrained side, and only join the observation detail a filter needs + +**Status**: active +**Created**: 2026-09-17 + +## Problem + +Two independent defects in `src/engine/templates/fusedQueries.ts`, both found while +running "What facilities are upstream from PFOS samples in York and Cumberland +counties (Maine)?" (facilities block empty, samples block PFOS + ME + two counties, +include non-detects on). + +**P1, seed side.** `buildFusedWhereBody` always emits the anchor block first, and +for an upstream question the planner puts block A on the anchor side +(`planner.ts:215`). Block A here has no region and no industry filter, so the query +starts from every facility in the graph and traces the national flowline network to +look for samples in two Maine counties. Measured: the pipeline fails at step 1 after +116.3s with `500 out-of-memory` ("tried to allocate 204.8 MB, only 159.3 MB +available"), retries as two county slices, and both slices fail the same way. +Wrapping the constrained side (samples + region + substance) in a sub-SELECT and +joining outward returns the answer in 18.6s cold. Full pipeline with the fix: +100.0s cold, 8.9s warm, complete. + +**P2, observation joins.** `bindEntityInCell` returns the full observation chain for +a samples block whenever `hasSampleFilters` is true, regardless of which filters are +set: `analyzedSample`, `hasResult`, `sampleOfMaterialType`, the material label, and +`coso:measurementUnit`. A substance-only filter needs two triples. Worse, the unit +join is a silent filter: a non-detect has no `coso:measurementUnit` (documented at +`samples.ts:11`, and the by-IRI templates already gate it behind `needsUnitJoin`), so +fused discovery drops non-detects even when the user asked to include them. Measured +on Cumberland PFOS observations: 1,688 observation rows, 914 with a unit, 774 +non-detect with no unit. At sample-point level on a pinned comparison case +(Cumberland, NAICS 5622) the shipped query returns 23 sample points and 13 +facilities; without the unneeded joins it returns 32 and 15, a superset with zero +losses either way. + +## Approach + +**P1: write the constrained side first in the flat body. No sub-SELECT.** + +`buildFusedWhereBody` emits the anchor block, then the trace, then the target block. +When the anchor side has no region, no block filters and no IRI pin and the target +side has at least one of those, emit the target block, then the trace, then the +anchor block. Same triples, same variables, different textual order. Nothing else +changes: no sub-SELECT, no new option on the builders, no executor retry. + +Two earlier designs were measured and rejected, in this order: + +1. *Wrap the constrained side in a sub-SELECT.* Rescues 5 shapes, breaks 7 that work + today, all `500 out-of-memory`. A sub-SELECT is an optimiser barrier in QLever: it + has to be materialised before anything joins to it and the planner cannot reorder + across it, so it forces one plan and forbids every other. +2. *Keep the sub-SELECT but project only the distinct cells, re-joining the target + entity last.* Same 7 shapes still fail, three of them degrading from OOM into 60s + timeouts. Entity multiplicity through the trace was not the cause either. + +What the measurements actually point at is that **textual triple order changes +QLever's plan for these bodies**. They run 12 to 14 triples, past the point where the +planner searches join orders exhaustively, so it falls back on something that follows +the query text. Writing the unconstrained side first is what produces the bad plan; +moving the constrained side to the top is the entire fix. + +Volume is not the discriminator, which is worth recording so nobody re-derives it. +Rows materialised through the trace, Cumberland seeds: samples + PFOS 872,385; +facilities 681,299; wells 4,183,432. The samples seed materialises more than the +facilities seed and succeeds where it fails. + +**P2: emit only the joins the active filters read.** + +Replace the all-or-nothing `hasSampleFilters` gate with a per-filter requirement set +for the IRI-finding queries: + +| filter set | joins needed | +| --- | --- | +| `substances` | `?observation coso:observedAtSamplePoint`, `coso:ofDSSToxSubstance` | +| `materialTypes` | the above + `coso:analyzedSample`, `coso:sampleOfMaterialType` | +| `minConcentration` / `maxConcentration` | + `coso:hasResult`, `qudt:quantityValue`, `coso:measurementUnit` | +| `includeNondetects: false` | + `coso:hasResult` and the non-detect binds | +| none | no observation joins (today's `sampleObservations: false`) | + +The material *label* join (`?matType rdfs:label`) is never needed for filtering, only +for display, so it goes in every discovery case. Hydrate queries keep the full block: +they project `?matTypeLabel`, `?unit` and `?result_value`. + +While in there, fix the adjacent `near` wart this exposed: `buildFusedNearQuery` +passes `anchorSampleObservations: opts.project !== 'anchor'`, so the *non-projected* +samples side keeps the whole chain even with zero filters. Verified: anchor samples +with no filters, `project: 'target'` emits the chain and the unit join. The same +per-filter rule removes it. + +## Tasks + +- [x] `fusedQueries.ts`: `sideIsConstrained` (region / block filters / IRI pin per side) and the target-first hydrology body when the anchor is unconstrained +- [x] `fusedQueries.ts`: replace the `hasSampleFilters` gate in `bindEntityInCell` with `sampleJoinsNeeded`, per-filter; hydrate callers keep the full block +- [x] `buildFusedNearQuery`: drop the `project !== side` heuristic, pass `false` for both sides +- [x] `buildEntityProbeQuery`: same lean bind, so the probe sees what discovery sees (the probe list becomes the chunk membership) +- [x] `buildSampleDetailByIriQuery`: the unit join moved after `resultValueClauses()` with the symbol lookup nested inside, so popups stop hiding non-detects +- [x] `scripts/check-query-joins.mts` (265 checks): join order across all 72 hydrology shapes x 2 projections, the pinned and distance-bounded exceptions, the per-filter join rule on hydrology and near, and that no prebuilt reorders. Wired into `package.json` and `.github/workflows/checks.yml` +- [x] `docs/DEBUGGING.md`: both bugs, with the measurements and the two rejected designs +- [ ] re-run `npm run health-check` and record the row-count movement in `docs/health/STATUS.md` +- [ ] `npm run query-matrix` sweep, then `--index`, to price both fixes across the shape space +- [ ] update `docs/QUERY-MATRIX.md` (error catalogue: the OOM that this removes) +- [ ] measure the distance-bounded shape reordered, and drop the `!maxDistanceKm` + exclusion if it holds. This is the one condition in the gate that is a "we + did not look", not a "we looked and it was worse": `boundedTrace` takes the + seed as a pre-rendered string and embeds it twice, so there was no seam to + reorder at. Left unmeasured it hardens into folklore. +- [ ] decide on the retry variant below + +## Verified after implementing (2026-09-17) + +`check-trace-direction` (2,068 checks), `check-step-labels` (651), +`check-cache-key` (19), `check-substance-labels` (13) and the new +`check-query-joins` (265) all pass. `tsc -b` clean; `npm run lint` still reports +the same 15 pre-existing component errors as the unmodified tree. + +Live, through the real builder, single-county spot checks matched the sweep +exactly where the sweep was comparable: `facilities <- facilities` 4 rows, +`waterBodies <- facilities` 146, `wells <- aquifers` 7,434. The two samples +shapes returned 307 and 351 rather than the sweep's 339 and 384, which is P2 +working: sweep 2's flat variant predated it and dropped the substance filter +entirely, so its counts were unfiltered. 307 and 351 match sweep 1, which +applied the filter. + +Popup detail on sample point 64220: **3,334 rows, 2,860 non-detect, 8.8s**, up +from 474 rows. + +**The screenshot question now answers, but not quickly.** End to end through the +pipeline: **245.5s, status success**, where before it was a hard error. It is +slow because the two-county query still exceeds the budget as one flat request +(62s timeout, reproducible), so the executor rescues it by slicing into the two +counties, and each county takes 15-16s per projection. The slices now succeed, +which is why the run completes at all; before the fix they inherited the +anchor-first order and failed too. + +## The retry variant, measured and not implemented + +The sub-SELECT was rejected as a *default* because it breaks 7 shapes. As a +*retry after a splittable failure* it cannot regress anything that succeeds, and +on this question it is worth a great deal: + +| Query | Time | Rows | +| --- | --- | --- | +| flat reorder, both counties | 62.0s timeout | fails | +| sub-SELECT, both counties | **7.3s** | 503 | +| flat reorder, Cumberland only | 15.2s | 307 | +| sub-SELECT, Cumberland only | **1.4s** | 307 | + +That is 245.5s of slice-and-retry versus one 7.3s request. It needs a +`buildRetryQuery` hook on `PipelineStep` and one branch in the executor's +failure path, ahead of `chooseAxis`. Deliberately left out of this change: it is +a new execution mechanism rather than a template fix, and it should be measured +across the shape space on its own. + +## Measured regression sweep (2026-09-17) + +All 36 hydrology entity-type pairs, two configurations each (region + filters on the +target side with the anchor wide open, and the mirror), `project: 'target'`, +Cumberland County, unbounded trace. Shipped query versus proposed query, comparing +IRI sets and time. 72 comparisons per sweep, run twice: once for the rejected +sub-SELECT design, once for the flat reorder that this plan now proposes. + +| | sub-SELECT (rejected) | flat reorder (proposed) | +| --- | ---: | ---: | +| Shipped succeeded | 66 | 66 | +| Proposed succeeded | 70 | **71** | +| Rescues (shipped failed, proposed worked) | 5 | **5** | +| Regressions (shipped worked, proposed failed) | **7** | **0** | +| Comparisons that lost a row | 0 | **0** | +| Median time change where both succeed | +48% | +9% | + +The +48% on the rejected design is inflated: several of its "wins" are shapes it then +broke. The flat reorder is faster in 50 of 66 comparable runs. + +The 5 rescues are the same in both sweeps, and they are the screenshot shape: +`samples <- facilities / waterBodies / wells / aquifers / streams [target-scoped]`. +Shipped OOMs or times out at 28.1s to 69.3s; the flat reorder answers in 7.9s to +12.8s. + +One shape fails both ways and is untouched by this plan: `wells <- wells +[target-scoped]`, ~80s timeout on both. + +The 7 shapes the sub-SELECT broke, all of which the flat reorder leaves working with +identical row sets: `facilities <- facilities`, `facilities <- aquifers`, `facilities +<- streams`, `waterBodies <- facilities`, `waterBodies <- aquifers`, `wells <- +facilities`, `wells <- aquifers`. + +Sweep 1 also confirmed P2 independently: every `X <- samples [anchor-scoped]` row +gained rows and lost none (+599 wells, +129 streams, +42 samples, +19 facilities, ++13 water bodies, +13 aquifers), which is the recovered non-detects. + +**What the sweeps do not cover**, and what the tasks above therefore still call for: +one run per combination against a memory-pressured endpoint, a single county scope, +one filter configuration, `project: 'target'` only, and no `maxDistanceKm`. Several +passing shapes land at 15-25s, close enough to the 30s ceiling that load decides the +outcome. Distance-bounded traces route through `boundedTrace`, which embeds the body +a second time and was not measured here. + +## Impact on other query shapes + +**P1 reaches 72 of the 108 shapes, but reorders almost none of them in practice.** +The edit is in the `mode !== 'near'` branch, shared by `buildFusedHydrologyQuery`, +`buildFusedWellQuery` and (via the duplicated seed) `boundedTrace`, so it covers all +36 downstream and all 36 upstream shapes including the well and flowline layers. The +36 `near` shapes take the other branch and are untouched. Whether a given question +actually changes depends on its filters, not its shape: I evaluated all eight +prebuilt dashboard questions and **none of them reorder**, because every one has a +constrained anchor (`facilities` with an industry filter, or a county). The reorder +fires for user-built questions that leave one side wide open, which is exactly the +screenshot case. + +**P2 reaches every shape with samples on a filtered side, `near` included.** +`bindEntityInCell` is shared by all three builders. Of the 108 shapes, 33 have +samples on at least one side. Row counts move upward wherever a substance-only or +material-only filter is set, because those questions stop dropping non-detects. Of +the prebuilt questions only `facilities-upstream-pfhpa-gw-cumberland` carries sample +filters, and it sets a 10-1000 ng/L range, so it keeps the unit join and its counts +should not move at all. The `near` cleanup was measured on +`samples-near-agchem-maine`: 5 facilities shipped, 5 facilities trimmed, 8.05s vs +7.74s, so no movement there either. + +**P2 does not reintroduce the OOM the old note feared.** The `ponytail` comment at +`fusedQueries.ts:90` says dropping the unit join "triples the matched rows and the +endpoint OOMs on statewide pipelines". Re-measured on a statewide Maine PFOS +downstream question: shipped asks for 825.6 MB (project=target) / 712.1 MB +(project=anchor) and OOMs; trimmed asks for 409.6 MB and still OOMs. Trimming +*lowers* the peak allocation. The statewide shape fails either way, which is a +chunking problem, not this one. The comment should be replaced with these numbers. + +**Chunking behaviour is unchanged.** Both fixes are template-level. `chooseAxis`, +`halve` and the step budget keep working as they do now; P1 only makes the whole +query succeed more often, so slicing runs less. + +## Are we making the P2 mistake anywhere else? + +Audited every site that touches the sample observation chain. + +1. **`downstreamSamples.ts:97`, `buildSampleDetailByIriQuery` (popup detail): yes, + same bug, larger effect.** `?result coso:measurementUnit ?unit .` is required, so + the observation table in a sample popup silently omits every non-detect. Measured + on `me-egad-data#d.egad.samplePoint.64220`: **474 rows as shipped, 3,334 rows with + the unit join made optional, of which 2,860 are non-detects**. The naive fix + (`OPTIONAL { ?result coso:measurementUnit ?unit }` in place) OOMs at 819.7 MB. + Moving the join after `resultValueClauses()` and nesting the symbol lookup inside + it works at the same cost as today: 6.88s vs 6.59s, 3,334 rows. Worth doing in + this plan or immediately after it. +2. **`downstreamSamples.ts:40`, `buildSampleRetrievalByIriQuery` (sample hydration): + correct already.** Gated behind `needsUnitJoin(filters)`. Its other required joins + are legitimate: hydration lost exactly 1 of 547 discovered sample points in the + measured run, and that point has no `geo:asWKT` at all, so it cannot be drawn. +3. **`regions.ts` discovery queries (substance, material, county, industry dropdowns): + clean.** None of them join `coso:measurementUnit` or `coso:hasResult`; the + substance and material counts shown in the dropdowns are not deflated. +4. **`hydrate.ts` facility / water body / stream / aquifer queries: no observation + joins.** `buildFacilitiesByIri` does require `rdfs:label` on both the facility and + its industry code, which would drop an unlabelled facility; not observed in this + run and out of scope here. + +## The same class of bug elsewhere (measured 2026-09-17) + +Beyond the observation chain, every required (non-`OPTIONAL`) join in the templates +was checked against live per-entity coverage in Cumberland County and statewide +Maine. Three findings, one of them larger than P2. + +**1. The facility layer shows about a quarter of the facilities it could.** +`buildFacilitiesByIri` (`hydrate.ts:15`) and the facilities branch of +`bindEntityInCell` both require `fio:ofIndustry` and `?industryCode a +naics:NAICS-IndustryCode`, whether or not the user picked an industry. Maine, cells +to layer: + +| Required joins, cumulative | Facilities | +| --- | ---: | +| `fio:Facility` in ME S2 cells | 11,954 | +| + `geo:asWKT` (legitimate, cannot map without it) | 10,164 | +| + `rdfs:label` | 10,164 | +| + `fio:ofIndustry` | 3,601 | +| + `?ic a naics:NAICS-IndustryCode` | 2,718 | +| + `?ic rdfs:label` (what we ship) | 2,718 | + +So the industry-code requirement costs **7,446 of 10,164 mappable Maine facilities, +73%**. Cumberland alone: 2,595 in cells, 2,203 mappable, 603 shipped. The excluded +ones are not junk records: sampling them returns SEBAGO LAKE WATER TREATMENT +FACILITY, AMERICOLD LOGISTICS PLANT # 80573, KOCH MATERIALS. A water treatment plant +is exactly what a PFAS question is looking for. + +Both label joins are free (100% of geometry-carrying facilities have them), so they +are waste rather than a filter, and the NAICS type assertion costs a further 883 on +its own. Fixing this is a bigger behaviour change than P2 and deserves its own plan, +but it is the same mistake: a join added for display or for a filter that is not set. + +**2. `?s2cell` is projected by three hydrate queries and read by nothing.** +`buildFacilitiesByIri`, `buildSampleRetrievalByIriQuery` and `buildWaterBodiesByIri` +all select it; grep finds no consumer outside `templates/` and `engine/scope.ts`. +Its join is required, so it filters, and because it appears in `DISTINCT` / +`GROUP BY`, an entity touching several cells is returned several times. + +**3. Two suspects came back clean, worth recording so nobody re-checks them.** +Flowline `nhdplusv2:hasFTYPE` and geometry are at **434,501 of 434,501** graph-wide, +so requiring them costs nothing. Sample-side labels are complete too: of 576 +Cumberland sample points, 575 have geometry, 571 have an observation, and all 571 +have the lab-sample label, material type, material label and `coso:fromSamplePoint` +that the hydrate and detail queries require. The one sample point the pipeline drops +has no `geo:asWKT` at all. + +## Notes + +- Equivalence evidence for P1: on a pinned case the current template survives + (Cumberland, NAICS 5622), current and reordered return identical IRI sets both ways + when the observation joins are held constant (23 samples / 13 facilities, zero + diff). That is the check to re-run after implementing, since it separates P1 from + P2. +- Endpoint capacity is volatile. One repeat of the two-county query OOM'd trying to + allocate 1.6 MB, and York alone measured 9.5s standalone but 2.4s after Cumberland + warmed the shared sub-results. Treat single cold timings as plus or minus 10s, and + re-measure warm and cold separately. +- The screenshot question returns 3,013 facilities for two counties because block A + has no industry filter. Correct, but it is also 4 flowline batches and 37s of the + 100s cold run. Not part of this plan. diff --git a/docs/plans/drafts/2026-09-19-symmetric-cell-widening.md b/docs/plans/drafts/2026-09-19-symmetric-cell-widening.md new file mode 100644 index 0000000..49fa277 --- /dev/null +++ b/docs/plans/drafts/2026-09-19-symmetric-cell-widening.md @@ -0,0 +1,220 @@ +# Apply the one-cell widening to both sides of a hydrology trace, not whichever side is written second + +**Status**: draft +**Created**: 2026-09-19 + +## Problem + +Entities link to S2 Level-13 cells (~1 km square). Flowlines link to cells. To +connect a facility or a sample to the river network, a flowline has to be in +that entity's cell. Frequently there is none: the sample sits 400 m from the +river, on the far side of a cell boundary. + +`buildFusedWhereBody` papers over this with a one-ring expansion, +`kwg-ont:sfTouches | owl:sameAs`. The defect is that it applies the expansion to +**exactly one side**, and which side is an artefact of query construction rather +than a modelling decision. Whichever side is not widened silently loses every +entity whose own cell happens to contain no flowline. + +Measured in York County (federation, 2026-09-19): + +| Side | Total | Flowline in own cell | Within one ring | Lost if not widened | +| --- | ---: | ---: | ---: | ---: | +| PFOS sample points | 361 | 282 (78%) | 360 (99.7%) | **78 (22%)** | +| Facilities | 1,639 | 1,343 (82%) | 1,632 (99.6%) | **289 (18%)** | + +So roughly one entity in five, on each side, is invisible to the trace without +the expansion. The gap is about the same size on both sides, which is why the +choice of side moves the answer so hard. + +Measured on "What facilities are upstream from PFOS samples?" (block A +facilities, unconstrained; block C samples, PFOS, York County ME), with the +observation chain trimmed on both variants so the non-detect bug of +`2026-09-17-fused-seed-side-and-observation-joins.md` is not confounding it: + +| Variant | Sample points | Facilities | +| --- | ---: | ---: | +| Widen the sample side | **324** | 1,060 | +| Widen the facility side (shipped) | 200 | **1,497** | +| Union of the two | **330** | **1,507** | + +Each variant rescues its own widened side and drops about a fifth of the other. + +The sample-side variant is the form the project's PI independently arrived at +while trying to fix an unrelated symptom, so this is not a hypothetical +preference: two people writing the same query reached for the expansion on +different sides, which is the clearest evidence that the current placement is +undocumented and accidental. + +## What the missing data actually is + +Of the 130 sample points the shipped query drops: + +| | Extra 130 | Shipped 200 | +| --- | ---: | ---: | +| Points with quantified PFOS detections | **82** | 132 | +| Detect observations | **139** | 370 | +| Points with non-detects | 58 | n/a | +| Max concentration | 2,200 ng/L | 7,400 ng/L | + +Sample points carrying a confirmed PFOS detection go from **132 to 214, up +62%**. The dropped points do not hold the single highest reading, but 2,200 +ng/L is roughly 110x Maine's 20 ng/L interim drinking water standard, so these +are not marginal traces. + +On the facility side the union adds only 10, because that side is already the +widened one. Effectively all of the recovery is on samples. + +Worth stating plainly for review: the 1 km approximation is **already +accepted** on the facility side. Applying it to the sample side introduces no +new assumption, it applies the existing one consistently. + +## Approach + +Run both variants and union the results. This is an **executor** change, not a +template fix: the SPARQL text of each variant already works, what is missing is +a pipeline that issues both and merges. + +The executor already merges slice results as a set, deduping on +`JSON.stringify(row)` (`src/engine/scope.ts`), so the merge path exists. What is +new is issuing a second variant of the same step deliberately rather than as a +failure retry. + +Sketch, to be firmed up during implementation: + +- `buildFusedWhereBody` takes a `widen: 'anchor' | 'target'` option. Default + `'anchor'`, which is today's behaviour, so nothing moves until the executor + asks for the second form. +- `PipelineStep` gains a way to declare a second query variant for the same + step, distinct from `initialScopes` (which splits one query) and from the + deferred `buildRetryQuery` hook (which replaces a failed query). +- The executor issues both, unions the row sets, and reports one step. + +## Tasks + +1. Add the `widen` option to `buildFusedWhereBody` and thread it through + `buildFusedHydrologyQuery` and `buildFusedWellQuery`. Default preserves + current output; assert that in `scripts/check-query-joins.mts`. + **Restructure the body emission first.** `buildFusedWhereBody` currently + writes the whole body out twice, once anchor-first and once target-first, + with the streams-target case spelled in both. Adding `widen` on top of that + gives 2 orders x 2 widen sides = four hand-maintained renderings of the same + triples. Emitting from an ordered list of named fragments (`anchorSide`, + `hop`, `trace`, `targetSide`) with `lead` and `widen` deciding order and ring + placement makes it one definition. Output equality is checkable by diffing + generated SPARQL for all 72 shapes before and after, which the check scripts + already build. Doing this as part of task 1 is much cheaper than doing it + after. +2. Bound `targetReachClause` by the target *region* rather than the IRI list + when the list exceeds a threshold. Today it inlines the entire resolved + target set into one `VALUES` with no cap and, unlike `anchorIris`, cannot be + sliced: `anchorIris` partitions the answer (union of slices = whole) while + `targetIris` is a bound (each slice is wrong on its own). A question + resolving a few thousand targets puts that whole list in the request body + with no `divide` to rescue it. This is a latent hard failure, not a slow + path. +3. Decide the variant mechanism on `PipelineStep` and whether it shares + machinery with the deferred retry hook. See "Sequencing" below. +4. Executor: issue both variants, union, single step report. Partial failure of + one variant should degrade to the other's rows rather than failing the step, + matching how the flowline layer is already `optional`. +5. Extend `scripts/check-flowline-scope.mts` or add a sibling check asserting + both variants are emitted for all 72 hydrology shapes. +6. Re-run `npm run query-matrix` in engine mode and commit a dated CSV. Counts + will move upward across hydrology shapes; the sweep is how that is recorded + rather than discovered later. +7. Update `docs/QUERY-MATRIX.md` Part 3.2/3.3 costs, and `docs/SCHEMA.md` with + the cell-coverage numbers above, which are not currently written down + anywhere. + +## Impact on other query shapes + +**72 hydrology shapes. Zero `near` shapes.** Verified by building +`FIND_TARGET_IRIS` for all 108 shapes and grepping the emitted SPARQL: all 72 +downstream/upstream shapes emit +`kwg-ont:sfTouches | owl:sameAs ?s2neighbor`, none of the 36 `near` shapes do. +`near` uses the explicit user-chosen hop count (`neighborPath`), a different +mechanism that is not affected. + +Counts move **upward only** on the affected shapes, the same direction and for +the same class of reason as the non-detect fix in +`2026-09-17-fused-seed-side-and-observation-joins.md`. Dashboard and prebuilt +numbers will change. That is the fix landing, not a new defect. + +## Cost + +Three runs of each query, warm endpoint, federation: + +| Query | Run 1 | Run 2 | Run 3 | +| --- | ---: | ---: | ---: | +| Shipped, samples | 30.4s | 26.6s | 15.1s | +| Shipped, facilities | 15.4s | 14.4s | 18.1s | +| Sample-widened, samples | 19.2s | **1.4s** | **1.3s** | +| Sample-widened, facilities | 2.3s | **1.2s** | **1.4s** | + +Added cost is roughly **2 to 3 seconds**, not double, because the second +variant caches and the shipped one does not. QLever caches result sets up to a +size limit and the shipped form's intermediates appear to exceed it. That +pattern held across three runs of four queries but has not been confirmed +against QLever's cache configuration, so it should not be relied on until +someone checks it deliberately. + +## Rejected: widen both sides inside one query + +This is the theoretically correct form and it does not run. Two formulations +tried on the York question, both against federation: + +1. Flat, expansion on both sides in one body: `500`, "tried to allocate 2.6 GB, + but only 2.3 GB were available". The facility projection separately timed out + on "Join on ?s2flcell". +2. Target cell set materialised first in a `SELECT DISTINCT` sub-SELECT, then + expanded outward: same 2.6 GB allocation failure at 21s. + +The cell-by-flowline join is what blows up, and restructuring the query text +does not avoid it. This is why the approach above is a union of two queries +rather than one correct query. + +## Open questions + +1. **The union is an approximation.** It misses pairs where the sample *and* + the facility both need widening simultaneously. If the two are independent + that is roughly 4% of pairs, but this is an estimate and it **cannot be + validated**, because the true both-sides query does not run. Whether that is + acceptable is a call for the PI, not the engine. +2. **Is one ring the right radius?** Nothing measured justifies one hop over + two. One ring reaches 99.7% of samples and 99.6% of facilities in York, so + the marginal return looks small, but that is one county. +3. **The real fix may be upstream of the app.** Precomputing an + entity-to-nearest-flowline link in the graph would remove the cell-ring + guessing entirely and be exact rather than a 1 km approximation. That is a + graph-build change and a conversation with whoever maintains it, but it would + retire this plan rather than refine it. + +## Sequencing + +This is the second executor change queued against the same code path. The other +is the retry hook in +`2026-09-17-fused-seed-side-and-observation-joins.md` ("The retry variant, +measured and not implemented"), which needs `buildRetryQuery` on `PipelineStep` +and one branch in the executor's failure path. + +Both add a second query for one step. They should be designed together so the +codebase gets one mechanism rather than two similar ones, even if they ship +separately. + +Prerequisite: PR #55 (seed side and observation joins) and PR #56 (flowline +layer bounded at both ends) should merge first. The measurements above were all +taken on top of both. + +## Notes + +All figures measured against `https://apps.okn.us/federation/sparql` on +2026-09-19, on the branch carrying #55 and #56. + +Two measurement traps hit while producing these numbers, both worth knowing +before re-running any of this: QLever returned wrong results for nested +`OPTIONAL` blocks containing a `BIND` (a detect count came back 0 alongside a +non-zero `MAX` over the same variable), and it silently under-reported on an +`OPTIONAL` used to test predicate coverage. Every figure here was re-derived +with flat, separate `COUNT` queries. The same trap is already recorded against +aggregates over `UNION` at `fusedQueries.ts:222`. diff --git a/docs/query-matrix/2026-09-20-raw-002e529.csv b/docs/query-matrix/2026-09-20-raw-002e529.csv new file mode 100644 index 0000000..dbcbcf6 --- /dev/null +++ b/docs/query-matrix/2026-09-20-raw-002e529.csv @@ -0,0 +1,33 @@ +runAt,commit,matrix,label,blockA,rel,hops,blockC,region,filters,step,endpoint,status,ms,rows,bytes,errorClass,errorMsg +2026-09-20T03:36,002e529,MD,"facilities upstream samples [ME on A] step0",facilities,upstream,,samples,ME on A,"none",FIND_TARGET_IRIS,federation,429,30442,0,111431,timeout-30s,"Operation timed out. Last operation: Join on ?ds_flowline" +2026-09-20T03:36,002e529,MD,"facilities upstream samples [ME on A] step1",facilities,upstream,,samples,ME on A,"none",FIND_ANCHOR_IRIS,federation,429,32609,0,111600,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T03:36,002e529,MD,"facilities upstream samples [ME on C] step0",facilities,upstream,,samples,ME on C,"none",FIND_TARGET_IRIS,federation,429,39826,0,108007,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:36,002e529,MD,"facilities upstream samples [ME on C] step1",facilities,upstream,,samples,ME on C,"none",FIND_ANCHOR_IRIS,federation,500,32117,0,108455,engine-oom,"Tried to allocate 1.7 GB, but only 499.5 MB were available" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) samples [ME on A] step0",facilities,upstream,,samples,ME on A,"30km",FIND_TARGET_IRIS,federation,200,22993,2399,238993,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) samples [ME on A] step1",facilities,upstream,,samples,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,8647,2523,244781,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) samples [ME on C] step0",facilities,upstream,,samples,ME on C,"30km",FIND_TARGET_IRIS,federation,429,30370,0,479268,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) samples [ME on C] step1",facilities,upstream,,samples,ME on C,"30km",FIND_ANCHOR_IRIS,federation,500,21553,0,479800,engine-oom,"Tried to allocate 2.1 GB, but only 1.2 GB were available" +2026-09-20T03:36,002e529,MD,"facilities upstream streams [ME on A] step0",facilities,upstream,,streams,ME on A,"none",FIND_TARGET_IRIS,federation,200,16106,9632,749884,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream streams [ME on A] step1",facilities,upstream,,streams,ME on A,"none",FIND_ANCHOR_IRIS,federation,200,1117,2858,277276,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream streams [ME on C] step0",facilities,upstream,,streams,ME on C,"none",FIND_TARGET_IRIS,federation,200,17928,9502,739652,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream streams [ME on C] step1",facilities,upstream,,streams,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,3760,4056,393482,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) streams [ME on A] step0",facilities,upstream,,streams,ME on A,"30km",FIND_TARGET_IRIS,federation,200,12374,9110,709410,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) streams [ME on A] step1",facilities,upstream,,streams,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,1583,2858,277276,ok,"" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) streams [ME on C] step0",facilities,upstream,,streams,ME on C,"30km",FIND_TARGET_IRIS,federation,429,32002,0,479100,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) streams [ME on C] step1",facilities,upstream,,streams,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,31369,0,478927,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T03:36,002e529,MD,"facilities upstream wells [ME on A] step0",facilities,upstream,,wells,ME on A,"none",FIND_TARGET_IRIS,federation,429,31171,0,117042,timeout-30s,"Operation timed out. Last operation: Join on ?ds_flowline" +2026-09-20T03:36,002e529,MD,"facilities upstream wells [ME on A] step1",facilities,upstream,,wells,ME on A,"none",FIND_ANCHOR_IRIS,federation,500,19623,0,117156,engine-oom,"Tried to allocate 1.6 GB, but only 911.8 MB were available" +2026-09-20T03:36,002e529,MD,"facilities upstream wells [ME on C] step0",facilities,upstream,,wells,ME on C,"none",FIND_TARGET_IRIS,federation,429,36758,0,111550,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:36,002e529,MD,"facilities upstream wells [ME on C] step1",facilities,upstream,,wells,ME on C,"none",FIND_ANCHOR_IRIS,federation,429,31463,0,111552,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) wells [ME on A] step0",facilities,upstream,,wells,ME on A,"30km",FIND_TARGET_IRIS,federation,429,30384,0,527792,timeout-30s,"Operation timed out. Last operation: Join on ?s2target" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) wells [ME on A] step1",facilities,upstream,,wells,ME on A,"30km",FIND_ANCHOR_IRIS,federation,429,31207,0,532435,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) wells [ME on C] step0",facilities,upstream,,wells,ME on C,"30km",FIND_TARGET_IRIS,federation,429,30329,0,522447,timeout-30s,"Operation timed out. Last operation: Join on ?s2anchor" +2026-09-20T03:36,002e529,MD,"facilities upstream(30km) wells [ME on C] step1",facilities,upstream,,wells,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,30501,0,527948,timeout-30s,"Operation timed out. Last operation: Join on ?upstream_flowline" +2026-09-20T03:36,002e529,MD,"samples downstream facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"none",FIND_TARGET_IRIS,federation,500,23256,0,108086,engine-oom,"Tried to allocate 2.6 GB, but only 2.4 GB were available" +2026-09-20T03:36,002e529,MD,"samples downstream facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"none",FIND_ANCHOR_IRIS,federation,429,31284,0,107969,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:36,002e529,MD,"samples downstream facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"none",FIND_TARGET_IRIS,federation,429,33385,0,111524,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T03:36,002e529,MD,"samples downstream facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,25171,2652,257294,ok,"" +2026-09-20T03:36,002e529,MD,"samples downstream(30km) facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"30km",FIND_TARGET_IRIS,federation,429,34451,0,478801,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?_flMid" +2026-09-20T03:36,002e529,MD,"samples downstream(30km) facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"30km",FIND_ANCHOR_IRIS,federation,500,27607,0,479804,engine-oom,"Tried to allocate 2.1 GB, but only 1.2 GB were available" +2026-09-20T03:36,002e529,MD,"samples downstream(30km) facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"30km",FIND_TARGET_IRIS,federation,200,22430,2399,238993,ok,"" +2026-09-20T03:36,002e529,MD,"samples downstream(30km) facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"30km",FIND_ANCHOR_IRIS,federation,200,8317,2523,244781,ok,"" diff --git a/docs/query-matrix/2026-09-20-raw-002e529.csv.note b/docs/query-matrix/2026-09-20-raw-002e529.csv.note new file mode 100644 index 0000000..357b69e --- /dev/null +++ b/docs/query-matrix/2026-09-20-raw-002e529.csv.note @@ -0,0 +1,7 @@ +**Cold. Do not diff this against a later sweep on its own.** This was the first +MD sweep ever run, so every query in it missed the engine's cache, and the three +sweeps taken after it were all warm. One row moves on that difference alone: +`facilities upstream samples [ME on A] step1` times out here and answers in 15s +warm, with the generated SPARQL byte-identical (1,950 chars either side of +`ec221d9`). Read against `2026-09-20-raw-e84a11f.csv`, which re-runs the same +pre-fix engine warm, and is the honest before-half of that comparison. diff --git a/docs/query-matrix/2026-09-20-raw-e84a11f.csv b/docs/query-matrix/2026-09-20-raw-e84a11f.csv new file mode 100644 index 0000000..4867230 --- /dev/null +++ b/docs/query-matrix/2026-09-20-raw-e84a11f.csv @@ -0,0 +1,33 @@ +runAt,commit,matrix,label,blockA,rel,hops,blockC,region,filters,step,endpoint,status,ms,rows,bytes,errorClass,errorMsg +2026-09-20T04:57,4454b80,MD,"facilities upstream samples [ME on A] step0",facilities,upstream,,samples,ME on A,"none",FIND_TARGET_IRIS,federation,429,35192,0,111567,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T04:57,4454b80,MD,"facilities upstream samples [ME on A] step1",facilities,upstream,,samples,ME on A,"none",FIND_ANCHOR_IRIS,federation,200,15049,2652,257294,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream samples [ME on C] step0",facilities,upstream,,samples,ME on C,"none",FIND_TARGET_IRIS,federation,429,35304,0,108006,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"facilities upstream samples [ME on C] step1",facilities,upstream,,samples,ME on C,"none",FIND_ANCHOR_IRIS,federation,429,31895,0,107974,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) samples [ME on A] step0",facilities,upstream,,samples,ME on A,"30km",FIND_TARGET_IRIS,federation,200,22272,2399,238993,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) samples [ME on A] step1",facilities,upstream,,samples,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,8737,2523,244781,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) samples [ME on C] step0",facilities,upstream,,samples,ME on C,"30km",FIND_TARGET_IRIS,federation,429,30365,0,479272,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) samples [ME on C] step1",facilities,upstream,,samples,ME on C,"30km",FIND_ANCHOR_IRIS,federation,500,22988,0,479803,engine-oom,"Tried to allocate 2.1 GB, but only 1.2 GB were available" +2026-09-20T04:57,4454b80,MD,"facilities upstream streams [ME on A] step0",facilities,upstream,,streams,ME on A,"none",FIND_TARGET_IRIS,federation,200,15741,9632,749884,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream streams [ME on A] step1",facilities,upstream,,streams,ME on A,"none",FIND_ANCHOR_IRIS,federation,200,1336,2858,277276,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream streams [ME on C] step0",facilities,upstream,,streams,ME on C,"none",FIND_TARGET_IRIS,federation,200,17914,9502,739652,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream streams [ME on C] step1",facilities,upstream,,streams,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,3546,4056,393482,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) streams [ME on A] step0",facilities,upstream,,streams,ME on A,"30km",FIND_TARGET_IRIS,federation,200,11490,9110,709410,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) streams [ME on A] step1",facilities,upstream,,streams,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,1555,2858,277276,ok,"" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) streams [ME on C] step0",facilities,upstream,,streams,ME on C,"30km",FIND_TARGET_IRIS,federation,429,31331,0,479098,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) streams [ME on C] step1",facilities,upstream,,streams,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,31126,0,478929,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T04:57,4454b80,MD,"facilities upstream wells [ME on A] step0",facilities,upstream,,wells,ME on A,"none",FIND_TARGET_IRIS,federation,429,30580,0,117034,timeout-30s,"Operation timed out. Last operation: Join on ?ds_flowline" +2026-09-20T04:57,4454b80,MD,"facilities upstream wells [ME on A] step1",facilities,upstream,,wells,ME on A,"none",FIND_ANCHOR_IRIS,federation,500,18201,0,117149,engine-oom,"Tried to allocate 1.6 GB, but only 911.8 MB were available" +2026-09-20T04:57,4454b80,MD,"facilities upstream wells [ME on C] step0",facilities,upstream,,wells,ME on C,"none",FIND_TARGET_IRIS,federation,429,35003,0,111544,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"facilities upstream wells [ME on C] step1",facilities,upstream,,wells,ME on C,"none",FIND_ANCHOR_IRIS,federation,429,35129,0,111554,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) wells [ME on A] step0",facilities,upstream,,wells,ME on A,"30km",FIND_TARGET_IRIS,federation,429,30727,0,524032,timeout-30s,"Operation timed out. Last operation: GroupBy on ?_flEnd ?upstream_flowline" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) wells [ME on A] step1",facilities,upstream,,wells,ME on A,"30km",FIND_ANCHOR_IRIS,federation,429,30515,0,532240,timeout-30s,"Operation timed out. Last operation: Join on ?upstream_flowline" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) wells [ME on C] step0",facilities,upstream,,wells,ME on C,"30km",FIND_TARGET_IRIS,federation,429,31265,0,521767,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"facilities upstream(30km) wells [ME on C] step1",facilities,upstream,,wells,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,30485,0,526100,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"samples downstream facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"none",FIND_TARGET_IRIS,federation,500,26885,0,108100,engine-oom,"Tried to allocate 2.6 GB, but only 1.5 GB were available" +2026-09-20T04:57,4454b80,MD,"samples downstream facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"none",FIND_ANCHOR_IRIS,federation,429,31087,0,107966,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T04:57,4454b80,MD,"samples downstream facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"none",FIND_TARGET_IRIS,federation,429,33932,0,111521,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T04:57,4454b80,MD,"samples downstream facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,15537,2652,257294,ok,"" +2026-09-20T04:57,4454b80,MD,"samples downstream(30km) facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"30km",FIND_TARGET_IRIS,federation,429,30809,0,478795,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?_flMid" +2026-09-20T04:57,4454b80,MD,"samples downstream(30km) facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"30km",FIND_ANCHOR_IRIS,federation,500,27170,0,479799,engine-oom,"Tried to allocate 2.1 GB, but only 1.2 GB were available" +2026-09-20T04:57,4454b80,MD,"samples downstream(30km) facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"30km",FIND_TARGET_IRIS,federation,200,22030,2399,238993,ok,"" +2026-09-20T04:57,4454b80,MD,"samples downstream(30km) facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"30km",FIND_ANCHOR_IRIS,federation,200,8022,2523,244781,ok,"" diff --git a/docs/query-matrix/2026-09-20-raw-ec221d9.csv b/docs/query-matrix/2026-09-20-raw-ec221d9.csv new file mode 100644 index 0000000..ab2e982 --- /dev/null +++ b/docs/query-matrix/2026-09-20-raw-ec221d9.csv @@ -0,0 +1,33 @@ +runAt,commit,matrix,label,blockA,rel,hops,blockC,region,filters,step,endpoint,status,ms,rows,bytes,errorClass,errorMsg +2026-09-20T03:59,ec221d9,MD,"facilities upstream samples [ME on A] step0",facilities,upstream,,samples,ME on A,"none",FIND_TARGET_IRIS,federation,429,34883,0,111567,timeout-30s,"Operation timed out. Last operation: Sort (internal order) on ?s2anchor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream samples [ME on A] step1",facilities,upstream,,samples,ME on A,"none",FIND_ANCHOR_IRIS,federation,200,15632,2652,257294,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream samples [ME on C] step0",facilities,upstream,,samples,ME on C,"none",FIND_TARGET_IRIS,federation,429,32842,0,108003,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream samples [ME on C] step1",facilities,upstream,,samples,ME on C,"none",FIND_ANCHOR_IRIS,federation,429,33502,0,107965,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) samples [ME on A] step0",facilities,upstream,,samples,ME on A,"30km",FIND_TARGET_IRIS,federation,200,23001,2399,238993,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) samples [ME on A] step1",facilities,upstream,,samples,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,9362,2523,244781,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) samples [ME on C] step0",facilities,upstream,,samples,ME on C,"30km",FIND_TARGET_IRIS,federation,429,30290,0,366814,timeout-30s,"Operation timed out. Last operation: Join on ?s2anchor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) samples [ME on C] step1",facilities,upstream,,samples,ME on C,"30km",FIND_ANCHOR_IRIS,federation,200,17243,3213,311711,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream streams [ME on A] step0",facilities,upstream,,streams,ME on A,"none",FIND_TARGET_IRIS,federation,200,15779,9632,749884,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream streams [ME on A] step1",facilities,upstream,,streams,ME on A,"none",FIND_ANCHOR_IRIS,federation,200,1242,2858,277276,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream streams [ME on C] step0",facilities,upstream,,streams,ME on C,"none",FIND_TARGET_IRIS,federation,200,11135,9502,739652,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream streams [ME on C] step1",facilities,upstream,,streams,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,3565,4056,393482,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) streams [ME on A] step0",facilities,upstream,,streams,ME on A,"30km",FIND_TARGET_IRIS,federation,200,11488,9110,709410,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) streams [ME on A] step1",facilities,upstream,,streams,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,1433,2858,277276,ok,"" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) streams [ME on C] step0",facilities,upstream,,streams,ME on C,"30km",FIND_TARGET_IRIS,federation,500,23847,0,360813,engine-oom,"Tried to allocate 3.9 GB, but only 2.6 GB were available" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) streams [ME on C] step1",facilities,upstream,,streams,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,30612,0,361262,timeout-sort-estimate,"Sort operation was canceled, because time estimate exceeded remaining time by a factor of 3 Last operation: Sort (internal order) on ?_flEnd ?ds_flowline" +2026-09-20T03:59,ec221d9,MD,"facilities upstream wells [ME on A] step0",facilities,upstream,,wells,ME on A,"none",FIND_TARGET_IRIS,federation,429,30551,0,117000,timeout-30s,"Operation timed out. Last operation: Join on ?ds_flowline" +2026-09-20T03:59,ec221d9,MD,"facilities upstream wells [ME on A] step1",facilities,upstream,,wells,ME on A,"none",FIND_ANCHOR_IRIS,federation,500,17749,0,117117,engine-oom,"Tried to allocate 1.6 GB, but only 911.8 MB were available" +2026-09-20T03:59,ec221d9,MD,"facilities upstream wells [ME on C] step0",facilities,upstream,,wells,ME on C,"none",FIND_TARGET_IRIS,federation,429,34370,0,111544,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream wells [ME on C] step1",facilities,upstream,,wells,ME on C,"none",FIND_ANCHOR_IRIS,federation,429,34232,0,111553,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) wells [ME on A] step0",facilities,upstream,,wells,ME on A,"30km",FIND_TARGET_IRIS,federation,429,30417,0,532214,timeout-30s,"Operation timed out. Last operation: Join on ?upstream_flowline" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) wells [ME on A] step1",facilities,upstream,,wells,ME on A,"30km",FIND_ANCHOR_IRIS,federation,429,31453,0,532547,timeout-30s,"Operation timed out. Last operation: Join on ?s2anchor" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) wells [ME on C] step0",facilities,upstream,,wells,ME on C,"30km",FIND_TARGET_IRIS,federation,429,30844,0,415612,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T03:59,ec221d9,MD,"facilities upstream(30km) wells [ME on C] step1",facilities,upstream,,wells,ME on C,"30km",FIND_ANCHOR_IRIS,federation,429,30814,0,415634,timeout-30s,"Operation timed out. Last operation: Join on ?_flMid" +2026-09-20T03:59,ec221d9,MD,"samples downstream facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"none",FIND_TARGET_IRIS,federation,429,31277,0,108000,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"samples downstream facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"none",FIND_ANCHOR_IRIS,federation,429,31232,0,107964,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"samples downstream facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"none",FIND_TARGET_IRIS,federation,429,30242,0,111522,timeout-30s,"Operation timed out. Last operation: Join on ?s2anchor" +2026-09-20T03:59,ec221d9,MD,"samples downstream facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"none",FIND_ANCHOR_IRIS,federation,200,3934,2652,257294,ok,"" +2026-09-20T03:59,ec221d9,MD,"samples downstream(30km) facilities [ME on A] step0",samples,downstream,,facilities,ME on A,"30km",FIND_TARGET_IRIS,federation,429,30332,0,368309,timeout-30s,"Operation timed out. Last operation: Join on ?s2neighbor" +2026-09-20T03:59,ec221d9,MD,"samples downstream(30km) facilities [ME on A] step1",samples,downstream,,facilities,ME on A,"30km",FIND_ANCHOR_IRIS,federation,200,15649,3213,311711,ok,"" +2026-09-20T03:59,ec221d9,MD,"samples downstream(30km) facilities [ME on C] step0",samples,downstream,,facilities,ME on C,"30km",FIND_TARGET_IRIS,federation,200,19627,2399,238993,ok,"" +2026-09-20T03:59,ec221d9,MD,"samples downstream(30km) facilities [ME on C] step1",samples,downstream,,facilities,ME on C,"30km",FIND_ANCHOR_IRIS,federation,200,8464,2523,244781,ok,"" diff --git a/docs/query-matrix/README.md b/docs/query-matrix/README.md index 2ad26a5..427f9e2 100644 --- a/docs/query-matrix/README.md +++ b/docs/query-matrix/README.md @@ -16,12 +16,23 @@ engine change. The two are not comparable row for row. | Sweep | Mode | Commit | Shapes | Pass | Fail | Since the previous sweep | | --- | --- | --- | ---: | ---: | ---: | --- | +| [`2026-09-20`](./2026-09-20-raw-e84a11f.csv) | raw | `e84a11f` | 32 | 12 | 20 | **2 broke** (facilities upstream(30km) samples [ME on C] step1, samples downstream(30km) facilities [ME on A] step1) | +| [`2026-09-20`](./2026-09-20-raw-ec221d9.csv) | raw | `ec221d9` | 32 | 14 | 18 | 3 fixed | +| [`2026-09-20`](./2026-09-20-raw-002e529.csv) | raw | `002e529` | 32 | 11 | 21 | _first sweep in this mode_ | | [`2026-09-14`](./2026-09-14-raw-baseline.csv) | raw-baseline | `unrecorded` | 124 | 87 | 37 | _first sweep in this mode_ | | [`2026-09-14`](./2026-09-14-engine.csv) | engine | `unrecorded` | 124 | 112 | 9 | _first sweep in this mode_ | | [`2026-09-14`](./2026-09-14-engine-contaminated-9128aa9.csv) | engine-contaminated | `9128aa9` | 124 | 94 | 29 | _first sweep in this mode_ | ## Notes +**[`2026-09-20-raw-002e529.csv`](./2026-09-20-raw-002e529.csv)** — **Cold. Do not diff this against a later sweep on its own.** This was the first +MD sweep ever run, so every query in it missed the engine's cache, and the three +sweeps taken after it were all warm. One row moves on that difference alone: +`facilities upstream samples [ME on A] step1` times out here and answers in 15s +warm, with the generated SPARQL byte-identical (1,950 chars either side of +`ec221d9`). Read against `2026-09-20-raw-e84a11f.csv`, which re-runs the same +pre-fix engine warm, and is the honest before-half of that comparison. + **[`2026-09-14-engine.csv`](./2026-09-14-engine.csv)** — **The 25 `upstream` rows measured the wrong question.** Every upstream shape traced the relation backwards until 2026-09-16 (`docs/DEBUGGING.md`, 2026-09-16), so their status, timing and row counts describe the mirror @@ -33,4 +44,4 @@ The other 99 rows (62 `near`, 37 `downstream`) are unaffected, and are the contr diffing this file against the next sweep. -Generated 2026-09-16. +Generated 2026-09-20. diff --git a/docs/wiki/Dropdowns.md b/docs/wiki/Dropdowns.md index 4d6bbfb..26737f3 100644 --- a/docs/wiki/Dropdowns.md +++ b/docs/wiki/Dropdowns.md @@ -103,4 +103,9 @@ material type URI says nothing about which bucket it belongs to. `buildTree` han For completeness, the Samples filter panel also has Min and Max concentration number inputs in ng/L, and an "Include non-detects" checkbox. None of them query anything; they are applied inside the pipeline queries. + +The non-detects checkbox is ticked by default and moves the answer more than any dropdown on +this page, because non-detects are 70 to 77% of the observations. It filters both which +sample points appear and which rows appear inside their popups. See +[Include non-detects](Samples%20Non%20Detects). [`SampleFilters.tsx`](https://github.com/SAWGraph/explorer-app/blob/main/src/components/QueryEditor/SampleFilters.tsx) diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md index 4de9673..1d5d3ae 100644 --- a/docs/wiki/Home.md +++ b/docs/wiki/Home.md @@ -18,6 +18,8 @@ Where the options in each filter control come from. * [Industry](Dropdowns%20Industry) * [Industry counts](Dropdowns%20Industry%20Counts) * [County](Dropdowns%20County) +* [Include non-detects](Samples%20Non%20Detects), the Samples checkbox that moves the + numbers most ## Elsewhere in the repository diff --git a/docs/wiki/Samples Non Detects.md b/docs/wiki/Samples Non Detects.md new file mode 100644 index 0000000..ed0fd7d --- /dev/null +++ b/docs/wiki/Samples Non Detects.md @@ -0,0 +1,165 @@ +# Include non-detects + +A checkbox in the Samples filter panel. Ticked by default. It decides whether the answer +counts clean results as well as contaminated ones, and it moves the numbers more than any +other filter on the page, because **non-detects are most of the data**. + +## What a non-detect is + +A non-detect is a measurement, not a gap. The lab tested for the substance and found less +than it is able to see. The record carries the detection limits instead of a value: + +| | A detect | A non-detect | +| --- | --- | --- | +| `coso:measurementUnit` | `NanoGM-PER-L` | **absent** | +| numeric value | `0.632` | absent | +| `methodDetectionLimit` | `0.486 ng/L` | `0.449 ng/L` | +| `reportingLimit` | `1.93 ng/L` | `1.78 ng/L` | +| typed `coso:NonDetectQuantityValue` | no | yes | + +The missing unit is the important row. There is nothing to put a unit on, because no +quantity was measured. That absence used to delete the record from every query. See +[Debugging](https://github.com/SAWGraph/explorer-app/blob/main/docs/DEBUGGING.md), +2026-09-17. + +How common they are, measured on `federation`: + +| Scope | Detects | Non-detects | Non-detect share | +| --- | ---: | ---: | ---: | +| York County, all substances | 7,110 | 16,420 | **70%** | +| Maine, all substances | 134,572 | 453,476 | **77%** | + +## What the checkbox does + +It filters at **two** levels, and both matter. + +1. **Which sample points appear on the map.** A point survives only if it has at least one + detection left. +2. **Which rows appear inside a popup.** Points that survive still lose their non-detect + rows. + +York County, no substance selected: + +| | Ticked (default) | Unticked | +| --- | ---: | ---: | +| Sample points on the map | **451** | **367** | +| Observations in popups | **23,530** | **7,110** | +| Points with at least one detect | 451 includes all 367 | 367 | +| Points where everything came back clean | 70 shown | dropped | +| Points with no measurements in the graph | 14 shown | dropped | +| Non-detect readings | 16,420 shown | none shown | + +The second row is the one people miss. The 367 surviving points hold 21,822 observations +between them, but unticking shows only the 7,110 detects among those. A well with 30 +readings of which 2 were detections shows 2 rows, not 30. + +With a substance selected the same thing happens inside that substance. York County PFOS: +361 points ticked, 230 unticked. + +## What a dot on the map means + +This is the part worth saying out loud, because the two readings of the map are different +claims: + +* **Ticked**: a dot means *someone sampled here*. +* **Unticked**: a dot means *PFAS was found here*. + +The misleading part is the absence of a dot. With the box unticked, 70 York County +locations that were tested and came back clean look exactly like ground nobody ever +visited. For a contamination map that is usually the wrong default, which is why the box +starts ticked. + +## Every sample point, classified + +Mutually exclusive, York County, all substances: + +| State | Points | In the answer when unticked? | +| --- | ---: | --- | +| No measurements in the graph at all | 14 | no | +| Tested, everything was a non-detect | 70 | no | +| Mixed: some detects, some non-detects | 366 | yes | +| Only detects | 1 | yes | +| **Total** | **451** | 367 | + +The 14 with no measurements are real registered locations, not bad rows. They are all soil +sampling points (`SB-*`, `SS-*`, `YO-*` in EGAD) with coordinates, a parent site and a +feature type of `SOIL AUGER`, whose lab results are not in the graph. At their parent site +every drinking-water and monitoring well has 24 to 30 observations and every soil point has +zero, so the gap is systematic rather than random. They currently render with an empty +popup. + +There is a fourth possible result state in the code, `"non-quantified"`, a result that is +neither a number nor typed as a non-detect. It is defensive: zero occurrences in York +County and zero across Maine. + +## Opening the filter panel changes nothing + +The checkbox only exists once **+ Add Filters** is expanded, but expanding it is a +display-only action: + +```tsx + +``` + +`setShowFilters` is local component state and never touches the question. The box draws as +ticked because it reads `value?.includeNondetects !== false`, and with no filters set at all +that is `true`. The emitted SPARQL is byte-identical before and after, and **Apply** stays +disabled. + +## The SPARQL + +Ticked, with no other sample filter, the whole samples block is two lines. Nothing asks +about measurements, so nothing can filter on them: + +```sparql +?spC rdf:type coso:SamplePoint ; + spatial:connectedTo ?s2target . +``` + +Unticked adds the result chain and one explicit filter: + +```sparql +?observationC coso:observedAtSamplePoint ?spC . +?observationC coso:hasResult ?resultC . +OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } +OPTIONAL { ?resultC qudt:quantityValue ?_qvC . + ?_qvC rdf:type coso:NonDetectQuantityValue . + BIND(true AS ?nonDetectC) } +BIND(COALESCE(STR(?numericResultC), + IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) +FILTER(BOUND(?numericResultC)) +``` + +`FILTER(BOUND(?numericResultC))` is the exclusion. Note it is written as an explicit filter +rather than achieved by requiring a field non-detects lack, which is what the old code did +by accident. + +Two details that bite anyone writing these by hand: + +* **Do not use `coso:measurementValue`.** It is multi-valued on non-detects, returning both + `"non-detect"` and `"non-quantified"`, which duplicates every non-detect row and makes + `MAX()` return a string. The app derives its displayed value from `qudt:quantityValue` + instead. +* **Do not require `coso:measurementUnit` unless a concentration range needs it.** Requiring + it is indistinguishable from unticking this box, except silent. + +## If the numbers look wrong + +* **Counts jumped up after a deploy.** Expected. Before 2026-09-17 the checkbox did nothing + in either position: a required unit join removed non-detects regardless. Any figure taken + off the app before that understates PFAS presence. +* **A popup is empty.** Likely one of the 14 points with no measurements in the graph. +* **Unticking removed more than expected.** It removes readings, not just points. Check the + popup row counts, not only the dot count. + +## In the code + +[`SampleFilters.tsx`](https://github.com/SAWGraph/explorer-app/blob/main/src/components/QueryEditor/SampleFilters.tsx) +renders the checkbox. +[`fusedQueries.ts`](https://github.com/SAWGraph/explorer-app/blob/main/src/engine/templates/fusedQueries.ts) +decides which joins each filter needs, in `sampleJoinsNeeded`. +[`samples.ts`](https://github.com/SAWGraph/explorer-app/blob/main/src/engine/templates/samples.ts) +holds `needsUnitJoin` and `resultValueClauses`. +`scripts/check-query-joins.mts` asserts the rule across all 108 question shapes in CI. diff --git a/docs/wiki/_Sidebar.md b/docs/wiki/_Sidebar.md index 1fc47e6..12c9a07 100644 --- a/docs/wiki/_Sidebar.md +++ b/docs/wiki/_Sidebar.md @@ -11,6 +11,10 @@ * [Industry counts](Dropdowns%20Industry%20Counts) * [County](Dropdowns%20County) +**Samples** + +* [Include non-detects](Samples%20Non%20Detects) + **In the repo** * [Architecture](https://github.com/SAWGraph/explorer-app/blob/main/docs/ARCHITECTURE.md) diff --git a/package.json b/package.json index 2be375f..69af60f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,10 @@ "check-cache-key": "tsx scripts/check-cache-key.mts", "check-step-labels": "tsx scripts/check-step-labels.mts", "check-trace-direction": "tsx scripts/check-trace-direction.mts", + "check-flowline-scope": "tsx scripts/check-flowline-scope.mts", "check-substance-labels": "tsx scripts/check-substance-labels.mts", + "check-query-joins": "tsx scripts/check-query-joins.mts", + "check-query-snapshots": "tsx scripts/check-query-snapshots.mts", "query-matrix": "tsx scripts/query-matrix.mts", "health-check": "tsx scripts/health-check.mts" }, diff --git a/scripts/__snapshots__/query-shapes.txt b/scripts/__snapshots__/query-shapes.txt new file mode 100644 index 0000000..731b554 --- /dev/null +++ b/scripts/__snapshots__/query-shapes.txt @@ -0,0 +1,3061 @@ +# Generated by scripts/check-query-snapshots.mts -- do not hand-edit. +# Re-record with: npm run check-query-snapshots -- --update + +## PREFIXES +SHARED [all] ae03777b4388 + PREFIX rdf: PREFIX rdfs: PREFIX owl: PREFIX xsd: PREFIX skos: PREFIX geo: PREFIX spatial: PREFIX kwg-ont: PREFIX kwgr: PREFIX hyf: PREFIX hyfo: PREFIX coso: PREFIX fio: PREFIX naics: PREFIX qudt: PREFIX comptox: PREFIX me_egad: PREFIX nhdplusv2: PREFIX il_isgs: PREFIX me_mgs: PREFIX gwml2: PREFIX saw_water: PREFIX schema: PREFIX sosa: PREFIX dcterms: +## samples near samples [ME on A] +FIND_TARGET_IRIS [federation] 0be21b7acfd7 +FIND_ANCHOR_IRIS [federation] 672355872582 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near samples [ME on C] +FIND_TARGET_IRIS [federation] bea7dc72f773 +FIND_ANCHOR_IRIS [federation] f80f83193d16 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream samples [ME on A] +FIND_TARGET_IRIS [federation] 886826560be6 +FIND_ANCHOR_IRIS [federation] 25e35a116a7a +GET_FLOWLINE_GEOMETRIES [federation] 9e253e2c142d +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream samples [ME on C] +FIND_TARGET_IRIS [federation] c06847a4af0d +FIND_ANCHOR_IRIS [federation] 5f95683d03c3 +GET_FLOWLINE_GEOMETRIES [federation] 9e253e2c142d +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream samples [ME on A] +FIND_TARGET_IRIS [federation] c06847a4af0d +FIND_ANCHOR_IRIS [federation] 5f95683d03c3 +GET_FLOWLINE_GEOMETRIES [federation] 9e253e2c142d +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream samples [ME on C] +FIND_TARGET_IRIS [federation] 886826560be6 +FIND_ANCHOR_IRIS [federation] 25e35a116a7a +GET_FLOWLINE_GEOMETRIES [federation] 9e253e2c142d +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near facilities [ME on A] +FIND_TARGET_IRIS [federation] 2ece82229dce +FIND_ANCHOR_IRIS [federation] f0c206010b68 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near facilities [ME on C] +FIND_TARGET_IRIS [federation] 5abc07c304ad +FIND_ANCHOR_IRIS [federation] 1506d58ef072 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 714064e8e781 +FIND_ANCHOR_IRIS [federation] 6b0632214d35 +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] e68708fa1d30 +FIND_ANCHOR_IRIS [federation] 1b7a89412729 +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 2a2add9e3c26 +FIND_ANCHOR_IRIS [federation] 7aa05f4cf432 +GET_FLOWLINE_GEOMETRIES [federation] 889f03c020e8 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] faa0a03241cd +FIND_ANCHOR_IRIS [federation] a4e3147c72d7 +GET_FLOWLINE_GEOMETRIES [federation] 889f03c020e8 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 9c73285f224c +FIND_ANCHOR_IRIS [federation] 713a1f7f8ae5 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 73511fbb8c8f +FIND_ANCHOR_IRIS [federation] aec41960948e +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 8e23014aa73f +FIND_ANCHOR_IRIS [federation] d01ac74e4cc0 +GET_FLOWLINE_GEOMETRIES [federation] d7ee9691da5b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 790b26da2a79 +FIND_ANCHOR_IRIS [federation] 832afed999c2 +GET_FLOWLINE_GEOMETRIES [federation] d7ee9691da5b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 151ef1e41632 +FIND_ANCHOR_IRIS [federation] 0cb147205839 +GET_FLOWLINE_GEOMETRIES [federation] 60802b6a7386 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 25554a2d770e +FIND_ANCHOR_IRIS [federation] 70ac417804f8 +GET_FLOWLINE_GEOMETRIES [federation] 60802b6a7386 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near wells [ME on A] +FIND_TARGET_IRIS [federation] b0f01594fdb4 +FIND_ANCHOR_IRIS [federation] ab4e12addc23 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] b948c1dadad5 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near wells [ME on C] +FIND_TARGET_IRIS [federation] 2f7c9d07ed1a +FIND_ANCHOR_IRIS [federation] d271f8200100 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 8db700fbc3ba +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream wells [ME on A] +FIND_TARGET_IRIS [federation] b2a9610b7c52 +FIND_ANCHOR_IRIS [federation] 94d434376702 +GET_FLOWLINE_GEOMETRIES [federation] b6f61e4f4ff3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 081ffe103105 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream wells [ME on C] +FIND_TARGET_IRIS [federation] e6eca666d07e +FIND_ANCHOR_IRIS [federation] b44db2e80018 +GET_FLOWLINE_GEOMETRIES [federation] b6f61e4f4ff3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 631a69b1a6a7 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream wells [ME on A] +FIND_TARGET_IRIS [federation] e6e5f175099a +FIND_ANCHOR_IRIS [federation] 114ec252bd7e +GET_FLOWLINE_GEOMETRIES [federation] 6c90238c34b5 +HYDRATE_TARGET_BY_IRI [federation] 35e5e0379327 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream wells [ME on C] +FIND_TARGET_IRIS [federation] 01ac5b24c08f +FIND_ANCHOR_IRIS [federation] 542cd3bf0080 +GET_FLOWLINE_GEOMETRIES [federation] 6c90238c34b5 +HYDRATE_TARGET_BY_IRI [federation] 6e6e6eba070d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near aquifers [ME on A] +FIND_TARGET_IRIS [federation] 26597fe15d0e +FIND_ANCHOR_IRIS [federation] 192ca0747233 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near aquifers [ME on C] +FIND_TARGET_IRIS [federation] 581c48ae304e +FIND_ANCHOR_IRIS [federation] 454a12d54a4b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 3735b227534b +FIND_ANCHOR_IRIS [federation] d1b9348ef98d +GET_FLOWLINE_GEOMETRIES [federation] 0d7cd31e6182 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] c8b9648ad9ad +FIND_ANCHOR_IRIS [federation] 6b13c5e7d199 +GET_FLOWLINE_GEOMETRIES [federation] 0d7cd31e6182 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] cd1d79f23ba8 +FIND_ANCHOR_IRIS [federation] 907b64185777 +GET_FLOWLINE_GEOMETRIES [federation] ebbacce57f0e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 54b1d508458d +FIND_ANCHOR_IRIS [federation] 7530ba837a17 +GET_FLOWLINE_GEOMETRIES [federation] ebbacce57f0e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near streams [ME on A] +FIND_TARGET_IRIS [federation] d2b20fc4e76d +FIND_ANCHOR_IRIS [federation] 42fba0d6b6e4 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples near streams [ME on C] +FIND_TARGET_IRIS [federation] 950c0e678218 +FIND_ANCHOR_IRIS [federation] 0c695b9c750b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream streams [ME on A] +FIND_TARGET_IRIS [federation] 962a202132fc +FIND_ANCHOR_IRIS [federation] 62aa5619bc67 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream streams [ME on C] +FIND_TARGET_IRIS [federation] e8b95c8c5b5d +FIND_ANCHOR_IRIS [federation] 0d9fd4f4b10a +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream streams [ME on A] +FIND_TARGET_IRIS [federation] b22e14df0511 +FIND_ANCHOR_IRIS [federation] 7dad41fdfd60 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream streams [ME on C] +FIND_TARGET_IRIS [federation] 3bcbbc61caae +FIND_ANCHOR_IRIS [federation] a62588d4bcb9 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near samples [ME on A] +FIND_TARGET_IRIS [federation] 0bb0f6a91db9 +FIND_ANCHOR_IRIS [federation] dd8ee4b54845 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near samples [ME on C] +FIND_TARGET_IRIS [federation] 4ae27f7b3056 +FIND_ANCHOR_IRIS [federation] 08ee3e23c632 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream samples [ME on A] +FIND_TARGET_IRIS [federation] faa0a03241cd +FIND_ANCHOR_IRIS [federation] a4e3147c72d7 +GET_FLOWLINE_GEOMETRIES [federation] 889f03c020e8 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream samples [ME on C] +FIND_TARGET_IRIS [federation] 2a2add9e3c26 +FIND_ANCHOR_IRIS [federation] 7aa05f4cf432 +GET_FLOWLINE_GEOMETRIES [federation] 889f03c020e8 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream samples [ME on A] +FIND_TARGET_IRIS [federation] e68708fa1d30 +FIND_ANCHOR_IRIS [federation] 1b7a89412729 +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream samples [ME on C] +FIND_TARGET_IRIS [federation] 714064e8e781 +FIND_ANCHOR_IRIS [federation] 6b0632214d35 +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near facilities [ME on A] +FIND_TARGET_IRIS [federation] a7b4475fa918 +FIND_ANCHOR_IRIS [federation] c449e2e870bf +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near facilities [ME on C] +FIND_TARGET_IRIS [federation] 2b48a40c896d +FIND_ANCHOR_IRIS [federation] 9039e57855e1 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] b43c08af1964 +FIND_ANCHOR_IRIS [federation] 8a0c2df70ce0 +GET_FLOWLINE_GEOMETRIES [federation] 81641e7d1349 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] b0335b863895 +FIND_ANCHOR_IRIS [federation] 4786e399d0e3 +GET_FLOWLINE_GEOMETRIES [federation] 81641e7d1349 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] b0335b863895 +FIND_ANCHOR_IRIS [federation] 4786e399d0e3 +GET_FLOWLINE_GEOMETRIES [federation] 81641e7d1349 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] b43c08af1964 +FIND_ANCHOR_IRIS [federation] 8a0c2df70ce0 +GET_FLOWLINE_GEOMETRIES [federation] 81641e7d1349 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] dc18ede4eeac +FIND_ANCHOR_IRIS [federation] f2ec010e4080 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 5393441889bb +FIND_ANCHOR_IRIS [federation] 887006d733eb +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 6ddb9c48525a +FIND_ANCHOR_IRIS [federation] f7a2dba8957d +GET_FLOWLINE_GEOMETRIES [federation] cfe6f604cde9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 32f1aa55d0ea +FIND_ANCHOR_IRIS [federation] 294457930c79 +GET_FLOWLINE_GEOMETRIES [federation] cfe6f604cde9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 1084c720a6cc +FIND_ANCHOR_IRIS [federation] 642252450459 +GET_FLOWLINE_GEOMETRIES [federation] 4feabc0eeaca +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] fbcba6bb42a9 +FIND_ANCHOR_IRIS [federation] ea51a457af43 +GET_FLOWLINE_GEOMETRIES [federation] 4feabc0eeaca +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near wells [ME on A] +FIND_TARGET_IRIS [federation] 1bce75dee487 +FIND_ANCHOR_IRIS [federation] 659f6c7fa3f9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 9575a458430b +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near wells [ME on C] +FIND_TARGET_IRIS [federation] c668a2061d6c +FIND_ANCHOR_IRIS [federation] 4cd25d8b0a3e +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] be1b15d1b106 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream wells [ME on A] +FIND_TARGET_IRIS [federation] 50afef424c69 +FIND_ANCHOR_IRIS [federation] cbb05158da0c +GET_FLOWLINE_GEOMETRIES [federation] f015bfcba03e +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 3bce92acebce +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream wells [ME on C] +FIND_TARGET_IRIS [federation] 59b91de5e995 +FIND_ANCHOR_IRIS [federation] 9968e7786c81 +GET_FLOWLINE_GEOMETRIES [federation] f015bfcba03e +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 1084e9f48e96 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream wells [ME on A] +FIND_TARGET_IRIS [federation] f878bab0aeba +FIND_ANCHOR_IRIS [federation] 98d7c72d4aab +GET_FLOWLINE_GEOMETRIES [federation] 62f130505471 +HYDRATE_TARGET_BY_IRI [federation] e45a36c23efe +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream wells [ME on C] +FIND_TARGET_IRIS [federation] 141d81ecb9ec +FIND_ANCHOR_IRIS [federation] 20f966337069 +GET_FLOWLINE_GEOMETRIES [federation] 62f130505471 +HYDRATE_TARGET_BY_IRI [federation] e238ca8606c2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near aquifers [ME on A] +FIND_TARGET_IRIS [federation] cf073b1ce3f0 +FIND_ANCHOR_IRIS [federation] e9b13461268b +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near aquifers [ME on C] +FIND_TARGET_IRIS [federation] 40c7bc3ecc04 +FIND_ANCHOR_IRIS [federation] a99936a88d0b +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 1a0e0369b410 +FIND_ANCHOR_IRIS [federation] 32747a1b563b +GET_FLOWLINE_GEOMETRIES [federation] 5515bd777411 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 2fdb9d27c845 +FIND_ANCHOR_IRIS [federation] b6983d91a529 +GET_FLOWLINE_GEOMETRIES [federation] 5515bd777411 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 35eea760e846 +FIND_ANCHOR_IRIS [federation] 021c99bd21fe +GET_FLOWLINE_GEOMETRIES [federation] 23e64482073d +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 4ca2878d179f +FIND_ANCHOR_IRIS [federation] 21aab4d7bdf7 +GET_FLOWLINE_GEOMETRIES [federation] 23e64482073d +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near streams [ME on A] +FIND_TARGET_IRIS [federation] 25764463de3a +FIND_ANCHOR_IRIS [federation] 5005fd5c331c +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities near streams [ME on C] +FIND_TARGET_IRIS [federation] 935860c79d56 +FIND_ANCHOR_IRIS [federation] 84faebbbe4de +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream streams [ME on A] +FIND_TARGET_IRIS [federation] 88a05eee9640 +FIND_ANCHOR_IRIS [federation] eedde23983a6 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream streams [ME on C] +FIND_TARGET_IRIS [federation] f8ce75f3f7ee +FIND_ANCHOR_IRIS [federation] a7e872d51a0f +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream streams [ME on A] +FIND_TARGET_IRIS [federation] 81325b745fd1 +FIND_ANCHOR_IRIS [federation] 404c3355f3fd +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream streams [ME on C] +FIND_TARGET_IRIS [federation] ba8393ad2e9d +FIND_ANCHOR_IRIS [federation] d2cd8e8cafdf +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near samples [ME on A] +FIND_TARGET_IRIS [federation] 3c4091f51398 +FIND_ANCHOR_IRIS [federation] cf808bb25a1f +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near samples [ME on C] +FIND_TARGET_IRIS [federation] 0d49e383659d +FIND_ANCHOR_IRIS [federation] a735c3a3bff6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream samples [ME on A] +FIND_TARGET_IRIS [federation] 25554a2d770e +FIND_ANCHOR_IRIS [federation] 70ac417804f8 +GET_FLOWLINE_GEOMETRIES [federation] 60802b6a7386 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream samples [ME on C] +FIND_TARGET_IRIS [federation] 151ef1e41632 +FIND_ANCHOR_IRIS [federation] 0cb147205839 +GET_FLOWLINE_GEOMETRIES [federation] 60802b6a7386 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream samples [ME on A] +FIND_TARGET_IRIS [federation] 790b26da2a79 +FIND_ANCHOR_IRIS [federation] 832afed999c2 +GET_FLOWLINE_GEOMETRIES [federation] d7ee9691da5b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream samples [ME on C] +FIND_TARGET_IRIS [federation] 8e23014aa73f +FIND_ANCHOR_IRIS [federation] d01ac74e4cc0 +GET_FLOWLINE_GEOMETRIES [federation] d7ee9691da5b +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near facilities [ME on A] +FIND_TARGET_IRIS [federation] 6203bb98fd9b +FIND_ANCHOR_IRIS [federation] 09c1cecf0048 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near facilities [ME on C] +FIND_TARGET_IRIS [federation] 8abd2faf7bb0 +FIND_ANCHOR_IRIS [federation] 8e369b7deccc +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] fbcba6bb42a9 +FIND_ANCHOR_IRIS [federation] ea51a457af43 +GET_FLOWLINE_GEOMETRIES [federation] 4feabc0eeaca +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 1084c720a6cc +FIND_ANCHOR_IRIS [federation] 642252450459 +GET_FLOWLINE_GEOMETRIES [federation] 4feabc0eeaca +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 32f1aa55d0ea +FIND_ANCHOR_IRIS [federation] 294457930c79 +GET_FLOWLINE_GEOMETRIES [federation] cfe6f604cde9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 6ddb9c48525a +FIND_ANCHOR_IRIS [federation] f7a2dba8957d +GET_FLOWLINE_GEOMETRIES [federation] cfe6f604cde9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 78dcb9fb3928 +FIND_ANCHOR_IRIS [federation] 409740b46fb7 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 09e5950369e5 +FIND_ANCHOR_IRIS [federation] 73934d7aae0d +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 0a29f890a209 +FIND_ANCHOR_IRIS [federation] 3a19b33e3025 +GET_FLOWLINE_GEOMETRIES [federation] c8295f7305c1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 6ff4852b422e +FIND_ANCHOR_IRIS [federation] b2a4e26f4048 +GET_FLOWLINE_GEOMETRIES [federation] c8295f7305c1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 6ff4852b422e +FIND_ANCHOR_IRIS [federation] b2a4e26f4048 +GET_FLOWLINE_GEOMETRIES [federation] c8295f7305c1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 0a29f890a209 +FIND_ANCHOR_IRIS [federation] 3a19b33e3025 +GET_FLOWLINE_GEOMETRIES [federation] c8295f7305c1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near wells [ME on A] +FIND_TARGET_IRIS [federation] 934d8ac6f612 +FIND_ANCHOR_IRIS [federation] f58221d89287 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 6cab754cbe12 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near wells [ME on C] +FIND_TARGET_IRIS [federation] 5ab06945d883 +FIND_ANCHOR_IRIS [federation] 80df1fdbcf14 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 90d0a0452943 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream wells [ME on A] +FIND_TARGET_IRIS [federation] 41ca24011057 +FIND_ANCHOR_IRIS [federation] 66b8cb8fd320 +GET_FLOWLINE_GEOMETRIES [federation] 7b5980388f2c +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ff746e2b17d8 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream wells [ME on C] +FIND_TARGET_IRIS [federation] 6f09d7bbdcc7 +FIND_ANCHOR_IRIS [federation] 1efed1c496e5 +GET_FLOWLINE_GEOMETRIES [federation] 7b5980388f2c +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ce0c65a4578d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream wells [ME on A] +FIND_TARGET_IRIS [federation] 8c6ab3d31bf7 +FIND_ANCHOR_IRIS [federation] 9813a80e0c5a +GET_FLOWLINE_GEOMETRIES [federation] 663f948f7bf0 +HYDRATE_TARGET_BY_IRI [federation] 9f5c1bba715e +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream wells [ME on C] +FIND_TARGET_IRIS [federation] b679bd47f6b1 +FIND_ANCHOR_IRIS [federation] e7e2854c8ae7 +GET_FLOWLINE_GEOMETRIES [federation] 663f948f7bf0 +HYDRATE_TARGET_BY_IRI [federation] 31d0f4e2be6f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near aquifers [ME on A] +FIND_TARGET_IRIS [federation] 223115ac5eb1 +FIND_ANCHOR_IRIS [federation] c547f4e0656f +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near aquifers [ME on C] +FIND_TARGET_IRIS [federation] d913d9d71840 +FIND_ANCHOR_IRIS [federation] 50885dc7a1b9 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 99dd9196dcc8 +FIND_ANCHOR_IRIS [federation] 1beadb689ecd +GET_FLOWLINE_GEOMETRIES [federation] a28356585b79 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 2ecade927c68 +FIND_ANCHOR_IRIS [federation] 48a5326856de +GET_FLOWLINE_GEOMETRIES [federation] a28356585b79 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] ba778257a97f +FIND_ANCHOR_IRIS [federation] 5c6cc33fae88 +GET_FLOWLINE_GEOMETRIES [federation] 137df84ed6d2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 4b6cc3a024ee +FIND_ANCHOR_IRIS [federation] 208b7a3a6317 +GET_FLOWLINE_GEOMETRIES [federation] 137df84ed6d2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near streams [ME on A] +FIND_TARGET_IRIS [federation] ebbb13c13f83 +FIND_ANCHOR_IRIS [federation] e466cf40dd85 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies near streams [ME on C] +FIND_TARGET_IRIS [federation] 2372d3380521 +FIND_ANCHOR_IRIS [federation] 14e83b4e30cd +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream streams [ME on A] +FIND_TARGET_IRIS [federation] d98072521790 +FIND_ANCHOR_IRIS [federation] bba7273cdba4 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream streams [ME on C] +FIND_TARGET_IRIS [federation] 94b023ca04bf +FIND_ANCHOR_IRIS [federation] 39f68d9178a5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream streams [ME on A] +FIND_TARGET_IRIS [federation] 3a5de06aa701 +FIND_ANCHOR_IRIS [federation] 1890d6fd07a7 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream streams [ME on C] +FIND_TARGET_IRIS [federation] eeb6a4be8d87 +FIND_ANCHOR_IRIS [federation] 2bc13625bc04 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near samples [ME on A] +FIND_TARGET_IRIS [federation] 0bf72e236353 +FIND_ANCHOR_IRIS [federation] 6cc73e470a1e +HYDRATE_TARGET_BY_IRI [federation] f2161e75506a +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near samples [ME on C] +FIND_TARGET_IRIS [federation] f8a37eb37178 +FIND_ANCHOR_IRIS [federation] ef35db5ca18b +HYDRATE_TARGET_BY_IRI [federation] 8dfa184e0d2b +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream samples [ME on A] +FIND_TARGET_IRIS [federation] 01ac5b24c08f +FIND_ANCHOR_IRIS [federation] 542cd3bf0080 +GET_FLOWLINE_GEOMETRIES [federation] 6c90238c34b5 +HYDRATE_TARGET_BY_IRI [federation] 6e6e6eba070d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream samples [ME on C] +FIND_TARGET_IRIS [federation] e6e5f175099a +FIND_ANCHOR_IRIS [federation] 114ec252bd7e +GET_FLOWLINE_GEOMETRIES [federation] 6c90238c34b5 +HYDRATE_TARGET_BY_IRI [federation] 35e5e0379327 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream samples [ME on A] +FIND_TARGET_IRIS [federation] e6eca666d07e +FIND_ANCHOR_IRIS [federation] b44db2e80018 +GET_FLOWLINE_GEOMETRIES [federation] b6f61e4f4ff3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 631a69b1a6a7 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream samples [ME on C] +FIND_TARGET_IRIS [federation] b2a9610b7c52 +FIND_ANCHOR_IRIS [federation] 94d434376702 +GET_FLOWLINE_GEOMETRIES [federation] b6f61e4f4ff3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 081ffe103105 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near facilities [ME on A] +FIND_TARGET_IRIS [federation] c0f56f77ba8f +FIND_ANCHOR_IRIS [federation] 153a3a7992c8 +HYDRATE_TARGET_BY_IRI [federation] 73c37175d3a3 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near facilities [ME on C] +FIND_TARGET_IRIS [federation] 6dda347a097f +FIND_ANCHOR_IRIS [federation] 78e1f8a446f0 +HYDRATE_TARGET_BY_IRI [federation] e0f406bc2dd6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 141d81ecb9ec +FIND_ANCHOR_IRIS [federation] 20f966337069 +GET_FLOWLINE_GEOMETRIES [federation] 62f130505471 +HYDRATE_TARGET_BY_IRI [federation] e238ca8606c2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] f878bab0aeba +FIND_ANCHOR_IRIS [federation] 98d7c72d4aab +GET_FLOWLINE_GEOMETRIES [federation] 62f130505471 +HYDRATE_TARGET_BY_IRI [federation] e45a36c23efe +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 59b91de5e995 +FIND_ANCHOR_IRIS [federation] 9968e7786c81 +GET_FLOWLINE_GEOMETRIES [federation] f015bfcba03e +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 1084e9f48e96 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 50afef424c69 +FIND_ANCHOR_IRIS [federation] cbb05158da0c +GET_FLOWLINE_GEOMETRIES [federation] f015bfcba03e +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 3bce92acebce +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] d58893c96966 +FIND_ANCHOR_IRIS [federation] 63fd9d8c7d26 +HYDRATE_TARGET_BY_IRI [federation] 6b18905b32f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 39419051512e +FIND_ANCHOR_IRIS [federation] 30b8f06aa807 +HYDRATE_TARGET_BY_IRI [federation] a7b1fa7dc839 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] b679bd47f6b1 +FIND_ANCHOR_IRIS [federation] e7e2854c8ae7 +GET_FLOWLINE_GEOMETRIES [federation] 663f948f7bf0 +HYDRATE_TARGET_BY_IRI [federation] 31d0f4e2be6f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 8c6ab3d31bf7 +FIND_ANCHOR_IRIS [federation] 9813a80e0c5a +GET_FLOWLINE_GEOMETRIES [federation] 663f948f7bf0 +HYDRATE_TARGET_BY_IRI [federation] 9f5c1bba715e +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 6f09d7bbdcc7 +FIND_ANCHOR_IRIS [federation] 1efed1c496e5 +GET_FLOWLINE_GEOMETRIES [federation] 7b5980388f2c +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ce0c65a4578d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 41ca24011057 +FIND_ANCHOR_IRIS [federation] 66b8cb8fd320 +GET_FLOWLINE_GEOMETRIES [federation] 7b5980388f2c +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ff746e2b17d8 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near wells [ME on A] +FIND_TARGET_IRIS [federation] 920687fc77ed +FIND_ANCHOR_IRIS [federation] 6ede512b148d +HYDRATE_TARGET_BY_IRI [federation] c498321cc486 +HYDRATE_ANCHOR_BY_IRI [federation] 05cd3b39feaf +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near wells [ME on C] +FIND_TARGET_IRIS [federation] 83d77a45d03c +FIND_ANCHOR_IRIS [federation] 187c48927d97 +HYDRATE_TARGET_BY_IRI [federation] 88b94aeb229d +HYDRATE_ANCHOR_BY_IRI [federation] c85fdb421ca6 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream wells [ME on A] +FIND_TARGET_IRIS [federation] ac87cac97a08 +FIND_ANCHOR_IRIS [federation] ee767dadbf6f +GET_FLOWLINE_GEOMETRIES [federation] 4bc79000b146 +HYDRATE_TARGET_BY_IRI [federation] c80d21e0d32d +HYDRATE_ANCHOR_BY_IRI [federation] cb961f64c07f +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream wells [ME on C] +FIND_TARGET_IRIS [federation] 968075df2792 +FIND_ANCHOR_IRIS [federation] fa96bd1b30f8 +GET_FLOWLINE_GEOMETRIES [federation] 4bc79000b146 +HYDRATE_TARGET_BY_IRI [federation] 258e1bb27b55 +HYDRATE_ANCHOR_BY_IRI [federation] 440f71464197 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream wells [ME on A] +FIND_TARGET_IRIS [federation] 968075df2792 +FIND_ANCHOR_IRIS [federation] fa96bd1b30f8 +GET_FLOWLINE_GEOMETRIES [federation] 4bc79000b146 +HYDRATE_TARGET_BY_IRI [federation] 258e1bb27b55 +HYDRATE_ANCHOR_BY_IRI [federation] 440f71464197 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream wells [ME on C] +FIND_TARGET_IRIS [federation] ac87cac97a08 +FIND_ANCHOR_IRIS [federation] ee767dadbf6f +GET_FLOWLINE_GEOMETRIES [federation] 4bc79000b146 +HYDRATE_TARGET_BY_IRI [federation] c80d21e0d32d +HYDRATE_ANCHOR_BY_IRI [federation] cb961f64c07f +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near aquifers [ME on A] +FIND_TARGET_IRIS [federation] 4cf300178a3d +FIND_ANCHOR_IRIS [federation] 17938cd745d9 +HYDRATE_TARGET_BY_IRI [federation] 8a1266fbf3b4 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near aquifers [ME on C] +FIND_TARGET_IRIS [federation] 1c5477f4a20d +FIND_ANCHOR_IRIS [federation] a1a3610cba42 +HYDRATE_TARGET_BY_IRI [federation] f1abbefd32dd +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] b6893ae200af +FIND_ANCHOR_IRIS [federation] b9d0126bda7a +GET_FLOWLINE_GEOMETRIES [federation] 79b82d9e0fe1 +HYDRATE_TARGET_BY_IRI [federation] c35d18356b27 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 26bf05053779 +FIND_ANCHOR_IRIS [federation] ddfaa9f20f19 +GET_FLOWLINE_GEOMETRIES [federation] 79b82d9e0fe1 +HYDRATE_TARGET_BY_IRI [federation] ec935451ecfb +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 22c02f8cd68b +FIND_ANCHOR_IRIS [federation] b9d52f76c5da +GET_FLOWLINE_GEOMETRIES [federation] 9a08433a48e0 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] dc4d5d46d3f1 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] c5ae9f5fc826 +FIND_ANCHOR_IRIS [federation] 4f5453f9e32d +GET_FLOWLINE_GEOMETRIES [federation] 9a08433a48e0 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ca1086992b60 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near streams [ME on A] +FIND_TARGET_IRIS [federation] 8952d69eebf7 +FIND_ANCHOR_IRIS [federation] 827004d998b2 +HYDRATE_TARGET_BY_IRI [federation] d335a3eda455 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells near streams [ME on C] +FIND_TARGET_IRIS [federation] e30770406b41 +FIND_ANCHOR_IRIS [federation] b0f1db6f8073 +HYDRATE_TARGET_BY_IRI [federation] 5e175b050654 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream streams [ME on A] +FIND_TARGET_IRIS [federation] e3bb217bc214 +FIND_ANCHOR_IRIS [federation] 032ea9425e6f +HYDRATE_TARGET_BY_IRI [federation] 32cbf641e1bc +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream streams [ME on C] +FIND_TARGET_IRIS [federation] f56b87fc7251 +FIND_ANCHOR_IRIS [federation] 67b90dec7f24 +HYDRATE_TARGET_BY_IRI [federation] 06c0038fb4ce +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream streams [ME on A] +FIND_TARGET_IRIS [federation] 8b7cd81ea5cf +FIND_ANCHOR_IRIS [federation] e5376ca0aa0a +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] bf6a1a426eb1 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream streams [ME on C] +FIND_TARGET_IRIS [federation] 1da7ac18c1ca +FIND_ANCHOR_IRIS [federation] 592bae86ed3a +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 95fe8b8c33ba +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near samples [ME on A] +FIND_TARGET_IRIS [federation] b45c05b3136a +FIND_ANCHOR_IRIS [federation] 003f0f16f9b1 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near samples [ME on C] +FIND_TARGET_IRIS [federation] 2f9aec17c4e9 +FIND_ANCHOR_IRIS [federation] 56c5b92ab83e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream samples [ME on A] +FIND_TARGET_IRIS [federation] 54b1d508458d +FIND_ANCHOR_IRIS [federation] 7530ba837a17 +GET_FLOWLINE_GEOMETRIES [federation] ebbacce57f0e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream samples [ME on C] +FIND_TARGET_IRIS [federation] cd1d79f23ba8 +FIND_ANCHOR_IRIS [federation] 907b64185777 +GET_FLOWLINE_GEOMETRIES [federation] ebbacce57f0e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream samples [ME on A] +FIND_TARGET_IRIS [federation] c8b9648ad9ad +FIND_ANCHOR_IRIS [federation] 6b13c5e7d199 +GET_FLOWLINE_GEOMETRIES [federation] 0d7cd31e6182 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream samples [ME on C] +FIND_TARGET_IRIS [federation] 3735b227534b +FIND_ANCHOR_IRIS [federation] d1b9348ef98d +GET_FLOWLINE_GEOMETRIES [federation] 0d7cd31e6182 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near facilities [ME on A] +FIND_TARGET_IRIS [federation] 5aedb347a53b +FIND_ANCHOR_IRIS [federation] b6d4297f115e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near facilities [ME on C] +FIND_TARGET_IRIS [federation] 88d952d2a2c5 +FIND_ANCHOR_IRIS [federation] 6316b038687c +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 4ca2878d179f +FIND_ANCHOR_IRIS [federation] 21aab4d7bdf7 +GET_FLOWLINE_GEOMETRIES [federation] 23e64482073d +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 35eea760e846 +FIND_ANCHOR_IRIS [federation] 021c99bd21fe +GET_FLOWLINE_GEOMETRIES [federation] 23e64482073d +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] 2fdb9d27c845 +FIND_ANCHOR_IRIS [federation] b6983d91a529 +GET_FLOWLINE_GEOMETRIES [federation] 5515bd777411 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 1a0e0369b410 +FIND_ANCHOR_IRIS [federation] 32747a1b563b +GET_FLOWLINE_GEOMETRIES [federation] 5515bd777411 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] e2b3d9f8c117 +FIND_ANCHOR_IRIS [federation] 40a495b7a46a +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] e0d3a87dd863 +FIND_ANCHOR_IRIS [federation] 38cb444f42f8 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 4b6cc3a024ee +FIND_ANCHOR_IRIS [federation] 208b7a3a6317 +GET_FLOWLINE_GEOMETRIES [federation] 137df84ed6d2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] ba778257a97f +FIND_ANCHOR_IRIS [federation] 5c6cc33fae88 +GET_FLOWLINE_GEOMETRIES [federation] 137df84ed6d2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 2ecade927c68 +FIND_ANCHOR_IRIS [federation] 48a5326856de +GET_FLOWLINE_GEOMETRIES [federation] a28356585b79 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 99dd9196dcc8 +FIND_ANCHOR_IRIS [federation] 1beadb689ecd +GET_FLOWLINE_GEOMETRIES [federation] a28356585b79 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near wells [ME on A] +FIND_TARGET_IRIS [federation] a408ff1eb89d +FIND_ANCHOR_IRIS [federation] 33e4f401a9db +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 66c78fc2515a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near wells [ME on C] +FIND_TARGET_IRIS [federation] 3e4c26e61ee4 +FIND_ANCHOR_IRIS [federation] cdddd6bdf1d7 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 46bc1db1c4db +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream wells [ME on A] +FIND_TARGET_IRIS [federation] c5ae9f5fc826 +FIND_ANCHOR_IRIS [federation] 4f5453f9e32d +GET_FLOWLINE_GEOMETRIES [federation] 9a08433a48e0 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ca1086992b60 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream wells [ME on C] +FIND_TARGET_IRIS [federation] 22c02f8cd68b +FIND_ANCHOR_IRIS [federation] b9d52f76c5da +GET_FLOWLINE_GEOMETRIES [federation] 9a08433a48e0 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] dc4d5d46d3f1 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream wells [ME on A] +FIND_TARGET_IRIS [federation] 26bf05053779 +FIND_ANCHOR_IRIS [federation] ddfaa9f20f19 +GET_FLOWLINE_GEOMETRIES [federation] 79b82d9e0fe1 +HYDRATE_TARGET_BY_IRI [federation] ec935451ecfb +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream wells [ME on C] +FIND_TARGET_IRIS [federation] b6893ae200af +FIND_ANCHOR_IRIS [federation] b9d0126bda7a +GET_FLOWLINE_GEOMETRIES [federation] 79b82d9e0fe1 +HYDRATE_TARGET_BY_IRI [federation] c35d18356b27 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near aquifers [ME on A] +FIND_TARGET_IRIS [federation] 4eb7e82611af +FIND_ANCHOR_IRIS [federation] 2bec684879ca +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near aquifers [ME on C] +FIND_TARGET_IRIS [federation] 0667c0004f62 +FIND_ANCHOR_IRIS [federation] 8529b7fb6ffa +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] dc584e6cfe79 +FIND_ANCHOR_IRIS [federation] a3823ffd8794 +GET_FLOWLINE_GEOMETRIES [federation] 3cdf1859eeef +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] a963e5be882c +FIND_ANCHOR_IRIS [federation] 58c16900aa65 +GET_FLOWLINE_GEOMETRIES [federation] 3cdf1859eeef +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] a963e5be882c +FIND_ANCHOR_IRIS [federation] 58c16900aa65 +GET_FLOWLINE_GEOMETRIES [federation] 3cdf1859eeef +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] dc584e6cfe79 +FIND_ANCHOR_IRIS [federation] a3823ffd8794 +GET_FLOWLINE_GEOMETRIES [federation] 3cdf1859eeef +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near streams [ME on A] +FIND_TARGET_IRIS [federation] 8f5c7dd5246f +FIND_ANCHOR_IRIS [federation] 07bcc0d2ef5b +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers near streams [ME on C] +FIND_TARGET_IRIS [federation] ef7f4d420285 +FIND_ANCHOR_IRIS [federation] 93c67796bf6d +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream streams [ME on A] +FIND_TARGET_IRIS [federation] e13c4295e7b0 +FIND_ANCHOR_IRIS [federation] bac0c29c4f57 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream streams [ME on C] +FIND_TARGET_IRIS [federation] 98b1603dafe4 +FIND_ANCHOR_IRIS [federation] 481ef65eaf6e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream streams [ME on A] +FIND_TARGET_IRIS [federation] 132f284d8912 +FIND_ANCHOR_IRIS [federation] 629f7809931c +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream streams [ME on C] +FIND_TARGET_IRIS [federation] eb7c41d74f46 +FIND_ANCHOR_IRIS [federation] 2ab8259a58d6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near samples [ME on A] +FIND_TARGET_IRIS [federation] daaf4827bae1 +FIND_ANCHOR_IRIS [federation] bea267f2f762 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near samples [ME on C] +FIND_TARGET_IRIS [federation] 377f854f6cc6 +FIND_ANCHOR_IRIS [federation] 6e59770323b3 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream samples [ME on A] +FIND_TARGET_IRIS [federation] 3bcbbc61caae +FIND_ANCHOR_IRIS [federation] a62588d4bcb9 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream samples [ME on C] +FIND_TARGET_IRIS [federation] b22e14df0511 +FIND_ANCHOR_IRIS [federation] 7dad41fdfd60 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream samples [ME on A] +FIND_TARGET_IRIS [federation] e8b95c8c5b5d +FIND_ANCHOR_IRIS [federation] 0d9fd4f4b10a +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream samples [ME on C] +FIND_TARGET_IRIS [federation] 962a202132fc +FIND_ANCHOR_IRIS [federation] 62aa5619bc67 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near facilities [ME on A] +FIND_TARGET_IRIS [federation] 0d03523e6c23 +FIND_ANCHOR_IRIS [federation] e0f6624fc264 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near facilities [ME on C] +FIND_TARGET_IRIS [federation] 8ef73aad6fa9 +FIND_ANCHOR_IRIS [federation] a3ac25aca5df +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream facilities [ME on A] +FIND_TARGET_IRIS [federation] ba8393ad2e9d +FIND_ANCHOR_IRIS [federation] d2cd8e8cafdf +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 81325b745fd1 +FIND_ANCHOR_IRIS [federation] 404c3355f3fd +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream facilities [ME on A] +FIND_TARGET_IRIS [federation] f8ce75f3f7ee +FIND_ANCHOR_IRIS [federation] a7e872d51a0f +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream facilities [ME on C] +FIND_TARGET_IRIS [federation] 88a05eee9640 +FIND_ANCHOR_IRIS [federation] eedde23983a6 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 6da1ed2de01d +FIND_ANCHOR_IRIS [federation] 320b9d0e5ff8 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near waterBodies [ME on C] +FIND_TARGET_IRIS [federation] ade4600c7066 +FIND_ANCHOR_IRIS [federation] 2e32c0ffbc3c +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] eeb6a4be8d87 +FIND_ANCHOR_IRIS [federation] 2bc13625bc04 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 3a5de06aa701 +FIND_ANCHOR_IRIS [federation] 1890d6fd07a7 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 94b023ca04bf +FIND_ANCHOR_IRIS [federation] 39f68d9178a5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream waterBodies [ME on C] +FIND_TARGET_IRIS [federation] d98072521790 +FIND_ANCHOR_IRIS [federation] bba7273cdba4 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near wells [ME on A] +FIND_TARGET_IRIS [federation] daae4206ce0f +FIND_ANCHOR_IRIS [federation] fb42af7be1f5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] bc5e31538d28 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near wells [ME on C] +FIND_TARGET_IRIS [federation] fcaea4147d56 +FIND_ANCHOR_IRIS [federation] 56ea6a34453b +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 2fe8928c9eac +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream wells [ME on A] +FIND_TARGET_IRIS [federation] 1da7ac18c1ca +FIND_ANCHOR_IRIS [federation] 592bae86ed3a +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 95fe8b8c33ba +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream wells [ME on C] +FIND_TARGET_IRIS [federation] 8b7cd81ea5cf +FIND_ANCHOR_IRIS [federation] e5376ca0aa0a +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] bf6a1a426eb1 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream wells [ME on A] +FIND_TARGET_IRIS [federation] f56b87fc7251 +FIND_ANCHOR_IRIS [federation] 67b90dec7f24 +HYDRATE_TARGET_BY_IRI [federation] 06c0038fb4ce +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream wells [ME on C] +FIND_TARGET_IRIS [federation] e3bb217bc214 +FIND_ANCHOR_IRIS [federation] 032ea9425e6f +HYDRATE_TARGET_BY_IRI [federation] 32cbf641e1bc +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near aquifers [ME on A] +FIND_TARGET_IRIS [federation] 871365cea3c3 +FIND_ANCHOR_IRIS [federation] bd4eab4c6f66 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near aquifers [ME on C] +FIND_TARGET_IRIS [federation] 26ef89af73d7 +FIND_ANCHOR_IRIS [federation] 7c9c4702ede4 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] eb7c41d74f46 +FIND_ANCHOR_IRIS [federation] 2ab8259a58d6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] 132f284d8912 +FIND_ANCHOR_IRIS [federation] 629f7809931c +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream aquifers [ME on A] +FIND_TARGET_IRIS [federation] 98b1603dafe4 +FIND_ANCHOR_IRIS [federation] 481ef65eaf6e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream aquifers [ME on C] +FIND_TARGET_IRIS [federation] e13c4295e7b0 +FIND_ANCHOR_IRIS [federation] bac0c29c4f57 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near streams [ME on A] +FIND_TARGET_IRIS [federation] 7658df86ebfb +FIND_ANCHOR_IRIS [federation] 79e0bd042512 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams near streams [ME on C] +FIND_TARGET_IRIS [federation] 9ba66fec62a1 +FIND_ANCHOR_IRIS [federation] 9e8aee90f1eb +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream streams [ME on A] +FIND_TARGET_IRIS [federation] 24e2d640eb8b +FIND_ANCHOR_IRIS [federation] 14f6bfc3ef2b +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream streams [ME on C] +FIND_TARGET_IRIS [federation] 29735aa2afea +FIND_ANCHOR_IRIS [federation] 56f38a86aec7 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream streams [ME on A] +FIND_TARGET_IRIS [federation] 29735aa2afea +FIND_ANCHOR_IRIS [federation] 56f38a86aec7 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream streams [ME on C] +FIND_TARGET_IRIS [federation] 24e2d640eb8b +FIND_ANCHOR_IRIS [federation] 14f6bfc3ef2b +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] fa1833c58b13 +FIND_ANCHOR_IRIS [federation] 4d08a3f185ec +GET_FLOWLINE_GEOMETRIES [federation] 5a03f4f3aae3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] f0d79c0a39c3 +FIND_ANCHOR_IRIS [federation] ece4d96de601 +GET_FLOWLINE_GEOMETRIES [federation] 5a03f4f3aae3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] f0d79c0a39c3 +FIND_ANCHOR_IRIS [federation] ece4d96de601 +GET_FLOWLINE_GEOMETRIES [federation] 5a03f4f3aae3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] fa1833c58b13 +FIND_ANCHOR_IRIS [federation] 4d08a3f185ec +GET_FLOWLINE_GEOMETRIES [federation] 5a03f4f3aae3 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 3dbb4fd45439 +FIND_ANCHOR_IRIS [federation] c6129be91792 +GET_FLOWLINE_GEOMETRIES [federation] 3c6a4d4ad1b9 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 59aee765110c +FIND_ANCHOR_IRIS [federation] 4a22e1a87031 +GET_FLOWLINE_GEOMETRIES [federation] 3c6a4d4ad1b9 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 7d7f1e7d7c60 +FIND_ANCHOR_IRIS [federation] 6e78232de987 +GET_FLOWLINE_GEOMETRIES [federation] a4f6491c0e2c +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 7604a06153a0 +FIND_ANCHOR_IRIS [federation] 666e8b5700a2 +GET_FLOWLINE_GEOMETRIES [federation] a4f6491c0e2c +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] d4ff9a18f9cf +FIND_ANCHOR_IRIS [federation] 2c9b021c5ece +GET_FLOWLINE_GEOMETRIES [federation] 288129aa4dbe +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 751b01f1248c +FIND_ANCHOR_IRIS [federation] 4e22903dafb8 +GET_FLOWLINE_GEOMETRIES [federation] 288129aa4dbe +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] c36613529a50 +FIND_ANCHOR_IRIS [federation] 1195457ff6d4 +GET_FLOWLINE_GEOMETRIES [federation] 70123c8b61f0 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 436d3320d910 +FIND_ANCHOR_IRIS [federation] 518849e03a5b +GET_FLOWLINE_GEOMETRIES [federation] 70123c8b61f0 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] c5ba856ac5a5 +FIND_ANCHOR_IRIS [federation] 802d35965666 +GET_FLOWLINE_GEOMETRIES [federation] 337d970b0f07 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] da7010fa25fd +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 8a8df61dddeb +FIND_ANCHOR_IRIS [federation] 789f1ded1d8a +GET_FLOWLINE_GEOMETRIES [federation] 337d970b0f07 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 52f8acbda00d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 776babccec7b +FIND_ANCHOR_IRIS [federation] 3484afc2016f +GET_FLOWLINE_GEOMETRIES [federation] 5de1200d2e01 +HYDRATE_TARGET_BY_IRI [federation] c9531cc6fbe2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 5dbe52083d8c +FIND_ANCHOR_IRIS [federation] 18515c96f78d +GET_FLOWLINE_GEOMETRIES [federation] 5de1200d2e01 +HYDRATE_TARGET_BY_IRI [federation] 878b7218cf7c +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] a548c30613f2 +FIND_ANCHOR_IRIS [federation] 123fa7029db0 +GET_FLOWLINE_GEOMETRIES [federation] a7ba4bf786b6 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 66321d87ce37 +FIND_ANCHOR_IRIS [federation] 2bcc64889ee4 +GET_FLOWLINE_GEOMETRIES [federation] a7ba4bf786b6 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] 5109f240a9f0 +FIND_ANCHOR_IRIS [federation] fa5208b4f1f5 +GET_FLOWLINE_GEOMETRIES [federation] 934aca1f2f29 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 296a0d00de9e +FIND_ANCHOR_IRIS [federation] 71f036d9cd02 +GET_FLOWLINE_GEOMETRIES [federation] 934aca1f2f29 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 55f5714d004c +FIND_ANCHOR_IRIS [federation] 27a652bc4a63 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] 614ca43f8807 +FIND_ANCHOR_IRIS [federation] 3ac013fb1120 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] ac7ebc96d761 +FIND_ANCHOR_IRIS [federation] fc48809955c6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## samples upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] b4008588edaf +FIND_ANCHOR_IRIS [federation] 6ac9015a260c +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 7604a06153a0 +FIND_ANCHOR_IRIS [federation] 666e8b5700a2 +GET_FLOWLINE_GEOMETRIES [federation] a4f6491c0e2c +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] 7d7f1e7d7c60 +FIND_ANCHOR_IRIS [federation] 6e78232de987 +GET_FLOWLINE_GEOMETRIES [federation] a4f6491c0e2c +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 59aee765110c +FIND_ANCHOR_IRIS [federation] 4a22e1a87031 +GET_FLOWLINE_GEOMETRIES [federation] 3c6a4d4ad1b9 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] 3dbb4fd45439 +FIND_ANCHOR_IRIS [federation] c6129be91792 +GET_FLOWLINE_GEOMETRIES [federation] 3c6a4d4ad1b9 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] eda7f49eaf9d +FIND_ANCHOR_IRIS [federation] f1e4ac3d1adc +GET_FLOWLINE_GEOMETRIES [federation] bf8ffdfa1ad9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 8758a29be4cd +FIND_ANCHOR_IRIS [federation] 3de8c144de70 +GET_FLOWLINE_GEOMETRIES [federation] bf8ffdfa1ad9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 8758a29be4cd +FIND_ANCHOR_IRIS [federation] 3de8c144de70 +GET_FLOWLINE_GEOMETRIES [federation] bf8ffdfa1ad9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] eda7f49eaf9d +FIND_ANCHOR_IRIS [federation] f1e4ac3d1adc +GET_FLOWLINE_GEOMETRIES [federation] bf8ffdfa1ad9 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 6537d90d135f +FIND_ANCHOR_IRIS [federation] 69f0475ae80a +GET_FLOWLINE_GEOMETRIES [federation] fd28138d5b69 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 8fbe3088c265 +FIND_ANCHOR_IRIS [federation] 060c1e184a76 +GET_FLOWLINE_GEOMETRIES [federation] fd28138d5b69 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 9b750fdb6a09 +FIND_ANCHOR_IRIS [federation] 7ab11f2c9448 +GET_FLOWLINE_GEOMETRIES [federation] 9f955f3f75d5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] f560ebd6282b +FIND_ANCHOR_IRIS [federation] 86a26ec60121 +GET_FLOWLINE_GEOMETRIES [federation] 9f955f3f75d5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 5c5c06fd1d35 +FIND_ANCHOR_IRIS [federation] 1b7220b76dc0 +GET_FLOWLINE_GEOMETRIES [federation] 53706371792a +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 9c03aae08c7b +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] e5836fc46bf4 +FIND_ANCHOR_IRIS [federation] a0d6980914ac +GET_FLOWLINE_GEOMETRIES [federation] 53706371792a +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 5a01b1674751 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] ab7cba78e7a4 +FIND_ANCHOR_IRIS [federation] e710b494417c +GET_FLOWLINE_GEOMETRIES [federation] 8becca5939ec +HYDRATE_TARGET_BY_IRI [federation] 719474b95b24 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 242afddb2669 +FIND_ANCHOR_IRIS [federation] 748a8ca41a32 +GET_FLOWLINE_GEOMETRIES [federation] 8becca5939ec +HYDRATE_TARGET_BY_IRI [federation] af3062364f60 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] be59394dac59 +FIND_ANCHOR_IRIS [federation] da77e9a226ae +GET_FLOWLINE_GEOMETRIES [federation] 5bb2d62da8a0 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] c1505f76d1a2 +FIND_ANCHOR_IRIS [federation] 78d85e00dcd9 +GET_FLOWLINE_GEOMETRIES [federation] 5bb2d62da8a0 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] 7087d0c06d24 +FIND_ANCHOR_IRIS [federation] dfffea098028 +GET_FLOWLINE_GEOMETRIES [federation] e0c43ef101a2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 027492953f58 +FIND_ANCHOR_IRIS [federation] e1ccb826ce9b +GET_FLOWLINE_GEOMETRIES [federation] e0c43ef101a2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 37c324b2fb11 +FIND_ANCHOR_IRIS [federation] dda55e8be700 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] a7c3f2ccff0c +FIND_ANCHOR_IRIS [federation] cc4b39ebe0a2 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] e792abfe6ef8 +FIND_ANCHOR_IRIS [federation] 10dbee777757 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## facilities upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] 1f724fa39386 +FIND_ANCHOR_IRIS [federation] 8138a7e702af +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 436d3320d910 +FIND_ANCHOR_IRIS [federation] 518849e03a5b +GET_FLOWLINE_GEOMETRIES [federation] 70123c8b61f0 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] c36613529a50 +FIND_ANCHOR_IRIS [federation] 1195457ff6d4 +GET_FLOWLINE_GEOMETRIES [federation] 70123c8b61f0 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 751b01f1248c +FIND_ANCHOR_IRIS [federation] 4e22903dafb8 +GET_FLOWLINE_GEOMETRIES [federation] 288129aa4dbe +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] d4ff9a18f9cf +FIND_ANCHOR_IRIS [federation] 2c9b021c5ece +GET_FLOWLINE_GEOMETRIES [federation] 288129aa4dbe +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] f560ebd6282b +FIND_ANCHOR_IRIS [federation] 86a26ec60121 +GET_FLOWLINE_GEOMETRIES [federation] 9f955f3f75d5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 9b750fdb6a09 +FIND_ANCHOR_IRIS [federation] 7ab11f2c9448 +GET_FLOWLINE_GEOMETRIES [federation] 9f955f3f75d5 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 8fbe3088c265 +FIND_ANCHOR_IRIS [federation] 060c1e184a76 +GET_FLOWLINE_GEOMETRIES [federation] fd28138d5b69 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 6537d90d135f +FIND_ANCHOR_IRIS [federation] 69f0475ae80a +GET_FLOWLINE_GEOMETRIES [federation] fd28138d5b69 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 8c90b6016e50 +FIND_ANCHOR_IRIS [federation] 090aa1368fc6 +GET_FLOWLINE_GEOMETRIES [federation] cd57b7a763e6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] b7423f86a11e +FIND_ANCHOR_IRIS [federation] 6ed5aed4968a +GET_FLOWLINE_GEOMETRIES [federation] cd57b7a763e6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] b7423f86a11e +FIND_ANCHOR_IRIS [federation] 6ed5aed4968a +GET_FLOWLINE_GEOMETRIES [federation] cd57b7a763e6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 8c90b6016e50 +FIND_ANCHOR_IRIS [federation] 090aa1368fc6 +GET_FLOWLINE_GEOMETRIES [federation] cd57b7a763e6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 77f682fb65ef +FIND_ANCHOR_IRIS [federation] 13bb3ff18f50 +GET_FLOWLINE_GEOMETRIES [federation] b97f4349ba61 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 1b55c84eb49b +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 8d3c6166926c +FIND_ANCHOR_IRIS [federation] 3a2bb0cd96e0 +GET_FLOWLINE_GEOMETRIES [federation] b97f4349ba61 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 74340ac75507 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] ca528e8925b8 +FIND_ANCHOR_IRIS [federation] 3691010af47d +GET_FLOWLINE_GEOMETRIES [federation] 22b41e20cf91 +HYDRATE_TARGET_BY_IRI [federation] 19c1603fd525 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 07f85ea74c11 +FIND_ANCHOR_IRIS [federation] e93784de47f2 +GET_FLOWLINE_GEOMETRIES [federation] 22b41e20cf91 +HYDRATE_TARGET_BY_IRI [federation] 83a09bfc0c0a +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] ee66561a00f7 +FIND_ANCHOR_IRIS [federation] 02fc7f5ebfab +GET_FLOWLINE_GEOMETRIES [federation] b3c1864cf554 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 96f67a03be24 +FIND_ANCHOR_IRIS [federation] 90d82873e3c0 +GET_FLOWLINE_GEOMETRIES [federation] b3c1864cf554 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] bd10519b155e +FIND_ANCHOR_IRIS [federation] 6ad2a8fa8e74 +GET_FLOWLINE_GEOMETRIES [federation] 1b2c8dc5e4e2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] c1711127344f +FIND_ANCHOR_IRIS [federation] 794a5c139565 +GET_FLOWLINE_GEOMETRIES [federation] 1b2c8dc5e4e2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 970a4ae75376 +FIND_ANCHOR_IRIS [federation] b57ca9e8c32e +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] b6f2102221d1 +FIND_ANCHOR_IRIS [federation] 9a0037a928d9 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 82022c612381 +FIND_ANCHOR_IRIS [federation] 5151a972eede +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## waterBodies upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] c339d1c42d50 +FIND_ANCHOR_IRIS [federation] 423d5033fc48 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 5dbe52083d8c +FIND_ANCHOR_IRIS [federation] 18515c96f78d +GET_FLOWLINE_GEOMETRIES [federation] 5de1200d2e01 +HYDRATE_TARGET_BY_IRI [federation] 878b7218cf7c +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] 776babccec7b +FIND_ANCHOR_IRIS [federation] 3484afc2016f +GET_FLOWLINE_GEOMETRIES [federation] 5de1200d2e01 +HYDRATE_TARGET_BY_IRI [federation] c9531cc6fbe2 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 8a8df61dddeb +FIND_ANCHOR_IRIS [federation] 789f1ded1d8a +GET_FLOWLINE_GEOMETRIES [federation] 337d970b0f07 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] 52f8acbda00d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] c5ba856ac5a5 +FIND_ANCHOR_IRIS [federation] 802d35965666 +GET_FLOWLINE_GEOMETRIES [federation] 337d970b0f07 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] da7010fa25fd +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 242afddb2669 +FIND_ANCHOR_IRIS [federation] 748a8ca41a32 +GET_FLOWLINE_GEOMETRIES [federation] 8becca5939ec +HYDRATE_TARGET_BY_IRI [federation] af3062364f60 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] ab7cba78e7a4 +FIND_ANCHOR_IRIS [federation] e710b494417c +GET_FLOWLINE_GEOMETRIES [federation] 8becca5939ec +HYDRATE_TARGET_BY_IRI [federation] 719474b95b24 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] e5836fc46bf4 +FIND_ANCHOR_IRIS [federation] a0d6980914ac +GET_FLOWLINE_GEOMETRIES [federation] 53706371792a +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 5a01b1674751 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 5c5c06fd1d35 +FIND_ANCHOR_IRIS [federation] 1b7220b76dc0 +GET_FLOWLINE_GEOMETRIES [federation] 53706371792a +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 9c03aae08c7b +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 07f85ea74c11 +FIND_ANCHOR_IRIS [federation] e93784de47f2 +GET_FLOWLINE_GEOMETRIES [federation] 22b41e20cf91 +HYDRATE_TARGET_BY_IRI [federation] 83a09bfc0c0a +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] ca528e8925b8 +FIND_ANCHOR_IRIS [federation] 3691010af47d +GET_FLOWLINE_GEOMETRIES [federation] 22b41e20cf91 +HYDRATE_TARGET_BY_IRI [federation] 19c1603fd525 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 8d3c6166926c +FIND_ANCHOR_IRIS [federation] 3a2bb0cd96e0 +GET_FLOWLINE_GEOMETRIES [federation] b97f4349ba61 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 74340ac75507 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 77f682fb65ef +FIND_ANCHOR_IRIS [federation] 13bb3ff18f50 +GET_FLOWLINE_GEOMETRIES [federation] b97f4349ba61 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [federation] 1b55c84eb49b +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 163001e80cdb +FIND_ANCHOR_IRIS [federation] dcf4ba3a467c +GET_FLOWLINE_GEOMETRIES [federation] f9af91a7570a +HYDRATE_TARGET_BY_IRI [federation] aa5fdb59ec6f +HYDRATE_ANCHOR_BY_IRI [federation] 24b7baa84045 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 7d5fd908795e +FIND_ANCHOR_IRIS [federation] 119afb444b62 +GET_FLOWLINE_GEOMETRIES [federation] f9af91a7570a +HYDRATE_TARGET_BY_IRI [federation] 29547f75bee0 +HYDRATE_ANCHOR_BY_IRI [federation] 977ce19228f3 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 7d5fd908795e +FIND_ANCHOR_IRIS [federation] 119afb444b62 +GET_FLOWLINE_GEOMETRIES [federation] f9af91a7570a +HYDRATE_TARGET_BY_IRI [federation] 29547f75bee0 +HYDRATE_ANCHOR_BY_IRI [federation] 977ce19228f3 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 163001e80cdb +FIND_ANCHOR_IRIS [federation] dcf4ba3a467c +GET_FLOWLINE_GEOMETRIES [federation] f9af91a7570a +HYDRATE_TARGET_BY_IRI [federation] aa5fdb59ec6f +HYDRATE_ANCHOR_BY_IRI [federation] 24b7baa84045 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] f9a94dc1bcc9 +FIND_ANCHOR_IRIS [federation] c90f839ad3a4 +GET_FLOWLINE_GEOMETRIES [federation] 02e163a42cfe +HYDRATE_TARGET_BY_IRI [federation] 000f97199f10 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 93ba832c29d7 +FIND_ANCHOR_IRIS [federation] 8c23d3755445 +GET_FLOWLINE_GEOMETRIES [federation] 02e163a42cfe +HYDRATE_TARGET_BY_IRI [federation] bf2ceb812bdb +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] 50a3fd88e46f +FIND_ANCHOR_IRIS [federation] 50e13b4749a3 +GET_FLOWLINE_GEOMETRIES [federation] e4b7f27cdd3e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 90f83102d132 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 276ce6ba94f0 +FIND_ANCHOR_IRIS [federation] 57420cc1d1e2 +GET_FLOWLINE_GEOMETRIES [federation] e4b7f27cdd3e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 01821ca119a9 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 7cb722edd17a +FIND_ANCHOR_IRIS [federation] be142639d65c +HYDRATE_TARGET_BY_IRI [federation] 251a657c96b2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] ceaa643cf456 +FIND_ANCHOR_IRIS [federation] c1449fc486a8 +HYDRATE_TARGET_BY_IRI [federation] ac1966b9691f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 2fc1e89df154 +FIND_ANCHOR_IRIS [federation] f8efc6828155 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 898bd716c54a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## wells upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] 167778822ddb +FIND_ANCHOR_IRIS [federation] aae1eb735bf1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 0ab0a62dc232 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 296a0d00de9e +FIND_ANCHOR_IRIS [federation] 71f036d9cd02 +GET_FLOWLINE_GEOMETRIES [federation] 934aca1f2f29 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] 5109f240a9f0 +FIND_ANCHOR_IRIS [federation] fa5208b4f1f5 +GET_FLOWLINE_GEOMETRIES [federation] 934aca1f2f29 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 66321d87ce37 +FIND_ANCHOR_IRIS [federation] 2bcc64889ee4 +GET_FLOWLINE_GEOMETRIES [federation] a7ba4bf786b6 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] a548c30613f2 +FIND_ANCHOR_IRIS [federation] 123fa7029db0 +GET_FLOWLINE_GEOMETRIES [federation] a7ba4bf786b6 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 027492953f58 +FIND_ANCHOR_IRIS [federation] e1ccb826ce9b +GET_FLOWLINE_GEOMETRIES [federation] e0c43ef101a2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 7087d0c06d24 +FIND_ANCHOR_IRIS [federation] dfffea098028 +GET_FLOWLINE_GEOMETRIES [federation] e0c43ef101a2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] c1505f76d1a2 +FIND_ANCHOR_IRIS [federation] 78d85e00dcd9 +GET_FLOWLINE_GEOMETRIES [federation] 5bb2d62da8a0 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] be59394dac59 +FIND_ANCHOR_IRIS [federation] da77e9a226ae +GET_FLOWLINE_GEOMETRIES [federation] 5bb2d62da8a0 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] c1711127344f +FIND_ANCHOR_IRIS [federation] 794a5c139565 +GET_FLOWLINE_GEOMETRIES [federation] 1b2c8dc5e4e2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] bd10519b155e +FIND_ANCHOR_IRIS [federation] 6ad2a8fa8e74 +GET_FLOWLINE_GEOMETRIES [federation] 1b2c8dc5e4e2 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] 96f67a03be24 +FIND_ANCHOR_IRIS [federation] 90d82873e3c0 +GET_FLOWLINE_GEOMETRIES [federation] b3c1864cf554 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] ee66561a00f7 +FIND_ANCHOR_IRIS [federation] 02fc7f5ebfab +GET_FLOWLINE_GEOMETRIES [federation] b3c1864cf554 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 276ce6ba94f0 +FIND_ANCHOR_IRIS [federation] 57420cc1d1e2 +GET_FLOWLINE_GEOMETRIES [federation] e4b7f27cdd3e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 01821ca119a9 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 50a3fd88e46f +FIND_ANCHOR_IRIS [federation] 50e13b4749a3 +GET_FLOWLINE_GEOMETRIES [federation] e4b7f27cdd3e +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [federation] 90f83102d132 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 93ba832c29d7 +FIND_ANCHOR_IRIS [federation] 8c23d3755445 +GET_FLOWLINE_GEOMETRIES [federation] 02e163a42cfe +HYDRATE_TARGET_BY_IRI [federation] bf2ceb812bdb +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] f9a94dc1bcc9 +FIND_ANCHOR_IRIS [federation] c90f839ad3a4 +GET_FLOWLINE_GEOMETRIES [federation] 02e163a42cfe +HYDRATE_TARGET_BY_IRI [federation] 000f97199f10 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] d0422a3a1b39 +FIND_ANCHOR_IRIS [federation] 5a98acf98b84 +GET_FLOWLINE_GEOMETRIES [federation] 18a6e65f767f +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] e933a835c975 +FIND_ANCHOR_IRIS [federation] 19a47153e361 +GET_FLOWLINE_GEOMETRIES [federation] 18a6e65f767f +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] e933a835c975 +FIND_ANCHOR_IRIS [federation] 19a47153e361 +GET_FLOWLINE_GEOMETRIES [federation] 18a6e65f767f +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] d0422a3a1b39 +FIND_ANCHOR_IRIS [federation] 5a98acf98b84 +GET_FLOWLINE_GEOMETRIES [federation] 18a6e65f767f +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 5dfec1ecf571 +FIND_ANCHOR_IRIS [federation] 74f6726cb460 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] bba05a0302fc +FIND_ANCHOR_IRIS [federation] 6a8f8b9351bc +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 36f3da58361d +FIND_ANCHOR_IRIS [federation] a79808637aab +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## aquifers upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] 1c7638f408b9 +FIND_ANCHOR_IRIS [federation] b58c8c35f1eb +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] b4008588edaf +FIND_ANCHOR_IRIS [federation] 6ac9015a260c +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] ac7ebc96d761 +FIND_ANCHOR_IRIS [federation] fc48809955c6 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) samples [ME on A] +FIND_TARGET_IRIS [federation] 614ca43f8807 +FIND_ANCHOR_IRIS [federation] 3ac013fb1120 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) samples [ME on C] +FIND_TARGET_IRIS [federation] 55f5714d004c +FIND_ANCHOR_IRIS [federation] 27a652bc4a63 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] 1f724fa39386 +FIND_ANCHOR_IRIS [federation] 8138a7e702af +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] e792abfe6ef8 +FIND_ANCHOR_IRIS [federation] 10dbee777757 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) facilities [ME on A] +FIND_TARGET_IRIS [federation] a7c3f2ccff0c +FIND_ANCHOR_IRIS [federation] cc4b39ebe0a2 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) facilities [ME on C] +FIND_TARGET_IRIS [federation] 37c324b2fb11 +FIND_ANCHOR_IRIS [federation] dda55e8be700 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] c339d1c42d50 +FIND_ANCHOR_IRIS [federation] 423d5033fc48 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 82022c612381 +FIND_ANCHOR_IRIS [federation] 5151a972eede +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 196733917305 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) waterBodies [ME on A] +FIND_TARGET_IRIS [federation] b6f2102221d1 +FIND_ANCHOR_IRIS [federation] 9a0037a928d9 +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) waterBodies [ME on C] +FIND_TARGET_IRIS [federation] 970a4ae75376 +FIND_ANCHOR_IRIS [federation] b57ca9e8c32e +HYDRATE_TARGET_BY_IRI [hydrologykg] 3b88da2bc6f2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] 167778822ddb +FIND_ANCHOR_IRIS [federation] aae1eb735bf1 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 0ab0a62dc232 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 2fc1e89df154 +FIND_ANCHOR_IRIS [federation] f8efc6828155 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [federation] 898bd716c54a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) wells [ME on A] +FIND_TARGET_IRIS [federation] ceaa643cf456 +FIND_ANCHOR_IRIS [federation] c1449fc486a8 +HYDRATE_TARGET_BY_IRI [federation] ac1966b9691f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) wells [ME on C] +FIND_TARGET_IRIS [federation] 7cb722edd17a +FIND_ANCHOR_IRIS [federation] be142639d65c +HYDRATE_TARGET_BY_IRI [federation] 251a657c96b2 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] 1c7638f408b9 +FIND_ANCHOR_IRIS [federation] b58c8c35f1eb +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 36f3da58361d +FIND_ANCHOR_IRIS [federation] a79808637aab +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) aquifers [ME on A] +FIND_TARGET_IRIS [federation] bba05a0302fc +FIND_ANCHOR_IRIS [federation] 6a8f8b9351bc +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) aquifers [ME on C] +FIND_TARGET_IRIS [federation] 5dfec1ecf571 +FIND_ANCHOR_IRIS [federation] 74f6726cb460 +HYDRATE_TARGET_BY_IRI [hydrologykg] eb3b32e6b88d +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] ff4f5433385d +FIND_ANCHOR_IRIS [federation] 8e0f26314aa4 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams downstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] 13b885df21d2 +FIND_ANCHOR_IRIS [federation] 2b58e51b6c3d +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) streams [ME on A] +FIND_TARGET_IRIS [federation] 13b885df21d2 +FIND_ANCHOR_IRIS [federation] 2b58e51b6c3d +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## streams upstream(30km) streams [ME on C] +FIND_TARGET_IRIS [federation] ff4f5433385d +FIND_ANCHOR_IRIS [federation] 8e0f26314aa4 +HYDRATE_TARGET_BY_IRI [hydrologykg] 373c4f087d16 +HYDRATE_ANCHOR_BY_IRI [hydrologykg] aeb350c37047 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: near hops=0 +FIND_TARGET_IRIS [federation] a01b1b84351c +FIND_ANCHOR_IRIS [federation] 5c0972841eb9 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: near hops=2 +FIND_TARGET_IRIS [federation] 396a2519092b +FIND_ANCHOR_IRIS [federation] aadf4d36b6ad +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: near hops=4 +FIND_TARGET_IRIS [federation] c8190383299a +FIND_ANCHOR_IRIS [federation] edaa65a35aac +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: downstream maxDistanceKm=10 +FIND_TARGET_IRIS [federation] 3325fb88c1d7 +FIND_ANCHOR_IRIS [federation] 74c3d0bb8bf8 +GET_FLOWLINE_GEOMETRIES [federation] 91f383f2621e +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: upstream maxDistanceKm=10 +FIND_TARGET_IRIS [federation] 061fd7e20e08 +FIND_ANCHOR_IRIS [federation] 875d5698ab94 +GET_FLOWLINE_GEOMETRIES [federation] d7635cc00d76 +HYDRATE_TARGET_BY_IRI [federation] 7b8a451b6ce6 +HYDRATE_ANCHOR_BY_IRI [federation] 48bc512f5a3a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: PI question: facilities upstream from PFOS samples in York, detections only +FIND_TARGET_IRIS [federation] 8cb4f136fa6e +FIND_ANCHOR_IRIS [federation] aa8204e520fc +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 4ef4712a6813 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: PI question, bounded to 30km of flow +FIND_TARGET_IRIS [federation] 1f6c48b09155 +FIND_ANCHOR_IRIS [federation] f996426f75e0 +GET_FLOWLINE_GEOMETRIES [federation] 3c6a4d4ad1b9 +HYDRATE_TARGET_BY_IRI [federation] 4ef4712a6813 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: samples substance filter only +FIND_TARGET_IRIS [federation] fe93660f9298 +FIND_ANCHOR_IRIS [federation] 9ef048145cc3 +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] abac476ba422 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: samples include-nondetects off only +FIND_TARGET_IRIS [federation] 1d4fff471300 +FIND_ANCHOR_IRIS [federation] 64a08a171f7d +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 18f27c194233 +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: no region either side +FIND_TARGET_IRIS [federation] 129a5d0e306a +FIND_ANCHOR_IRIS [federation] 4dee4c0f482e +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +## VARIANT: county-scoped both sides +FIND_TARGET_IRIS [federation] 8e74bfffca28 +FIND_ANCHOR_IRIS [federation] ea51101cddd0 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [federation] ec6ed949be4d +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: sample filters +FIND_TARGET_IRIS [federation] 7b1c835798e7 +FIND_ANCHOR_IRIS [federation] b4f373f3b10c +GET_FLOWLINE_GEOMETRIES [federation] 10a063aa6d84 +HYDRATE_TARGET_BY_IRI [federation] 225ebb47d1ba +HYDRATE_ANCHOR_BY_IRI [federation] f15a49a11b96 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: facility + water body + well + aquifer filters +FIND_TARGET_IRIS [federation] ff0e8a4e0a65 +FIND_ANCHOR_IRIS [federation] 24db169bc111 +HYDRATE_TARGET_BY_IRI [federation] 9498222e580a +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 025d57e51b2a +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa +## VARIANT: stream ftype filter as target +FIND_TARGET_IRIS [federation] f484f51fbc63 +FIND_ANCHOR_IRIS [federation] 3b68e8810ae7 +HYDRATE_TARGET_BY_IRI [federation] 86920d0a3b5f +HYDRATE_ANCHOR_BY_IRI [hydrologykg] 3da8119633c2 +GET_REGION_BOUNDARIES [spatialkg] d52aaecf97fa + +# ---- query bodies, one line per distinct query ---- +000f97199f10 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +003f0f16f9b1 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +01821ca119a9 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +01ac5b24c08f SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +021c99bd21fe SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +025d57e51b2a SELECT DISTINCT ?aquifer ?aquiferType WHERE { VALUES ?aquifer { } ?aquifer rdf:type gwml2:GW_Aquifer . OPTIONAL { ?aquifer saw_water:aquiferType ?aquiferType . } } +027492953f58 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +02e163a42cfe SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +02fc7f5ebfab SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +032ea9425e6f SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +05cd3b39feaf SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +060c1e184a76 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +061fd7e20e08 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +0667c0004f62 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +06c0038fb4ce SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +07bcc0d2ef5b SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +07f85ea74c11 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +081ffe103105 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +08ee3e23c632 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +090aa1368fc6 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +09c1cecf0048 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +09e5950369e5 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +0a29f890a209 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +0ab0a62dc232 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +0bb0f6a91db9 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +0be21b7acfd7 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +0bf72e236353 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +0c695b9c750b SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +0cb147205839 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +0d03523e6c23 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +0d49e383659d SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +0d7cd31e6182 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +0d9fd4f4b10a SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +1084c720a6cc SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +1084e9f48e96 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +10a063aa6d84 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +10dbee777757 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +114ec252bd7e SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +1195457ff6d4 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +119afb444b62 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +123fa7029db0 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +129a5d0e306a SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +132f284d8912 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +137df84ed6d2 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +13b885df21d2 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +13bb3ff18f50 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +141d81ecb9ec SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +14e83b4e30cd SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +14f6bfc3ef2b SELECT DISTINCT (?streamA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +1506d58ef072 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +151ef1e41632 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +153a3a7992c8 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +163001e80cdb SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +167778822ddb SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +17938cd745d9 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +18515c96f78d SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +187c48927d97 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +1890d6fd07a7 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +18a6e65f767f SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +18f27c194233 SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) FILTER(BOUND(?numericResult)) } GROUP BY ?sp ?spWKT ?s2cell +192ca0747233 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +196733917305 SELECT DISTINCT ?waterBody ?wbWKT ?wbName ?ftype ?comid ?reachcode ?fcode ?s2cell WHERE { VALUES ?waterBody { } ?s2cell spatial:connectedTo ?waterBody ; rdf:type kwg-ont:S2Cell_Level13 . ?waterBody rdf:type hyf:HY_WaterBody ; geo:hasGeometry/geo:asWKT ?wbWKT . OPTIONAL { ?waterBody schema:name ?wbName . } OPTIONAL { ?waterBody nhdplusv2:hasFTYPE ?ftype . } OPTIONAL { ?waterBody nhdplusv2:hasCOMID ?comid . } OPTIONAL { ?waterBody nhdplusv2:hasReachCode ?reachcode . } OPTIONAL { ?waterBody nhdplusv2:hasFCODE ?fcode . } } +19a47153e361 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +19c1603fd525 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +1a0e0369b410 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +1b2c8dc5e4e2 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +1b55c84eb49b SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +1b7220b76dc0 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +1b7a89412729 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +1bce75dee487 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +1beadb689ecd SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +1c5477f4a20d SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +1c7638f408b9 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +1d4fff471300 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +1da7ac18c1ca SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +1efed1c496e5 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +1f6c48b09155 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +1f724fa39386 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +208b7a3a6317 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +20f966337069 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +21aab4d7bdf7 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +223115ac5eb1 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +225ebb47d1ba SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . ?result coso:measurementUnit ?unit . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) VALUES ?substance { } VALUES ?matType { } BIND(xsd:decimal(?numericResult) as ?numericValue) FILTER(BOUND(?numericValue) && ?unit = && ?numericValue >= 4 && ?numericValue <= 100) } GROUP BY ?sp ?spWKT ?s2cell +22b41e20cf91 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +22c02f8cd68b SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +2372d3380521 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +23e64482073d SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +242afddb2669 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +24b7baa84045 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +24db169bc111 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?aquiferA saw_water:aquiferType ?aqTypeA . VALUES ?aqTypeA { "bedrock" } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type me_mgs:MGS-Well . ?wellC me_mgs:hasUse ?wuC . VALUES ?wuC { } } } +24e2d640eb8b SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +251a657c96b2 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +25554a2d770e SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +25764463de3a SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +258e1bb27b55 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +25e35a116a7a SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +26597fe15d0e SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +26bf05053779 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +26ef89af73d7 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +276ce6ba94f0 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +27a652bc4a63 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +288129aa4dbe SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +294457930c79 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +29547f75bee0 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +296a0d00de9e SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +29735aa2afea SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +2a2add9e3c26 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +2ab8259a58d6 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +2b48a40c896d SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +2b58e51b6c3d SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +2bc13625bc04 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +2bcc64889ee4 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +2bec684879ca SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +2c9b021c5ece SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +2e32c0ffbc3c SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +2ecade927c68 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +2ece82229dce SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +2f7c9d07ed1a SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +2f9aec17c4e9 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +2fc1e89df154 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +2fdb9d27c845 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +2fe8928c9eac SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +30b8f06aa807 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +31d0f4e2be6f SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +320b9d0e5ff8 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +32747a1b563b SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +32cbf641e1bc SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +32f1aa55d0ea SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +3325fb88c1d7 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +337d970b0f07 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +33e4f401a9db SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +3484afc2016f SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +35e5e0379327 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +35eea760e846 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +3691010af47d SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +36f3da58361d SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +3735b227534b SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +373c4f087d16 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { VALUES ?flowline { } ?flowline rdf:type hyf:HY_FlowPath ; geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +377f854f6cc6 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +37c324b2fb11 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +38cb444f42f8 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +39419051512e SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +396a2519092b SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor (kwg-ont:sfTouches | owl:sameAs)/(kwg-ont:sfTouches | owl:sameAs) ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +39f68d9178a5 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +3a19b33e3025 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +3a2bb0cd96e0 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +3a5de06aa701 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +3ac013fb1120 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +3b68e8810ae7 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?streamA nhdplusv2:hasFTYPE ?flFtypeA . VALUES ?flFtypeA { "460" } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +3b88da2bc6f2 SELECT DISTINCT ?waterBody ?wbWKT ?wbName ?ftype ?comid ?reachcode ?fcode ?s2cell WHERE { VALUES ?waterBody { } ?s2cell spatial:connectedTo ?waterBody ; rdf:type kwg-ont:S2Cell_Level13 . ?waterBody rdf:type hyf:HY_WaterBody ; geo:hasGeometry/geo:asWKT ?wbWKT . OPTIONAL { ?waterBody schema:name ?wbName . } OPTIONAL { ?waterBody nhdplusv2:hasFTYPE ?ftype . } OPTIONAL { ?waterBody nhdplusv2:hasCOMID ?comid . } OPTIONAL { ?waterBody nhdplusv2:hasReachCode ?reachcode . } OPTIONAL { ?waterBody nhdplusv2:hasFCODE ?fcode . } } +3bcbbc61caae SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +3bce92acebce SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +3c4091f51398 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +3c6a4d4ad1b9 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +3cdf1859eeef SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +3da8119633c2 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { VALUES ?flowline { } ?flowline rdf:type hyf:HY_FlowPath ; geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } VALUES ?fl_type { "460" } } +3dbb4fd45439 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +3de8c144de70 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +3e4c26e61ee4 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +404c3355f3fd SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +409740b46fb7 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +40a495b7a46a SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +40c7bc3ecc04 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +41ca24011057 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +423d5033fc48 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +42fba0d6b6e4 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +436d3320d910 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +440f71464197 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +454a12d54a4b SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +46bc1db1c4db SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +4786e399d0e3 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +481ef65eaf6e SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +48a5326856de SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +48bc512f5a3a SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) } GROUP BY ?sp ?spWKT ?s2cell +4a22e1a87031 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +4ae27f7b3056 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +4b6cc3a024ee SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +4bc79000b146 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +4ca2878d179f SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +4cd25d8b0a3e SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +4cf300178a3d SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +4d08a3f185ec SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +4dee4c0f482e SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +4e22903dafb8 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +4eb7e82611af SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +4ef4712a6813 SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) VALUES ?substance { } FILTER(BOUND(?numericResult)) } GROUP BY ?sp ?spWKT ?s2cell +4f5453f9e32d SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +4feabc0eeaca SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +5005fd5c331c SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +50885dc7a1b9 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +50a3fd88e46f SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +50afef424c69 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +50e13b4749a3 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +5109f240a9f0 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +5151a972eede SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +518849e03a5b SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +52f8acbda00d SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +53706371792a SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +5393441889bb SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +542cd3bf0080 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +54b1d508458d SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +5515bd777411 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +55f5714d004c SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +56c5b92ab83e SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +56ea6a34453b SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +56f38a86aec7 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +57420cc1d1e2 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +581c48ae304e SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +58c16900aa65 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +592bae86ed3a SELECT DISTINCT (?wellA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +59aee765110c SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +59b91de5e995 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +5a01b1674751 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +5a03f4f3aae3 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +5a98acf98b84 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +5ab06945d883 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +5abc07c304ad SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +5aedb347a53b SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +5bb2d62da8a0 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +5c0972841eb9 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . BIND(?s2anchor AS ?s2target) ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +5c5c06fd1d35 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +5c6cc33fae88 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +5dbe52083d8c SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +5de1200d2e01 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +5dfec1ecf571 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +5e175b050654 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +5f95683d03c3 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +60802b6a7386 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +614ca43f8807 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +6203bb98fd9b SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +629f7809931c SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +62aa5619bc67 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +62f130505471 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +6316b038687c SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +631a69b1a6a7 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +63fd9d8c7d26 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +642252450459 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +64a08a171f7d SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +6537d90d135f SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +659f6c7fa3f9 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +66321d87ce37 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +663f948f7bf0 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +666e8b5700a2 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +66b8cb8fd320 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +66c78fc2515a SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +672355872582 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +67b90dec7f24 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +69f0475ae80a SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +6a8f8b9351bc SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +6ac9015a260c SELECT DISTINCT (?spA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +6ad2a8fa8e74 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +6b0632214d35 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +6b13c5e7d199 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +6b18905b32f2 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +6c90238c34b5 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +6cab754cbe12 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +6cc73e470a1e SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +6da1ed2de01d SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +6dda347a097f SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +6ddb9c48525a SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +6e59770323b3 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +6e6e6eba070d SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +6e78232de987 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +6ed5aed4968a SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +6ede512b148d SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +6f09d7bbdcc7 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +6ff4852b422e SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +70123c8b61f0 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +7087d0c06d24 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +70ac417804f8 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +713a1f7f8ae5 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +714064e8e781 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +719474b95b24 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +71f036d9cd02 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +73511fbb8c8f SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +73934d7aae0d SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +73c37175d3a3 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +74340ac75507 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +748a8ca41a32 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +74c3d0bb8bf8 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +74f6726cb460 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +751b01f1248c SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +7530ba837a17 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +7604a06153a0 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +7658df86ebfb SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +776babccec7b SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +77f682fb65ef SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +789f1ded1d8a SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +78d85e00dcd9 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +78dcb9fb3928 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +78e1f8a446f0 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +790b26da2a79 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +794a5c139565 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +79b82d9e0fe1 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +79e0bd042512 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +7aa05f4cf432 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +7ab11f2c9448 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +7b1c835798e7 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . VALUES ?selectedIndustryA { naics:NAICS-562212 } FILTER(?industryCodeA = ?selectedIndustryA || EXISTS { ?industryCodeA fio:subcodeOf ?selectedIndustryA }) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:analyzedSample ?sampleC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?resultC coso:measurementUnit ?unitC . VALUES ?substanceC { } VALUES ?matTypeC { } BIND(xsd:decimal(?numericResultC) as ?numericValueC) FILTER(BOUND(?numericValueC) && ?unitC = && ?numericValueC >= 4 && ?numericValueC <= 100) } +7b5980388f2c SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +7b8a451b6ce6 SELECT DISTINCT ?facility ?facWKT ?facilityName ?industryCode ?industryName ?s2cell WHERE { VALUES ?facility { } ?s2cell kwg-ont:sfContains ?facility ; rdf:type kwg-ont:S2Cell_Level13 . ?facility fio:ofIndustry ?industryCode ; geo:hasGeometry/geo:asWKT ?facWKT ; rdfs:label ?facilityName . ?industryCode a naics:NAICS-IndustryCode ; rdfs:label ?industryName . } +7c9c4702ede4 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +7cb722edd17a SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +7d5fd908795e SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +7d7f1e7d7c60 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +7dad41fdfd60 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +802d35965666 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +80df1fdbcf14 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +81325b745fd1 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +8138a7e702af SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +81641e7d1349 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +82022c612381 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +827004d998b2 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +832afed999c2 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +83a09bfc0c0a SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +83d77a45d03c SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +84faebbbe4de SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +8529b7fb6ffa SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +86920d0a3b5f SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) } GROUP BY ?sp ?spWKT ?s2cell +86a26ec60121 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +871365cea3c3 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +8758a29be4cd SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +875d5698ab94 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +878b7218cf7c SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +886826560be6 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +887006d733eb SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +889f03c020e8 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +88a05eee9640 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +88b94aeb229d SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +88d952d2a2c5 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +8952d69eebf7 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +898bd716c54a SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +8a0c2df70ce0 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +8a1266fbf3b4 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +8a8df61dddeb SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +8abd2faf7bb0 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +8b7cd81ea5cf SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +8becca5939ec SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +8c23d3755445 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +8c6ab3d31bf7 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +8c90b6016e50 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +8cb4f136fa6e SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +8d3c6166926c SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +8db700fbc3ba SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +8dfa184e0d2b SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +8e0f26314aa4 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +8e23014aa73f SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +8e369b7deccc SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +8e74bfffca28 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . VALUES ?_regionA { kwgr:administrativeRegion.USA.23005 kwgr:administrativeRegion.USA.23019 } ?s2anchor spatial:connectedTo ?_regionA . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23019 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +8ef73aad6fa9 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +8f5c7dd5246f SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +8fbe3088c265 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +9039e57855e1 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +907b64185777 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +90d0a0452943 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +90d82873e3c0 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +90f83102d132 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +91f383f2621e SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +920687fc77ed SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +934aca1f2f29 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +934d8ac6f612 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +935860c79d56 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +93ba832c29d7 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +93c67796bf6d SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +9498222e580a SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?aquiferA saw_water:aquiferType ?aqTypeA . VALUES ?aqTypeA { "bedrock" } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type me_mgs:MGS-Well . ?wellC me_mgs:hasUse ?wuC . VALUES ?wuC { } } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +94b023ca04bf SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +94d434376702 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +950c0e678218 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +9575a458430b SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +95fe8b8c33ba SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +962a202132fc SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +968075df2792 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +96f67a03be24 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +970a4ae75376 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +977ce19228f3 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +9813a80e0c5a SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +98b1603dafe4 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +98d7c72d4aab SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +9968e7786c81 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +99dd9196dcc8 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +9a0037a928d9 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +9a08433a48e0 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +9b750fdb6a09 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +9ba66fec62a1 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +9c03aae08c7b SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +9c73285f224c SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +9e253e2c142d SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +9e8aee90f1eb SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +9ef048145cc3 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . VALUES ?substanceC { } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +9f5c1bba715e SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +9f955f3f75d5 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +a01b1b84351c SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . BIND(?s2anchor AS ?s2target) ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +a0d6980914ac SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +a1a3610cba42 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +a28356585b79 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +a3823ffd8794 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +a3ac25aca5df SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +a408ff1eb89d SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +a4e3147c72d7 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +a4f6491c0e2c SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +a548c30613f2 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +a62588d4bcb9 SELECT DISTINCT (?spA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +a735c3a3bff6 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +a79808637aab SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +a7b1fa7dc839 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +a7b4475fa918 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +a7ba4bf786b6 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +a7c3f2ccff0c SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +a7e872d51a0f SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +a963e5be882c SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +a99936a88d0b SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +aa5fdb59ec6f SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +aa8204e520fc SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +aadf4d36b6ad SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor (kwg-ont:sfTouches | owl:sameAs)/(kwg-ont:sfTouches | owl:sameAs) ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +aae1eb735bf1 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +ab4e12addc23 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +ab7cba78e7a4 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +abac476ba422 SELECT (COUNT(DISTINCT ?observation) as ?resultCount) (COUNT(DISTINCT ?sample) as ?sampleCount) (MAX(?numericResult) as ?max) (GROUP_CONCAT(DISTINCT ?substance; separator="; ") as ?substances) (GROUP_CONCAT(DISTINCT ?matTypeLabel; separator="; ") as ?materials) (SAMPLE(?spName) as ?samplePointName) ?sp ?spWKT ?s2cell WHERE { VALUES ?sp { } ?sp spatial:connectedTo ?s2cell ; geo:hasGeometry/geo:asWKT ?spWKT . OPTIONAL { ?sp rdfs:label ?spName } ?s2cell rdf:type kwg-ont:S2Cell_Level13 . ?observation rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp ; coso:ofDSSToxSubstance ?substance ; coso:analyzedSample ?sample ; coso:hasResult ?result . ?sample rdfs:label ?sampleLabel ; coso:sampleOfMaterialType ?matType . ?matType rdfs:label ?matTypeLabel . OPTIONAL { ?result qudt:quantityValue/qudt:numericValue ?numericResult } OPTIONAL { ?result qudt:quantityValue ?_qv . ?_qv rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetect) } BIND(COALESCE(STR(?numericResult), IF(BOUND(?nonDetect), "non-detect", "non-quantified")) AS ?result_value) VALUES ?substance { } } GROUP BY ?sp ?spWKT ?s2cell +ac1966b9691f SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +ac7ebc96d761 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +ac87cac97a08 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +ade4600c7066 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +aeb350c37047 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { VALUES ?flowline { } ?flowline rdf:type hyf:HY_FlowPath ; geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +aec41960948e SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +af3062364f60 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +b0335b863895 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +b0f01594fdb4 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +b0f1db6f8073 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +b22e14df0511 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +b2a4e26f4048 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +b2a9610b7c52 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +b3c1864cf554 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?aquiferA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +b4008588edaf SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +b43c08af1964 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +b44db2e80018 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +b45c05b3136a SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +b4f373f3b10c SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . VALUES ?selectedIndustryA { naics:NAICS-562212 } FILTER(?industryCodeA = ?selectedIndustryA || EXISTS { ?industryCodeA fio:subcodeOf ?selectedIndustryA }) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:analyzedSample ?sampleC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?resultC coso:measurementUnit ?unitC . VALUES ?substanceC { } VALUES ?matTypeC { } BIND(xsd:decimal(?numericResultC) as ?numericValueC) FILTER(BOUND(?numericValueC) && ?unitC = && ?numericValueC >= 4 && ?numericValueC <= 100) } +b57ca9e8c32e SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +b58c8c35f1eb SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +b679bd47f6b1 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +b6893ae200af SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +b6983d91a529 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +b6d4297f115e SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +b6f2102221d1 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +b6f61e4f4ff3 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +b7423f86a11e SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +b948c1dadad5 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +b97f4349ba61 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +b9d0126bda7a SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +b9d52f76c5da SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +ba778257a97f SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +ba8393ad2e9d SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +bac0c29c4f57 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +bba05a0302fc SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +bba7273cdba4 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +bc5e31538d28 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +bd10519b155e SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +bd4eab4c6f66 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +be142639d65c SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +be1b15d1b106 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +be59394dac59 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +bea267f2f762 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +bea7dc72f773 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +bf2ceb812bdb SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +bf6a1a426eb1 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +bf8ffdfa1ad9 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +c06847a4af0d SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +c0f56f77ba8f SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +c1449fc486a8 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +c1505f76d1a2 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +c1711127344f SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +c339d1c42d50 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +c35d18356b27 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +c36613529a50 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +c449e2e870bf SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +c498321cc486 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +c547f4e0656f SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +c5ae9f5fc826 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +c5ba856ac5a5 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +c6129be91792 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +c668a2061d6c SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +c80d21e0d32d SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +c8190383299a SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches/kwg-ont:sfTouches/kwg-ont:sfTouches/kwg-ont:sfTouches ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +c8295f7305c1 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +c85fdb421ca6 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +c8b9648ad9ad SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +c90f839ad3a4 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +c9531cc6fbe2 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +ca1086992b60 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +ca528e8925b8 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +cb961f64c07f SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +cbb05158da0c SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +cc4b39ebe0a2 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +cd1d79f23ba8 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +cd57b7a763e6 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?waterBodyC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +cdddd6bdf1d7 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +ce0c65a4578d SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +ceaa643cf456 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +cf073b1ce3f0 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +cf808bb25a1f SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +cfe6f604cde9 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +d01ac74e4cc0 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +d0422a3a1b39 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +d1b9348ef98d SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +d271f8200100 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +d2b20fc4e76d SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +d2cd8e8cafdf SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +d335a3eda455 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +d4ff9a18f9cf SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +d52aaecf97fa SELECT ?region (SAMPLE(?_name) AS ?regionName) (SAMPLE(?_wkt) AS ?regionWKT) WHERE { ?region kwg-ont:administrativePartOf kwgr:administrativeRegion.USA.23 ; rdfs:label ?_name ; geo:hasGeometry/geo:asWKT ?_wkt . FILTER(STRSTARTS(STR(?region), STR(kwgr:))) } GROUP BY ?region +d58893c96966 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +d7635cc00d76 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(10)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +d7ee9691da5b SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?spC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2celltarget . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +d913d9d71840 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +d98072521790 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +da7010fa25fd SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spC ; coso:ofDSSToxSubstance ?substanceC ; coso:analyzedSample ?sampleC ; coso:hasResult ?resultC . ?sampleC coso:sampleOfMaterialType ?matTypeC . ?matTypeC rdfs:label ?matTypeLabelC . ?resultC coso:measurementUnit ?unitC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +da77e9a226ae SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +daae4206ce0f SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +daaf4827bae1 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +dc18ede4eeac SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +dc4d5d46d3f1 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } +dc584e6cfe79 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +dcf4ba3a467c SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +dd8ee4b54845 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +dda55e8be700 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +ddfaa9f20f19 SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +dfffea098028 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +e0c43ef101a2 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?facilityA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +e0d3a87dd863 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +e0f406bc2dd6 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +e0f6624fc264 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +e13c4295e7b0 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +e1ccb826ce9b SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +e238ca8606c2 SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +e2b3d9f8c117 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +e30770406b41 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +e3bb217bc214 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +e45a36c23efe SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +e466cf40dd85 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +e4b7f27cdd3e SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +e5376ca0aa0a SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . BIND(?ds_flowline AS ?streamC) } +e5836fc46bf4 SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +e68708fa1d30 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +e6e5f175099a SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +e6eca666d07e SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +e710b494417c SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +e792abfe6ef8 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +e7e2854c8ae7 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +e8b95c8c5b5d SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +e933a835c975 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +e93784de47f2 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +e9b13461268b SELECT DISTINCT (?aquiferA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +ea51101cddd0 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . VALUES ?_regionA { kwgr:administrativeRegion.USA.23005 kwgr:administrativeRegion.USA.23019 } ?s2anchor spatial:connectedTo ?_regionA . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23019 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +ea51a457af43 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +eb3b32e6b88d SELECT DISTINCT ?aquifer ?aquiferType WHERE { VALUES ?aquifer { } ?aquifer rdf:type gwml2:GW_Aquifer . OPTIONAL { ?aquifer saw_water:aquiferType ?aquiferType . } } +eb7c41d74f46 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +ebbacce57f0e SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?spA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?aquiferC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +ebbb13c13f83 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +ec6ed949be4d SELECT DISTINCT ?facility ?facWKT ?facilityName ?industryCode ?industryName ?s2cell WHERE { VALUES ?facility { } ?s2cell kwg-ont:sfContains ?facility ; rdf:type kwg-ont:S2Cell_Level13 . ?facility fio:ofIndustry ?industryCode ; geo:hasGeometry/geo:asWKT ?facWKT ; rdfs:label ?facilityName . ?industryCode a naics:NAICS-IndustryCode ; rdfs:label ?industryName . } +ec935451ecfb SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +ece4d96de601 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +eda7f49eaf9d SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +edaa65a35aac SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches/kwg-ont:sfTouches/kwg-ont:sfTouches/kwg-ont:sfTouches ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +ee66561a00f7 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +ee767dadbf6f SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } } +eeb6a4be8d87 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +eedde23983a6 SELECT DISTINCT (?streamA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +ef35db5ca18b SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +ef7f4d420285 SELECT DISTINCT (?aquiferC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +f015bfcba03e SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus ; hyf:downstreamFlowPathTC ?flowline . } } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +f0c206010b68 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +f0d79c0a39c3 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +f15a49a11b96 SELECT DISTINCT ?facility ?facWKT ?facilityName ?industryCode ?industryName ?s2cell WHERE { VALUES ?facility { } ?s2cell kwg-ont:sfContains ?facility ; rdf:type kwg-ont:S2Cell_Level13 . ?facility fio:ofIndustry ?industryCode ; geo:hasGeometry/geo:asWKT ?facWKT ; rdfs:label ?facilityName . ?industryCode a naics:NAICS-IndustryCode ; rdfs:label ?industryName . VALUES ?selectedIndustry { naics:NAICS-562212 } FILTER(?industryCode = ?selectedIndustry || EXISTS { ?industryCode fio:subcodeOf ?selectedIndustry }) } +f1abbefd32dd SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +f1e4ac3d1adc SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +f2161e75506a SELECT DISTINCT (?wellC AS ?well) ?wellWKT (?s2target AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?observationA rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?spA ; coso:ofDSSToxSubstance ?substanceA ; coso:analyzedSample ?sampleA ; coso:hasResult ?resultA . ?sampleA coso:sampleOfMaterialType ?matTypeA . ?matTypeA rdfs:label ?matTypeLabelA . ?resultA coso:measurementUnit ?unitA . OPTIONAL { ?resultA qudt:quantityValue/qudt:numericValue ?numericResultA } OPTIONAL { ?resultA qudt:quantityValue ?_qvA . ?_qvA rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectA) } BIND(COALESCE(STR(?numericResultA), IF(BOUND(?nonDetectA), "non-detect", "non-quantified")) AS ?result_valueA) ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?wellC geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellC rdfs:label ?wellName . } OPTIONAL { ?wellC me_mgs:hasUse ?meUse . } OPTIONAL { ?wellC me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellC me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellC me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellC il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellC il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellC il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellC il_isgs:wellYield/qudt:numericValue ?ilYield . } } +f2ec010e4080 SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +f484f51fbc63 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?streamA nhdplusv2:hasFTYPE ?flFtypeA . VALUES ?flFtypeA { "460" } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +f560ebd6282b SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +f56b87fc7251 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +f58221d89287 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . } +f7a2dba8957d SELECT DISTINCT (?waterBodyA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . } +f80f83193d16 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . } +f878bab0aeba SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +f8a37eb37178 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +f8ce75f3f7ee SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } +f8efc6828155 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +f996426f75e0 SELECT DISTINCT (?facilityA AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23031 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . ?observationC coso:hasResult ?resultC . OPTIONAL { ?resultC qudt:quantityValue/qudt:numericValue ?numericResultC } OPTIONAL { ?resultC qudt:quantityValue ?_qvC . ?_qvC rdf:type coso:NonDetectQuantityValue . BIND(true AS ?nonDetectC) } BIND(COALESCE(STR(?numericResultC), IF(BOUND(?nonDetectC), "non-detect", "non-quantified")) AS ?result_valueC) VALUES ?substanceC { } FILTER(BOUND(?numericResultC)) ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +f9a94dc1bcc9 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . } +f9af91a7570a SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?wellA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?wellC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +fa1833c58b13 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?s2target spatial:connectedTo ?ds_flowline . } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +fa5208b4f1f5 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?aquiferC . ?aquiferC rdf:type gwml2:GW_Aquifer . } +fa96bd1b30f8 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type il_isgs:ISGS-Well } UNION { ?wellC rdf:type me_mgs:MGS-Well } } +faa0a03241cd SELECT DISTINCT (?facilityC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . } +fb42af7be1f5 SELECT DISTINCT (?wellA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +fbcba6bb42a9 SELECT DISTINCT (?waterBodyC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +fc48809955c6 SELECT DISTINCT (?spA AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?upstream_flowline WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spA rdf:type coso:SamplePoint ; spatial:connectedTo ?s2anchor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2neighbor spatial:connectedTo ?upstream_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath . } } ?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?upstream_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd hyf:downstreamFlowPath? ?ds_flowline . } } BIND(?ds_flowline AS ?streamC) } +fcaea4147d56 SELECT DISTINCT (?streamC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo ?streamC . ?streamC rdf:type hyf:HY_FlowPath . } +fd28138d5b69 SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName ?path_length WHERE { { SELECT ?flowline (MIN(?_ptotal) AS ?path_length) WHERE { { SELECT ?_flSeed ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?_flSeed ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?_flSeed WHERE { { SELECT DISTINCT ?s2cellus WHERE { VALUES ?waterBodyA { } ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?waterBodyA . ?waterBodyA rdf:type hyf:HY_WaterBody . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2cellus . } } ?_flSeed rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2cellus . } } ?_flSeed hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?_flSeed ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?_flEnd nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_endLen . ?_flEnd hyf:downstreamFlowPath? ?flowline . BIND(IF(?flowline = ?_flEnd, 0.0, ?_endLen) AS ?_extra) BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } { SELECT DISTINCT ?flowline WHERE { { SELECT DISTINCT ?s2celltarget WHERE { VALUES ?facilityC { } ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . ?s2celltarget kwg-ont:sfContains ?facilityC . ?facilityC fio:ofIndustry ?industryCodeC . ?industryCodeC a naics:NAICS-IndustryCode . } } ?_flTarget spatial:connectedTo ?s2celltarget . ?flowline hyf:downstreamFlowPathTC ?_flTarget . } } ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } } +fe93660f9298 SELECT DISTINCT (?spC AS ?iri) WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?spC rdf:type coso:SamplePoint ; spatial:connectedTo ?s2target . ?observationC coso:observedAtSamplePoint ?spC . ?observationC coso:ofDSSToxSubstance ?substanceC . VALUES ?substanceC { } ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor kwg-ont:sfContains ?facilityA . ?facilityA fio:ofIndustry ?industryCodeA . ?industryCodeA a naics:NAICS-IndustryCode . } +ff0e8a4e0a65 SELECT DISTINCT (?wellC AS ?iri) WHERE { ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?aquiferA . ?aquiferA rdf:type gwml2:GW_Aquifer . ?aquiferA saw_water:aquiferType ?aqTypeA . VALUES ?aqTypeA { "bedrock" } ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2target . ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?wellC . { ?wellC rdf:type me_mgs:MGS-Well . ?wellC me_mgs:hasUse ?wuC . VALUES ?wuC { } } } +ff4f5433385d SELECT DISTINCT (?streamC AS ?iri) WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) { SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { SELECT ?ds_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { SELECT ?ds_flowline ?_flMid ?_flEnd WHERE { { SELECT DISTINCT ?ds_flowline WHERE { ?ds_flowline rdf:type hyf:HY_FlowPath . ?s2target spatial:connectedTo ?ds_flowline ; rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . BIND(?ds_flowline AS ?streamC) } } ?_flMid hyf:downstreamFlowPathTC ?ds_flowline . ?_flEnd hyf:downstreamFlowPathTC ?_flMid . } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . } GROUP BY ?ds_flowline ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(30)) ?upstream_flowline hyf:downstreamFlowPath? ?_flEnd . } } ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?streamA . ?streamA rdf:type hyf:HY_FlowPath . } +ff746e2b17d8 SELECT DISTINCT (?wellA AS ?well) ?wellWKT (?s2anchor AS ?s2cell) ?wellName ?meUse ?meWellType ?meDepth ?meOverburden ?ilOwner ?ilDepth ?ilPurpose ?ilYield WHERE { ?s2target rdf:type kwg-ont:S2Cell_Level13 . ?s2target spatial:connectedTo kwgr:administrativeRegion.USA.23 . ?s2target spatial:connectedTo ?waterBodyC . ?waterBodyC rdf:type hyf:HY_WaterBody . ?s2target spatial:connectedTo ?ds_flowline . ?upstream_flowline hyf:downstreamFlowPathTC ?ds_flowline . ?upstream_flowline rdf:type hyf:HY_FlowPath ; spatial:connectedTo ?s2neighbor . ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . ?s2anchor rdf:type kwg-ont:S2Cell_Level13 . ?s2anchor spatial:connectedTo ?wellA . { ?wellA rdf:type il_isgs:ISGS-Well } UNION { ?wellA rdf:type me_mgs:MGS-Well } ?wellA geo:hasGeometry/geo:asWKT ?wellWKT . OPTIONAL { ?wellA rdfs:label ?wellName . } OPTIONAL { ?wellA me_mgs:hasUse ?meUse . } OPTIONAL { ?wellA me_mgs:ofWellType ?meWellType . } OPTIONAL { ?wellA me_mgs:wellDepth/qudt:numericValue ?meDepth . } OPTIONAL { ?wellA me_mgs:wellOverburden/qudt:numericValue ?meOverburden . } OPTIONAL { ?wellA il_isgs:hasOwner ?ilOwner . } OPTIONAL { ?wellA il_isgs:wellDepth/qudt:numericValue ?ilDepth . } OPTIONAL { ?wellA il_isgs:wellPurpose ?ilPurpose . } OPTIONAL { ?wellA il_isgs:wellYield/qudt:numericValue ?ilYield . } } diff --git a/scripts/check-flowline-scope.mts b/scripts/check-flowline-scope.mts new file mode 100644 index 0000000..6eea46b --- /dev/null +++ b/scripts/check-flowline-scope.mts @@ -0,0 +1,99 @@ +// Self-check: the supporting flowline layer must be bounded at BOTH ends. +// +// npx tsx scripts/check-flowline-scope.mts +// +// buildFusedFlowlineQuery traces a transitive closure out of the anchor cells. +// Left one-sided it runs to the end of the network, so an anchor near a +// drainage divide drags in the neighbouring basin: "facilities upstream from +// PFOS samples in York County, ME" drew 122 segments of the Merrimack and 21 +// of the Winnipesaukee, in a basin no York sample drains from. Nothing looked +// broken -- the map just had extra rivers on it, and they were real rivers. +// +// The fix intersects that closure with the set of flowlines that actually +// reach the resolved targets. This asserts the intersection is present in +// every shape that draws the layer, bounded and unbounded, so a future edit to +// either branch cannot drop it silently. +// +// No network: the pipeline steps only build query strings. +import assert from 'node:assert/strict'; +import { planPipeline, type PipelineContext } from '../src/engine/planner'; +import type { AnalysisQuestion, EntityType, SpatialRelationship } from '../src/types/query'; + +const ENTITY_TYPES: EntityType[] = [ + 'samples', + 'facilities', + 'waterBodies', + 'wells', + 'aquifers', + 'streams', +]; +const HYDROLOGY: SpatialRelationship['type'][] = ['downstream', 'upstream']; +// Unbounded, and one bounded value to cover the aggregate branch. +const DISTANCES: (number | undefined)[] = [undefined, 25]; + +const context = (): PipelineContext => ({ + question: {} as AnalysisQuestion, + targetIris: ['https://example.org/t1', 'https://example.org/t2'], + anchorIris: ['https://example.org/a1', 'https://example.org/a2'], + results: {}, +}); + +let checks = 0; +let drawn = 0; + +for (const blockA of ENTITY_TYPES) { + for (const blockC of ENTITY_TYPES) { + for (const rel of HYDROLOGY) { + for (const maxDistanceKm of DISTANCES) { + const question: AnalysisQuestion = { + blockA: { type: blockA }, + relationship: { type: rel, maxDistanceKm }, + blockC: { type: blockC }, + }; + const step = planPipeline(question).find((s) => s.type === 'GET_FLOWLINE_GEOMETRIES'); + // Skipped when a side is streams: those flowlines are the answer set. + if (!step) { + assert.ok( + blockA === 'streams' || blockC === 'streams', + `${blockA} ${rel} ${blockC}: no flowline step, but neither side is streams`, + ); + continue; + } + drawn++; + const sparql = step.buildQuery(context()); + const where = `${blockA} ${rel} ${blockC} ${maxDistanceKm ?? 'unbounded'}`; + + // The target IRIs have to reach the query, or the closure is one-sided. + assert.ok( + sparql.includes('https://example.org/t1'), + `${where}: flowline query does not bind the resolved targets`, + ); + // Both ends present: a closure out of the anchor cells, and a closure + // into the targets, joined on ?flowline. + assert.ok( + sparql.includes('?_flTarget spatial:connectedTo ?s2celltarget'), + `${where}: missing the target reach clause`, + ); + assert.match( + sparql, + /\?flowline hyf:downstreamFlowPathTC \?_flTarget|\?_flTarget hyf:downstreamFlowPathTC \?flowline/, + `${where}: target reach clause does not close on ?flowline`, + ); + // The reach clause must be a bare TC. hyf:downstreamFlowPathTC is + // already reflexive, so `TC?` is the same relation spelled more + // expensively: measured at 0 extra flowlines and +8s. + // Bare `includes`, not the downstream spelling: the form is + // `?flowline TC? ?_flTarget` downstream and `?_flTarget TC? ?flowline` + // upstream, and matching only the first left the upstream shape + // unguarded by a check whose whole point is the `TC?` regression. + assert.ok( + !sparql.includes('downstreamFlowPathTC?'), + `${where}: reflexive target reach, measured to add nothing`, + ); + checks += 4; + } + } + } +} + +console.log(`flowline scope: ${drawn} shapes draw the layer, ${checks} checks passed`); diff --git a/scripts/check-query-joins.mts b/scripts/check-query-joins.mts new file mode 100644 index 0000000..d491807 --- /dev/null +++ b/scripts/check-query-joins.mts @@ -0,0 +1,270 @@ +// Self-check for the two rules in +// docs/plans/done/2026-09-17-fused-seed-side-and-observation-joins.md. +// +// npx tsx scripts/check-query-joins.mts +// +// 1. Join order. QLever follows the query text at these body sizes, so the +// constrained side of a hydrology question has to be written first. Leading +// with an unfiltered side is what made "facilities upstream from PFOS +// samples in York and Cumberland" fail with 500 out-of-memory. +// +// 2. Observation joins. Every required triple is also a filter. A samples block +// may only join the observation detail its active filters actually read: the +// coso:measurementUnit join in particular deletes non-detects, which have no +// unit, and it was being emitted for substance-only questions that had +// "include non-detects" ticked. +// +// No network: these only build query strings. +import assert from 'node:assert/strict'; +import { planPipeline } from '../src/engine/planner'; +import { buildFusedHydrologyQuery, buildFusedNearQuery } from '../src/engine/templates/fusedQueries'; +import { PREBUILT_QUERIES } from '../src/constants/prebuiltQueries'; +import type { AnalysisQuestion, EntityBlock, EntityType, SampleFilters } from '../src/types/query'; + +const ENTITY_TYPES: EntityType[] = [ + 'samples', + 'facilities', + 'waterBodies', + 'wells', + 'aquifers', + 'streams', +]; +const PFOS = 'http://w3id.org/DSSTox/v1/DTXSID3031864'; +const GROUNDWATER = 'http://w3id.org/sawgraph/v1/me-egad#sampleMaterialType.GW'; + +let checks = 0; +const check = (cond: boolean, msg: string) => { + assert.ok(cond, msg); + checks++; +}; + +// Which side the body leads with. The first variable after WHERE { decides the +// plan; anything else in the body can follow. +function leadsWith(query: string): 'anchor' | 'target' | 'other' { + const body = query.slice(query.indexOf('WHERE {') + 'WHERE {'.length).trimStart(); + if (body.startsWith('?s2target') || body.startsWith('?ds_flowline')) return 'target'; + if (body.startsWith('?s2anchor')) return 'anchor'; + // A pinned side leads with its VALUES block, so neither branch above matches. + // That is the 'other' case and the pinned assertions below allow for it. + return 'other'; +} + +// Which end the distance-bounded aggregate walks outward from, read off the +// innermost sub-SELECT that boundedTrace wraps its seed in. Unbounded queries +// have no such block and report 'none'. +function seedsFrom(query: string): 'anchor' | 'target' | 'none' { + if (query.includes('SELECT DISTINCT ?upstream_flowline WHERE {')) return 'anchor'; + if (query.includes('SELECT DISTINCT ?ds_flowline WHERE {')) return 'target'; + return 'none'; +} + +const filtersFor = (type: EntityType): Partial => { + switch (type) { + case 'samples': + return { sampleFilters: { substances: [PFOS], includeNondetects: true } }; + case 'facilities': + return { facilityFilters: { industryCodes: ['5622'] } }; + case 'waterBodies': + return { waterBodyFilters: { ftypes: ['StreamRiver'] } }; + case 'streams': + return { streamFilters: { ftypes: ['StreamRiver'] } }; + case 'aquifers': + return { aquiferFilters: { aquiferTypes: ['bedrock'] } }; + case 'wells': + return {}; + } +}; + +// --- 1. Join order, every hydrology pair, both projections. +for (const targetType of ENTITY_TYPES) { + for (const anchorType of ENTITY_TYPES) { + for (const project of ['target', 'anchor'] as const) { + const scopedTarget = buildFusedHydrologyQuery({ + anchor: { type: anchorType }, + target: { type: targetType, ...filtersFor(targetType) }, + targetRegion: ['23005'], + project, + direction: 'downstream', + }); + check( + leadsWith(scopedTarget) === 'target', + `${targetType} <- ${anchorType} (project ${project}): target is the only constrained side, so it must lead the body`, + ); + + const scopedAnchor = buildFusedHydrologyQuery({ + anchor: { type: anchorType, ...filtersFor(anchorType) }, + target: { type: targetType }, + anchorRegion: ['23005'], + project, + direction: 'downstream', + }); + check( + leadsWith(scopedAnchor) === 'anchor', + `${targetType} <- ${anchorType} (project ${project}): anchor is the constrained side, so the body must keep the anchor-first order`, + ); + + // An IRI pin from chunking counts as constrained: re-seeding from the + // other side would throw the slice away. + const pinned = buildFusedHydrologyQuery({ + anchor: { type: anchorType }, + target: { type: targetType, ...filtersFor(targetType) }, + targetRegion: ['23005'], + anchorIris: ['http://example.org/facility/1'], + project, + direction: 'downstream', + }); + check( + leadsWith(pinned) !== 'target', + `${targetType} <- ${anchorType} (project ${project}): an anchorIris pin must keep the anchor-first order`, + ); + } + } +} + +// Distance-bounded traces follow the same rule, and lean on it harder: the +// bounded block embeds its seed inside an aggregate that sums path lengths, so +// seeding the wide-open side sums them across the national flowline graph. +// Every bounded shape whose constrained side was the target failed before the +// reorder covered them — 30s query-planning timeouts and 4.3 GB allocation +// failures, recorded in docs/query-matrix/2026-09-20-raw-002e529.csv. +// +// Both halves are checked. A query can read target-first while the aggregate +// inside still starts from the anchor, which would move the text and leave the +// cost exactly where it was. +for (const targetType of ENTITY_TYPES) { + for (const maxDistanceKm of [30, 50]) { + const targetScoped = buildFusedHydrologyQuery({ + anchor: { type: 'facilities' }, + target: { type: targetType, ...filtersFor(targetType) }, + targetRegion: ['23005'], + project: 'target', + direction: 'downstream', + maxDistanceKm, + }); + check( + leadsWith(targetScoped) === 'target', + `${targetType} <- facilities, bounded ${maxDistanceKm}km: target is the only constrained side, so it must lead the body`, + ); + check( + seedsFrom(targetScoped) === 'target', + `${targetType} <- facilities, bounded ${maxDistanceKm}km: the bounded aggregate must seed from the target too`, + ); + + const anchorScoped = buildFusedHydrologyQuery({ + anchor: { type: 'facilities', ...filtersFor('facilities') }, + target: { type: targetType }, + anchorRegion: ['23005'], + project: 'target', + direction: 'downstream', + maxDistanceKm, + }); + check( + leadsWith(anchorScoped) === 'anchor', + `${targetType} <- facilities, bounded ${maxDistanceKm}km: anchor is the constrained side, so the body must keep the anchor-first order`, + ); + check( + seedsFrom(anchorScoped) === 'anchor', + `${targetType} <- facilities, bounded ${maxDistanceKm}km: the bounded aggregate must seed from the anchor`, + ); + } +} + +// --- 2. Observation joins, driven by the filters that are actually set. +const UNIT_JOIN = 'coso:measurementUnit'; +const OBS_JOIN = 'coso:observedAtSamplePoint'; +const MATERIAL_JOIN = 'coso:sampleOfMaterialType'; +const MATERIAL_LABEL = '?matTypeLabelC'; + +interface JoinCase { + name: string; + filters: SampleFilters | undefined; + unit: boolean; + observation: boolean; + material: boolean; +} + +const joinCases: JoinCase[] = [ + { name: 'no filters', filters: undefined, unit: false, observation: false, material: false }, + { + name: 'substance only', + filters: { substances: [PFOS], includeNondetects: true }, + unit: false, + observation: true, + material: false, + }, + { + name: 'material only', + filters: { materialTypes: [GROUNDWATER] }, + unit: false, + observation: true, + material: true, + }, + { + name: 'concentration range', + filters: { substances: [PFOS], minConcentration: 10, maxConcentration: 1000 }, + unit: true, + observation: true, + material: false, + }, + { + name: 'detects only', + filters: { substances: [PFOS], includeNondetects: false }, + unit: false, + observation: true, + material: false, + }, +]; + +for (const c of joinCases) { + const queries = [ + ['hydrology', buildFusedHydrologyQuery({ + anchor: { type: 'facilities', facilityFilters: { industryCodes: ['5622'] } }, + target: { type: 'samples', sampleFilters: c.filters }, + anchorRegion: ['23005'], + project: 'target', + direction: 'downstream', + })], + ['near', buildFusedNearQuery({ + anchor: { type: 'facilities', facilityFilters: { industryCodes: ['5622'] } }, + target: { type: 'samples', sampleFilters: c.filters }, + hops: 1, + project: 'anchor', + })], + ] as const; + + for (const [kind, query] of queries) { + check( + query.includes(UNIT_JOIN) === c.unit, + `${kind}, ${c.name}: the unit join must appear only for a concentration range (it deletes non-detects)`, + ); + check( + query.includes(OBS_JOIN) === c.observation, + `${kind}, ${c.name}: the observation join must appear only when a filter reads it`, + ); + check( + query.includes(MATERIAL_JOIN) === c.material, + `${kind}, ${c.name}: the material join must appear only when material types are picked`, + ); + check( + !query.includes(MATERIAL_LABEL), + `${kind}, ${c.name}: the material label is display-only and must never appear in an IRI-finding query`, + ); + } +} + +// --- 3. The prebuilt dashboard questions must not change plan. +for (const prebuilt of PREBUILT_QUERIES) { + const question: AnalysisQuestion = prebuilt.question; + if (question.relationship.type === 'near') continue; + const step = planPipeline(question)[0]; + const query = step.buildQuery( + { question, targetIris: [], anchorIris: [], results: {} } as never, + undefined, + ); + check( + leadsWith(query) === 'anchor', + `${prebuilt.id}: every prebuilt has a constrained anchor, so none of them may reorder`, + ); +} + +console.log(`query joins: ${checks} checks passed`); diff --git a/scripts/check-query-snapshots.mts b/scripts/check-query-snapshots.mts new file mode 100644 index 0000000..c49ac59 --- /dev/null +++ b/scripts/check-query-snapshots.mts @@ -0,0 +1,333 @@ +// Golden-file snapshot of the SPARQL the planner generates, for every shape. +// +// npx tsx scripts/check-query-snapshots.mts # verify +// npx tsx scripts/check-query-snapshots.mts --update # re-record +// +// Why this exists: near and downstream/upstream share one query builder +// (buildFusedWhereBody in src/engine/templates/fusedQueries.ts takes a `mode` +// and differs only in the middle hop). Everything else -- entity binding, +// region clauses, IRI pinning, sample-observation joins -- is common. So a fix +// aimed at a trace bug silently rewrites the `near` queries too, and the only +// thing that noticed until now was a live sweep taking ~30 minutes. +// +// This records the generated SPARQL for every shape and fails on any diff. The +// diff is the point: an intentional change shows exactly which other shapes +// moved with it, then you --update. No network, runs in about a second. +// +// The grid has four axes, and every one of them earned its place by hiding a +// bug that the others could not see: +// +// entity pair (36) one builder serves all of them, so a fix aimed at +// one pair rewrites the rest +// relationship (3) near and the two hydrology directions share +// buildFusedWhereBody +// region placement (2) which block carries the region decides which side is +// "constrained", which decides the join order. An +// earlier version of this grid put the region on block +// A always; for an upstream question that makes the +// anchor the constrained side, so the target-first +// order was never recorded, and neither was the +// question that broke in the app (block A wide open, +// block C scoped to a county). +// flow-distance bound the bounded trace is a different query, not a +// (2, hydrology only) filtered one: it seeds an aggregate. With one bounded +// variant in the grid, the fix that moved every bounded +// shape showed up here as a single moved line. +// +// 6 x 6 x 3 x 2 = 216 unbounded, plus 6 x 6 x 2 x 2 = 144 bounded, plus the +// variants below that reach clauses the grid does not vary. +import assert from 'node:assert/strict'; +import { readFileSync, writeFileSync, existsSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { planPipeline, type PipelineContext } from '../src/engine/planner'; +import { PREFIXES } from '../src/constants/prefixes'; +import type { AnalysisQuestion, EntityType, SpatialRelationship } from '../src/types/query'; + +const SNAPSHOT = new URL('./__snapshots__/query-shapes.txt', import.meta.url); + +const ENTITY_TYPES: EntityType[] = [ + 'samples', + 'facilities', + 'waterBodies', + 'wells', + 'aquifers', + 'streams', +]; +// 'within' is in the type union but RelationshipSelector never offers it. +const RELATIONSHIPS: SpatialRelationship['type'][] = ['near', 'downstream', 'upstream']; +const HYDROLOGY: SpatialRelationship['type'][] = ['downstream', 'upstream']; +// Which block carries the region. See the header: this is the axis that decides +// the join order, and it is not symmetric between the two relationship +// directions, because the planner maps block A to the anchor for an upstream +// question and to the target for a downstream one. +const REGION_ON = ['A', 'C'] as const; + +// Fixed IRIs so pinValues output is deterministic. Two entries: enough to show +// the VALUES clause and its ordering, short enough to stay readable. +const context = (question: AnalysisQuestion): PipelineContext => ({ + question, + targetIris: ['http://example.org/target/1', 'http://example.org/target/2'], + anchorIris: ['http://example.org/anchor/1', 'http://example.org/anchor/2'], + results: {}, +}); + +// Collapse whitespace: indentation churn is not a behaviour change and would +// bury the diffs that are. +// +// The shared PREFIX preamble is stripped for the same reason, plus one of its +// own: it is byte-identical in every query and was 66% of this file, so it made +// the snapshot three times the size it needs to be and pushed the part that +// varies off the side of every diff. It is recorded once, on its own, so a +// change to the prefix list still shows up as exactly one moved entry instead +// of moving all 360. +const collapse = (q: string) => q.replace(/\s+/g, ' ').trim(); +const PREFIX_BLOCK = collapse(PREFIXES); +const normalise = (q: string) => collapse(q).replace(PREFIX_BLOCK, '').trim(); + +// Query bodies are written once each, in a table at the end, and referenced by +// hash from the shapes above. 375 shapes reference 2,078 step queries but only +// 603 distinct ones — the region-boundary query alone is identical in 373 of +// them — so inlining every body made the file 2.6x larger and turned a one-line +// change to a shared query into 373 lines of diff. +const bodies = new Map(); +const BODIES_MARKER = '# ---- query bodies, one line per distinct query ----'; + +function record(name: string, question: AnalysisQuestion): string[] { + const lines = [`## ${name}`]; + const ctx = context(question); + for (const step of planPipeline(question)) { + const query = normalise(step.buildQuery(ctx)); + assert.ok(query.length > 0, `empty query: ${name} / ${step.type}`); + const hash = createHash('sha256').update(query).digest('hex').slice(0, 12); + bodies.set(hash, query); + lines.push(`${step.type} [${step.endpoint}] ${hash}`); + } + return lines; +} + +const shape = ( + a: EntityType, + rel: SpatialRelationship['type'], + c: EntityType, + relExtra: Partial = {}, + regionOn: (typeof REGION_ON)[number] = 'A', +): AnalysisQuestion => { + const region = { region: { stateCode: '23' } }; + return { + blockA: { type: a, ...(regionOn === 'A' ? region : {}) }, + relationship: { type: rel, ...(rel === 'near' ? { hops: 1 } : {}), ...relExtra }, + blockC: { type: c, ...(regionOn === 'C' ? region : {}) }, + } as AnalysisQuestion; +}; + +const out: string[] = [ + '# Generated by scripts/check-query-snapshots.mts -- do not hand-edit.', + '# Re-record with: npm run check-query-snapshots -- --update', + '', +]; + +// 0. The prefix preamble, recorded once because normalise() strips it. +out.push( + '## PREFIXES', + `SHARED [all] ${createHash('sha256').update(PREFIX_BLOCK).digest('hex').slice(0, 12)}`, + ` ${PREFIX_BLOCK}`, +); + +// 1. Every entity pair x relationship x region placement: 6 x 6 x 3 x 2 = 216. +for (const a of ENTITY_TYPES) { + for (const c of ENTITY_TYPES) { + for (const rel of RELATIONSHIPS) { + for (const on of REGION_ON) { + out.push(...record(`${a} ${rel} ${c} [ME on ${on}]`, shape(a, rel, c, {}, on))); + } + } + } +} + +// 2. The hydrology pairs again with a flow-distance bound: 6 x 6 x 2 x 2 = 144. +// `near` has no flow bound; its distance axis is hops, covered in the variants. +for (const a of ENTITY_TYPES) { + for (const c of ENTITY_TYPES) { + for (const rel of HYDROLOGY) { + for (const on of REGION_ON) { + out.push( + ...record(`${a} ${rel}(30km) ${c} [ME on ${on}]`, shape(a, rel, c, { maxDistanceKm: 30 }, on)), + ); + } + } + } +} + +// 3. The variants that reach clauses the grid above does not vary: hop counts, +// the per-type filter blocks, and the exact questions that have broken in the +// app. A change to any of these is the class of change that crosses +// relationship boundaries. +const PFOS = 'http://w3id.org/DSSTox/v1/DTXSID3031864'; +const YORK = { stateCode: '23', countyCodes: ['23031'] }; +const variants: Array<[string, AnalysisQuestion]> = [ + ['near hops=0', shape('samples', 'near', 'facilities', { hops: 0 })], + ['near hops=2', shape('samples', 'near', 'facilities', { hops: 2 })], + ['near hops=4', shape('samples', 'near', 'facilities', { hops: 4 })], + ['downstream maxDistanceKm=10', shape('samples', 'downstream', 'facilities', { maxDistanceKm: 10 })], + ['upstream maxDistanceKm=10', shape('samples', 'upstream', 'facilities', { maxDistanceKm: 10 })], + // The question behind #55 and #57, in the two states it is asked in. Block A + // carries nothing at all, which is what makes it the expensive shape: the + // trace has to be seeded from block C or it starts from every facility in + // the graph. Recorded bounded and unbounded because those are two different + // queries, not one query with a filter. + [ + 'PI question: facilities upstream from PFOS samples in York, detections only', + { + blockA: { type: 'facilities' }, + relationship: { type: 'upstream' }, + blockC: { + type: 'samples', + region: YORK, + sampleFilters: { substances: [PFOS], includeNondetects: false }, + }, + } as AnalysisQuestion, + ], + [ + 'PI question, bounded to 30km of flow', + { + blockA: { type: 'facilities' }, + relationship: { type: 'upstream', maxDistanceKm: 30 }, + blockC: { + type: 'samples', + region: YORK, + sampleFilters: { substances: [PFOS], includeNondetects: false }, + }, + } as AnalysisQuestion, + ], + // The two sample-filter shapes that decide whether the observation chain is + // joined at all. Substance-only is the common case and is what the + // coso:measurementUnit join silently filtered; non-detects-off is the only + // filter that adds the result clauses without adding the unit join. + [ + 'samples substance filter only', + { + blockA: { type: 'samples', region: { stateCode: '23' }, sampleFilters: { substances: [PFOS] } }, + relationship: { type: 'downstream' }, + blockC: { type: 'facilities' }, + } as AnalysisQuestion, + ], + [ + 'samples include-nondetects off only', + { + blockA: { type: 'samples', region: { stateCode: '23' }, sampleFilters: { includeNondetects: false } }, + relationship: { type: 'downstream' }, + blockC: { type: 'facilities' }, + } as AnalysisQuestion, + ], + [ + 'no region either side', + { + blockA: { type: 'samples' }, + relationship: { type: 'downstream' }, + blockC: { type: 'facilities' }, + } as AnalysisQuestion, + ], + [ + 'county-scoped both sides', + { + blockA: { type: 'samples', region: { stateCode: '23', countyCodes: ['23019'] } }, + relationship: { type: 'near', hops: 1 }, + blockC: { type: 'facilities', region: { stateCode: '23', countyCodes: ['23005', '23019'] } }, + } as AnalysisQuestion, + ], + [ + 'sample filters', + { + blockA: { + type: 'samples', + region: { stateCode: '23' }, + sampleFilters: { + substances: ['http://sawgraph.spatialai.org/v1/pfas#PFHpA'], + materialTypes: ['http://sawgraph.spatialai.org/v1/me-egad-data#Groundwater'], + minConcentration: 4, + maxConcentration: 100, + unit: 'ng/L', + includeNondetects: false, + }, + }, + relationship: { type: 'downstream' }, + blockC: { type: 'facilities', facilityFilters: { industryCodes: ['562212'] } }, + } as AnalysisQuestion, + ], + [ + 'facility + water body + well + aquifer filters', + { + blockA: { type: 'wells', region: { stateCode: '23' }, wellFilters: { wellCategories: ['meUse||http://example.org/use/Domestic'] } }, + relationship: { type: 'near', hops: 1 }, + blockC: { type: 'aquifers', aquiferFilters: { aquiferTypes: ['bedrock'] } }, + } as AnalysisQuestion, + ], + [ + 'stream ftype filter as target', + { + blockA: { type: 'samples', region: { stateCode: '23' } }, + relationship: { type: 'downstream' }, + blockC: { type: 'streams', streamFilters: { ftypes: ['460'] } }, + } as AnalysisQuestion, + ], +]; +for (const [name, question] of variants) out.push(...record(`VARIANT: ${name}`, question)); + +// Every distinct query body, sorted by hash so the table has a stable order and +// a new query lands as one added line rather than reshuffling the file. +out.push('', BODIES_MARKER); +for (const [hash, query] of [...bodies].sort(([a], [b]) => a.localeCompare(b))) { + out.push(`${hash} ${query}`); +} + +const next = out.join('\n') + '\n'; +const update = process.argv.includes('--update'); + +if (update || !existsSync(SNAPSHOT)) { + writeFileSync(SNAPSHOT, next); + console.log(`${update ? 'Re-recorded' : 'Recorded'} ${out.filter((l) => l.startsWith('## ')).length} shapes.`); + process.exit(0); +} + +const prev = readFileSync(SNAPSHOT, 'utf8'); +if (prev === next) { + console.log(`OK: ${out.filter((l) => l.startsWith('## ')).length} shapes match the snapshot.`); + process.exit(0); +} + +// Report which shapes moved, grouped by relationship, so a "downstream fix" +// that also moved 36 near shapes says so in the first line of output. +// Shapes only: the body table at the end is keyed by content hash, so any +// change to a query already moves the hash of every shape that references it. +// Reporting the table as well would add a line of noise to every diff. +const headings = (text: string) => { + const map = new Map(); + let current = ''; + for (const line of text.split('\n')) { + if (line === BODIES_MARKER) break; + if (line.startsWith('## ')) current = line.slice(3); + else if (current) map.set(current, (map.get(current) ?? '') + line + '\n'); + } + return map; +}; +const before = headings(prev); +const after = headings(next); +const moved = [...after.keys()].filter((k) => before.get(k) !== after.get(k)); +const gone = [...before.keys()].filter((k) => !after.has(k)); + +// Bucket by every axis of the grid, not just the relationship: a change that +// moves only the bounded shapes, or only the ones scoped on block C, is saying +// something quite different from one that moves a whole relationship, and the +// first line of output should be enough to tell them apart. +const count = (names: string[], re: RegExp) => names.filter((n) => re.test(n)).length; +console.error(`Generated SPARQL changed for ${moved.length} shape(s)${gone.length ? `, ${gone.length} removed` : ''}:`); +console.error( + ` near ${count(moved, / near /)} downstream ${count(moved, / downstream[( ]/)} upstream ${count(moved, / upstream[( ]/)}` + + ` bounded ${count(moved, /\(30km\)/)} region on A ${count(moved, /\[ME on A\]/)} region on C ${count(moved, /\[ME on C\]/)}` + + ` variants ${count(moved, /^VARIANT/)}`, +); +for (const name of moved.slice(0, 40)) console.error(` - ${name}`); +if (moved.length > 40) console.error(` ... and ${moved.length - 40} more`); +console.error('\nIf every one of those is intended, re-record:'); +console.error(' npm run check-query-snapshots -- --update'); +process.exit(1); diff --git a/scripts/check-trace-direction.mts b/scripts/check-trace-direction.mts index f021bbc..d92a92d 100644 --- a/scripts/check-trace-direction.mts +++ b/scripts/check-trace-direction.mts @@ -42,10 +42,39 @@ const FORWARD = [ ]; const REVERSED = [ '?ds_flowline hyf:downstreamFlowPathTC ?upstream_flowline', - '?_flEnd hyf:downstreamFlowPathTC ?_flMid', '?flowline hyf:downstreamFlowPathTC ?downstream_flowline', ]; +// `?_flEnd hyf:downstreamFlowPathTC ?_flMid` used to sit in REVERSED. It cannot +// any more: a bounded block seeded from the target writes that exact triple +// while tracing perfectly correctly, because it walks outward from the target +// instead of from the anchor. One string is now correct or reversed depending +// on which side seeds, so the queries that name both ends are checked by +// reachability instead, which is what the string was standing in for. +// +// Both predicates carry direction, and `?a ?b` always means a flows into +// b: hyf:downstreamFlowPathTC is the closure, hyf:downstreamFlowPath? is one +// segment. Subject-first triples only, which is every trace in the discovery +// and well queries; the flowline layer writes one of its closures in a +// predicate-object list and keeps the string check above. +const FLOW_EDGE = /(\?\w+)\s+hyf:downstreamFlowPath(?:TC)?\??\s+(\?\w+)/g; + +function flowsInto(sparql: string, from: string, to: string): boolean { + const edges = new Map>(); + for (const [, a, b] of sparql.matchAll(FLOW_EDGE)) { + if (!edges.has(a)) edges.set(a, new Set()); + edges.get(a)!.add(b); + } + const seen = new Set([from]); + const queue = [from]; + while (queue.length) { + const v = queue.shift()!; + if (v === to) return true; + for (const n of edges.get(v) ?? []) if (!seen.has(n)) { seen.add(n); queue.push(n); } + } + return false; +} + const context = (): PipelineContext => ({ question: {} as AnalysisQuestion, // The flowline step traces from the anchors discovery resolved; give it two @@ -76,18 +105,30 @@ for (const a of ENTITY_TYPES) { if (!sparql.includes('downstreamFlowPathTC')) continue; traced++; - for (const pattern of REVERSED) { + if (sparql.includes('?upstream_flowline') && sparql.includes('?ds_flowline')) { + // The anchor's flowline has to reach the target's, whichever end + // the bounded block seeds from. This is the property the whole + // direction rule exists to protect: pairing anchor=blockA with + // direction='upstream' reverses the chain and fails here. + assert.ok( + flowsInto(sparql, '?upstream_flowline', '?ds_flowline'), + `${step.type} has no directed path from the anchor's flowline to the target's: ${where}`, + ); + checks++; + } else { + for (const pattern of REVERSED) { + assert.ok( + !sparql.includes(pattern), + `${step.type} traces upstream from the seed ("${pattern}"): ${where}`, + ); + checks++; + } assert.ok( - !sparql.includes(pattern), - `${step.type} traces upstream from the seed ("${pattern}"): ${where}`, + FORWARD.some((pattern) => sparql.includes(pattern)), + `${step.type} has no recognisable trace pattern: ${where}`, ); checks++; } - assert.ok( - FORWARD.some((pattern) => sparql.includes(pattern)), - `${step.type} has no recognisable trace pattern: ${where}`, - ); - checks++; } // A hydrology question that traced nowhere would pass the loop above diff --git a/scripts/query-matrix.mts b/scripts/query-matrix.mts index 1d81f90..2245c90 100644 --- a/scripts/query-matrix.mts +++ b/scripts/query-matrix.mts @@ -9,8 +9,13 @@ // npx tsx scripts/query-matrix.mts M2 # subsequent phases append // // Phases: M1 near(1) all 25 entity pairs | M2 downstream all pairs -// M3 upstream all pairs | M4 distance sweep | M5 dashboard queries +// M3 upstream all pairs | M4 near-hop distance | M5 dashboard queries // M6 six states | M7 no region | M8 filters | M9 county scopes +// MD flow-distance bounds +// +// M4 sweeps the `near` relationship's hop distance (miles). MD sweeps the +// hydrology relationship's flow-distance bound (km), which is a different +// control and was swept by nothing until MD existed. // // How long it takes depends entirely on MODE, and the difference is large: // @@ -202,11 +207,34 @@ async function run(matrix: string, label: string, q: AnalysisQuestion, meta: Rec } const TYPES: EntityType[] = ['samples', 'facilities', 'waterBodies', 'wells', 'aquifers']; -const mk = (a: EntityType, rel: 'near'|'downstream'|'upstream', c: EntityType, hops: number|undefined, state: string|undefined, counties?: string[]): AnalysisQuestion => ({ - blockA: { type: a, ...(state ? { region: { stateCode: state, ...(counties ? { countyCodes: counties } : {}) } } : {}) }, - relationship: { type: rel, ...(hops !== undefined ? { hops } : {}) }, - blockC: { type: c }, -} as AnalysisQuestion); +// `regionOn` picks which block carries the region, and defaults to 'A', which +// is what every phase written before MD assumed. That default is not neutral: +// for an upstream question the planner maps block A to the anchor, so a region +// on A always left the *anchor* as the constrained side, and the target-first +// join order — which only fires when the target is narrowed and the anchor is +// not — was unreachable from this harness. So was every bounded question that +// leaves block A wide open, which is the shape users actually build. +const mk = ( + a: EntityType, + rel: 'near'|'downstream'|'upstream', + c: EntityType, + hops: number|undefined, + state: string|undefined, + counties?: string[], + opts?: { km?: number; regionOn?: 'A' | 'C' }, +): AnalysisQuestion => { + const region = state ? { region: { stateCode: state, ...(counties ? { countyCodes: counties } : {}) } } : {}; + const onC = opts?.regionOn === 'C'; + return { + blockA: { type: a, ...(onC ? {} : region) }, + relationship: { + type: rel, + ...(hops !== undefined ? { hops } : {}), + ...(opts?.km !== undefined ? { maxDistanceKm: opts.km } : {}), + }, + blockC: { type: c, ...(onC ? region : {}) }, + } as AnalysisQuestion; +}; const phase = process.argv[2]; @@ -257,6 +285,41 @@ if (phase === 'M9') { // county-scoped (smallest realistic) + multi-county await run('M9', `samples downstream facilities [${label}]`, mk('samples', 'downstream', 'facilities', undefined, '23', counties), { blockA: 'samples', rel: 'downstream', hops: '', blockC: 'facilities', region: label, filters: 'none' }, 0); } +if (phase === 'MD') { // flow-distance bounds, both narrowing directions + // Four shapes, each run bounded and unbounded, with the region on block A and + // on block C, and on both discovery steps. Every axis here is one the bounded + // path can behave differently on, and none of them were covered before: + // + // - region on A vs C decides which side is constrained, which decides the + // join order. Bounded queries currently keep the anchor-first order + // whatever the answer, which is the thing under test. + // - both steps, not just step 0 like M1-M4. The two projections share a + // WHERE clause but not a fate: on "facilities upstream from PFOS samples + // in York" at 30 km, the samples projection answered in 25s while the + // facilities projection ran out of memory at 32s. Measuring step 0 alone + // would have recorded that shape as working. + // - the unbounded twin of every bounded row, so "did the bound remove rows" + // is answerable from this file alone rather than by joining against M2/M3, + // which scope their regions differently. + const SHAPES: [EntityType, 'upstream' | 'downstream', EntityType][] = [ + ['facilities', 'upstream', 'samples'], // block A wide open: what fails in the app today + ['facilities', 'upstream', 'streams'], // the one bounded dashboard question's shape + ['facilities', 'upstream', 'wells'], // the known-expensive far end (W38 entry 12) + ['samples', 'downstream', 'facilities'], // downstream, where A and C swap anchor/target + ]; + for (const [a, rel, c] of SHAPES) + for (const km of [undefined, 30]) + for (const regionOn of ['A', 'C'] as const) + for (const step of [0, 1]) + await run( + 'MD', + `${a} ${rel}${km ? `(${km}km)` : ''} ${c} [ME on ${regionOn}] step${step}`, + mk(a, rel, c, undefined, '23', undefined, { km, regionOn }), + { blockA: a, rel, hops: '', blockC: c, region: `ME on ${regionOn}`, filters: km ? `${km}km` : 'none' }, + step, + ); +} + // --- the index ------------------------------------------------------------- // // One row per sweep: when, which commit, how many query shapes passed, and what diff --git a/src/App.css b/src/App.css index 4e7f7d8..87d1768 100644 --- a/src/App.css +++ b/src/App.css @@ -598,6 +598,9 @@ align-items: center; flex-shrink: 0; width: 24px; + /* ponytail: matches .timeline-content top padding + half a text line, so the dot + sits on the first line of text instead of the top of the box */ + padding-top: 0.5rem; } .timeline-dot { @@ -643,16 +646,15 @@ } .timeline-content { - padding-bottom: var(--space-md); flex: 1; min-width: 0; + padding: var(--space-xs) var(--space-sm); + margin-bottom: var(--space-sm); } .timeline-content--running { background: var(--color-primary-50); border-radius: var(--radius-sm); - padding: var(--space-xs) var(--space-sm); - margin: -2px 0 var(--space-md); } .timeline-desc { diff --git a/src/engine/planner.ts b/src/engine/planner.ts index b1469f0..129cbcc 100644 --- a/src/engine/planner.ts +++ b/src/engine/planner.ts @@ -328,8 +328,12 @@ function buildFusedSteps(question: AnalysisQuestion): PipelineStep[] { buildQuery: (ctx, scope) => buildFusedFlowlineQuery({ anchor: anchorBlock, + target: targetBlock, direction: traceDirection, anchorIris: scope?.anchorIris ?? ctx.anchorIris, + // Never sliced: the target set bounds the trace, so a partial list + // would silently shrink the drawn network rather than split it. + targetIris: ctx.targetIris, maxDistanceKm: relationship.maxDistanceKm, }), initialScopes: (ctx) => iriScopes(ctx.anchorIris, 'anchor'), diff --git a/src/engine/scope.ts b/src/engine/scope.ts index bb7f462..99b0a1f 100644 --- a/src/engine/scope.ts +++ b/src/engine/scope.ts @@ -1,7 +1,7 @@ import type { EntityBlock } from '../types/query'; import type { EndpointKey } from '../constants/endpoints'; import { executeSparql } from './sparqlClient'; -import { buildEntityProbeQuery } from './templates/fusedQueries'; +import { blockIsFiltered, buildEntityProbeQuery } from './templates/fusedQueries'; import { buildDiscoverCountiesQuery } from './templates/regions'; // A Scope is a slice of one pipeline step's work. `undefined` scope means "the @@ -42,17 +42,6 @@ const ENTITY_CHUNK = 25; const REGION_CHUNK = 1; export const IRI_CHUNK = 1000; // by-IRI hydration: 1,000 IRIs ≈ 70KB, 1.0–3.3s -function hasBlockFilters(block: EntityBlock): boolean { - const f = - block.sampleFilters ?? - block.facilityFilters ?? - block.waterBodyFilters ?? - block.wellFilters ?? - block.aquiferFilters ?? - block.streamFilters; - return Boolean(f && Object.values(f).some((v) => (Array.isArray(v) ? v.length > 0 : v != null))); -} - export function chunk(items: T[], size: number): T[][] { const out: T[][] = []; for (let i = 0; i < items.length; i += size) out.push(items.slice(i, i + size)); @@ -193,7 +182,7 @@ async function probeSide( ): Promise { // No region and no filters means every entity of that type in the graph — // certainly past the probe limit, and the probe itself would scan nationwide. - if (!regionCodes?.length && !hasBlockFilters(block)) return null; + if (!regionCodes?.length && !blockIsFiltered(block)) return null; const rows = await executeSparql( endpoint, diff --git a/src/engine/templates/downstreamSamples.ts b/src/engine/templates/downstreamSamples.ts index 7acdce6..5178bda 100644 --- a/src/engine/templates/downstreamSamples.ts +++ b/src/engine/templates/downstreamSamples.ts @@ -6,6 +6,17 @@ function spValues(spIris: string[]): string { return spIris.map(wrapUri).join(' '); } +// A non-detect has no coso:measurementUnit, so requiring the unit join hid +// every non-detect from the popup's observation table: on sample point 64220, +// 474 of 3,334 rows survived and the other 2,860 were non-detects. Making it +// OPTIONAL in place OOMs (819.7MB); joining it after resultValueClauses() with +// the symbol lookup nested inside costs the same as before, 6.88s vs 6.59s. +// ?unit_sym stays bound either way because it is a GROUP BY key. +const UNIT_SYMBOL_CLAUSES = `OPTIONAL { ?result coso:measurementUnit ?unit . + OPTIONAL { ?unit qudt:symbol ?unit_sym0 } } + BIND(COALESCE(?unit_sym0, + IF(BOUND(?unit), REPLACE(STR(?unit), "^.*[#/]", ""), "")) AS ?unit_sym)`; + export function buildSampleRetrievalByIriQuery( spIris: string[], filters?: SampleFilters, @@ -94,10 +105,8 @@ export function buildSampleDetailByIriQuery( OPTIONAL { ?substanceUri rdfs:label ?fullLabel } OPTIONAL { ?sourceParam comptox:sameAsDSSToxSubstance ?substanceUri ; rdfs:label ?paramLabel } - ?result coso:measurementUnit ?unit . ${resultValueClauses()} - OPTIONAL { ?unit qudt:symbol ?unit_sym0 } - BIND(COALESCE(?unit_sym0, REPLACE(STR(?unit), "^.*[#/]", "")) AS ?unit_sym) + ${UNIT_SYMBOL_CLAUSES} OPTIONAL { ?observation sosa:resultTime ?date } OPTIONAL { ?sample dcterms:identifier ?sampleId } ${filterClauses} diff --git a/src/engine/templates/fusedQueries.ts b/src/engine/templates/fusedQueries.ts index 90c8a89..481b853 100644 --- a/src/engine/templates/fusedQueries.ts +++ b/src/engine/templates/fusedQueries.ts @@ -2,11 +2,12 @@ import { PREFIXES } from '../../constants/prefixes'; import type { EntityBlock, FacilityFilters, + SampleFilters, AquiferFilters, StreamFilters, SpatialRelationship, } from '../../types/query'; -import { wrapUri, buildSampleFilterClauses, resultValueClauses } from './samples'; +import { wrapUri, buildSampleFilterClauses, resultValueClauses, needsUnitJoin } from './samples'; import { buildIndustryValues } from './facilities'; import { AQUIFER_TYPE_VALUES } from './aquifers'; import { buildWellCategoryFilter } from './wells'; @@ -45,25 +46,37 @@ function buildAquiferTypeFilterSuffixed(filters: AquiferFilters | undefined, suf // is supplied so the same helper can fill either ?s2anchor or ?s2target). // `suffix` disambiguates internal variables so same-type anchor+target queries // don't collide. -// True when the sample block actually constrains observations. When it does not, -// the IRI-finding queries can skip the observation join entirely. -export function hasSampleFilters(block: EntityBlock): boolean { - const f = block.type === 'samples' ? block.sampleFilters : undefined; - if (!f) return false; - return Boolean( - f.substances?.length || - f.materialTypes?.length || - f.minConcentration != null || - f.maxConcentration != null || - f.includeNondetects === false, - ); +// The observation joins a samples block needs to *filter*, which is a smaller +// set than the joins it needs to *display*. Every required triple is also a +// filter, so asking for detail the filters never read deletes rows: the unit +// join is the worst of them, because a non-detect has no coso:measurementUnit +// (see needsUnitJoin in ./samples) and requiring it dropped 774 of 1,688 +// Cumberland PFOS observations while "include non-detects" was ticked. +function sampleJoinsNeeded(filters: SampleFilters | undefined) { + const range = needsUnitJoin(filters); + // buildSampleFilterClauses reads ?numericResult / ?nonDetect for both of + // these, and resultValueClauses is what binds them. + const result = range || filters?.includeNondetects === false; + return { + substance: Boolean(filters?.substances?.length), + material: Boolean(filters?.materialTypes?.length), + result, + // The ng/L comparison is the only thing that reads the unit. + unit: range, + observation: Boolean(filters?.substances?.length || filters?.materialTypes?.length || result), + }; } -// `sampleObservations: false` drops the observation/material/result joins from a -// samples block. Only the IRI-finding queries may pass it: they project just the +// `sampleObservations: false` drops the observation joins from a samples block +// outright. Only the IRI-finding queries may pass it: they project just the // sample-point IRI, and re-deriving every observation there is what pushes the -// hydrology queries past QLever's 30s limit / memory ceiling (429/500). The -// hydrate queries still project those vars and must keep the full block. +// hydrology queries past QLever's 30s limit / memory ceiling (429/500). +// buildFusedWellQuery is the one caller left on the `true` default: it projects +// well columns from a body that may carry a samples block on the other side. +// +// With `false` and an active sample filter the block is rebuilt from +// sampleJoinsNeeded: enough to honour the filter, nothing that only feeds a +// popup. export function bindEntityInCell( block: EntityBlock, s2Var: string, @@ -82,16 +95,37 @@ export function bindEntityInCell( ${industry}`; } case 'samples': { - if (!sampleObservations) { - return `?sp${suffix} rdf:type coso:SamplePoint ; + const point = `?sp${suffix} rdf:type coso:SamplePoint ; spatial:connectedTo ${s2Var} .`; - } const filters = buildSampleFilterClauses(block.sampleFilters, suffix); - // ponytail: coso:measurementUnit exists only on detects, so the join below - // also excludes non-detects. Dropping it is correct but triples the matched - // rows and the endpoint OOMs on statewide pipelines. Revisit if capacity grows. - return `?sp${suffix} rdf:type coso:SamplePoint ; - spatial:connectedTo ${s2Var} . + + if (!sampleObservations) { + const need = sampleJoinsNeeded(block.sampleFilters); + if (!need.observation) return point; + const parts = [ + point, + `?observation${suffix} coso:observedAtSamplePoint ?sp${suffix} .`, + ]; + if (need.substance) { + parts.push(`?observation${suffix} coso:ofDSSToxSubstance ?substance${suffix} .`); + } + if (need.material) { + // The material lives on the analysed sample, not the observation. + parts.push(`?observation${suffix} coso:analyzedSample ?sample${suffix} . + ?sample${suffix} coso:sampleOfMaterialType ?matType${suffix} .`); + } + if (need.result) { + parts.push(`?observation${suffix} coso:hasResult ?result${suffix} . + ${resultValueClauses(suffix)}`); + } + if (need.unit) { + parts.push(`?result${suffix} coso:measurementUnit ?unit${suffix} .`); + } + parts.push(filters); + return parts.join('\n '); + } + + return `${point} ?observation${suffix} rdf:type coso:ContaminantObservation ; coso:observedAtSamplePoint ?sp${suffix} ; coso:ofDSSToxSubstance ?substance${suffix} ; @@ -148,7 +182,11 @@ export function buildEntityProbeQuery( limit: number, ): string { const entityVar = entityIriVar(block, 'P'); - const bind = bindEntityInCell(block, '?s2probe', 'P', hasSampleFilters(block)); + // `false`, like the IRI-finding queries: the probe lists entity IRIs, and the + // list it returns becomes the chunk membership (src/engine/scope.ts). A + // narrowing join here removes entities from every slice, so the probe has to + // see exactly what discovery sees. + const bind = bindEntityInCell(block, '?s2probe', 'P', false); const region = regionClause(regionCodes, '?s2probe', '?_regionP'); return ` ${PREFIXES} @@ -238,33 +276,61 @@ function fringePath(direction: 'downstream' | 'upstream', endVar: string, outVar // the cutoff, matching GROUP BY (seed, end) with no MIN. The per-flowline // number shown in popups is computed separately in buildFusedFlowlineQuery / // buildStreamsByIri, where MIN() picks the shortest qualifying path. +// `seedSide` decides which end the aggregate starts from, and it is a +// correctness-neutral, cost-critical choice: the block walks outward from its +// seed, so seeding the *unconstrained* side means summing path lengths over +// every flowline the graph has. "Facilities upstream from samples in York" with +// block A left wide open seeds 1,506,326 facilities and the engine gives up +// planning the query at 30s; seeded from the 132 samples the same question +// answers in 20s. Measured identical result sets where both forms run, and the +// bounded answer is a strict subset of the unbounded one (docs/QUERY-MATRIX.md +// MD, docs/DEBUGGING.md 2026-09-20). +// +// The "+1" fringe always extends *away* from the seed, so which physical end +// gets the extra segment follows the seed side. That is the same rule as +// before, not a new one: flipping the seed flips the fringe with it. function boundedTrace( seed: string, direction: 'downstream' | 'upstream', maxDistanceKm: number, + seedSide: 'anchor' | 'target' = 'anchor', ): string { + // Which variable the seed binds, and which one the trace has to reach. + const seedVar = seedSide === 'anchor' ? '?upstream_flowline' : '?ds_flowline'; + const farVar = seedSide === 'anchor' ? '?ds_flowline' : '?upstream_flowline'; + // Walking away from the seed. For an anchor seed that is the direction of the + // question; for a target seed it is the reverse, since the target sits at the + // far end of the same trace. + const walk = seedSide === 'anchor' ? direction : direction === 'downstream' ? 'upstream' : 'downstream'; + // Both forms write the seed-adjacent triple first and differ only in which + // way the chain runs. The anchor form's text is unchanged from before this + // parameter existed, so every query that kept the anchor-first order is + // byte-identical. const trace = - direction === 'downstream' - ? `?upstream_flowline hyf:downstreamFlowPathTC ?_flMid . + walk === 'downstream' + ? `${seedVar} hyf:downstreamFlowPathTC ?_flMid . ?_flMid hyf:downstreamFlowPathTC ?_flEnd .` - : `?_flEnd hyf:downstreamFlowPathTC ?_flMid . - ?_flMid hyf:downstreamFlowPathTC ?upstream_flowline .`; + : seedSide === 'anchor' + ? `?_flEnd hyf:downstreamFlowPathTC ?_flMid . + ?_flMid hyf:downstreamFlowPathTC ${seedVar} .` + : `?_flMid hyf:downstreamFlowPathTC ${seedVar} . + ?_flEnd hyf:downstreamFlowPathTC ?_flMid .`; return `{ SELECT DISTINCT ?upstream_flowline ?ds_flowline WHERE { { - SELECT ?upstream_flowline ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { + SELECT ${seedVar} ?_flEnd (SUM(?_flLen) AS ?_plen) WHERE { { - SELECT ?upstream_flowline ?_flMid ?_flEnd WHERE { - { SELECT DISTINCT ?upstream_flowline WHERE { ${seed} } } + SELECT ${seedVar} ?_flMid ?_flEnd WHERE { + { SELECT DISTINCT ${seedVar} WHERE { ${seed} } } ${trace} } } ?_flMid nhdplusv2:hasFlowPathLength/qudt:quantityValue/qudt:numericValue ?_flLen . - } GROUP BY ?upstream_flowline ?_flEnd + } GROUP BY ${seedVar} ?_flEnd } FILTER (xsd:float(?_plen) < xsd:float(${maxDistanceKm})) - ${fringePath(direction, '?_flEnd', '?ds_flowline')} + ${fringePath(walk, '?_flEnd', farVar)} } }`; } @@ -273,10 +339,11 @@ function boundedTrace( // anchor binding + spatial path (neighbor expansion for "near", hydrology trace // for downstream/upstream) + target binding + region clauses on each side. function buildFusedWhereBody(opts: FusedBodyOpts): string { - // A sample block keeps its observation joins unless the caller drops them AND - // no sample filter depends on them. - const anchorObs = (opts.anchorSampleObservations ?? true) || hasSampleFilters(opts.anchor); - const targetObs = (opts.targetSampleObservations ?? true) || hasSampleFilters(opts.target); + // No `|| hasSampleFilters(...)` override any more: bindEntityInCell now keeps + // exactly the joins an active filter reads, so a filtered side no longer has + // to fall back on the whole observation chain. + const anchorObs = opts.anchorSampleObservations ?? true; + const targetObs = opts.targetSampleObservations ?? true; const anchorBind = bindEntityInCell(opts.anchor, '?s2anchor', 'A', anchorObs); const targetBind = bindEntityInCell(opts.target, '?s2target', 'C', targetObs); const anchorPin = pinValues(entityIriVar(opts.anchor, 'A'), opts.anchorIris); @@ -327,11 +394,92 @@ function buildFusedWhereBody(opts: FusedBodyOpts): string { ${tRegion} ${targetBind}`; + // Write the constrained side first. QLever's planner does not search join + // orders exhaustively at this size (12-14 triples), so it follows the query + // text, and leading with an unfiltered side makes it trace the national + // flowline graph: "facilities upstream from PFOS samples in York and + // Cumberland" OOMs at 116s with the anchor first and answers in 18.6s with + // the target first. Measured across all 72 hydrology shape/config pairs: 5 + // rescued, 0 regressions, 0 rows lost (docs/plans/…-fused-seed-side-….md). + // + // A bounded trace is reordered the same way, and needs it more: boundedTrace + // embeds its seed a second time inside an aggregate, so seeding the wide-open + // side sums path lengths across the national flowline graph. Every bounded + // shape whose constrained side was the target failed before this (MD in + // docs/query-matrix): timeouts in query planning, or 4.3 GB allocation + // failures. Reordered, the same three shapes answer in seconds. + if (sideIsConstrained(opts, 'target') && !sideIsConstrained(opts, 'anchor')) { + // The target's own entity and filters come first, then the hop onto the + // river network. A streams target *is* the flowline, so it needs no hop. + const targetHead = + opts.target.type === 'streams' + ? `?ds_flowline rdf:type hyf:HY_FlowPath . + ${targetPart}` + : `?s2target rdf:type kwg-ont:S2Cell_Level13 . + ${tRegion} + ${targetBind} + ?s2target spatial:connectedTo ?ds_flowline .`; + + // The bounded block is rebuilt around the target seed. `trace` above is + // seeded from the anchor, which is the right choice only for the + // anchor-first order below. + const targetTrace = opts.maxDistanceKm + ? boundedTrace(targetHead, opts.mode, opts.maxDistanceKm, 'target') + : trace; + + // spatial:connectedTo is stored both ways between cells and flowlines + // (1,391,903 pairs each direction, verified on federation), so reading it + // off the flowline here matches the same pairs as ?s2neighbor → flowline. + return `${targetPin}${targetHead} + ${targetTrace} + ?upstream_flowline rdf:type hyf:HY_FlowPath ; + spatial:connectedTo ?s2neighbor . + ?s2anchor kwg-ont:sfTouches | owl:sameAs ?s2neighbor . + ${anchorPin}?s2anchor rdf:type kwg-ont:S2Cell_Level13 . + ${aRegion} + ${anchorBind}`; + } + return `${seed} ${trace} ${targetPin}${targetPart}`; } +// True when the question narrows this block at all. Exported because +// engine/scope.ts asks the same question to pick a chunking axis, and the two +// have to agree: if the template thinks a side is constrained and the executor +// thinks it is wide open, the executor slices on an axis the template already +// led with. engine/sparqlErrors.ts still keeps its own `isNarrowed`, which is +// this plus the region check. +// +// A samples block is the one type with a filter that defaults to set: +// `includeNondetects: true` is the UI's default checked state and narrows +// nothing, so only `=== false` counts. sampleJoinsNeeded above already draws +// that line; a generic "any field is non-null" scan does not, and read +// `includeNondetects: true` alone as a reason to reorder the whole body. +export function blockIsFiltered(block: EntityBlock): boolean { + if (block.type === 'samples') return sampleJoinsNeeded(block.sampleFilters).observation; + const filters = + block.facilityFilters ?? + block.waterBodyFilters ?? + block.wellFilters ?? + block.aquiferFilters ?? + block.streamFilters; + return Boolean( + filters && Object.values(filters).some((v) => (Array.isArray(v) ? v.length > 0 : v != null)), + ); +} + +// A side is constrained when the question already narrows it: a region, any +// entity filter, or an IRI pin from chunking. Unconstrained means "every +// facility in the graph", which is the side that must not lead the query. +function sideIsConstrained(opts: FusedBodyOpts, side: 'anchor' | 'target'): boolean { + const block = side === 'anchor' ? opts.anchor : opts.target; + const region = side === 'anchor' ? opts.anchorRegion : opts.targetRegion; + const pins = side === 'anchor' ? opts.anchorIris : opts.targetIris; + return Boolean(pins?.length || region?.length) || blockIsFiltered(block); +} + export interface FusedBaseOpts { anchor: EntityBlock; target: EntityBlock; @@ -358,8 +506,12 @@ export function buildFusedNearQuery(opts: FusedNearOpts): string { hops: opts.hops, anchorIris: opts.anchorIris, targetIris: opts.targetIris, - anchorSampleObservations: opts.project !== 'anchor', - targetSampleObservations: opts.project !== 'target', + // Both sides, not just the projected one: a near query projects a single + // IRI, so neither side needs observation detail beyond its own filters. + // Keying this off `project` left the *non*-projected samples side carrying + // the full chain even with no filters set. + anchorSampleObservations: false, + targetSampleObservations: false, }); const projectVar = opts.project === 'anchor' @@ -481,11 +633,63 @@ export function buildFusedWellQuery(opts: FusedWellSideOpts): string { export interface FusedFlowlineOpts { anchor: EntityBlock; + target: EntityBlock; direction: 'downstream' | 'upstream'; anchorIris: string[]; + targetIris: string[]; maxDistanceKm?: number; } +// Restricts the traced closure to flowlines that actually connect the anchors +// to the targets. Without it the trace is one-sided: it runs from the anchor +// cells to the end of the network, so an anchor sitting near a drainage divide +// drags in the whole of the neighbouring basin. On "facilities upstream from +// PFOS samples in York County, ME" that drew 122 segments of the Merrimack and +// 21 of the Winnipesaukee, ~130km away in a basin no York sample drains from. +// +// Written as an intersection of two DISTINCT closures rather than the direct +// `?flowline hyf:downstreamFlowPathTC? ?_flEnd` membership test: that form +// leaves ?flowline unbound on the left and QLever times out joining on it +// (31s, "Join on ?flowline"). The intersection runs in the same 7s the +// one-sided query took. +// +// `TC?` on the target side was measured and recovers nothing (0 extra +// flowlines) while costing 8s. That is not a quirk: hyf:downstreamFlowPathTC is +// already reflexive (`X TC X` holds for 2,104 of 2,104 York County flowlines, +// 434,501 self-pairs graph-wide), so `TC?` is definitionally the same relation. +// The segment a target sits on is therefore drawn; what is excluded is the +// river below it. +function targetReachClause(opts: FusedFlowlineOpts): string { + // ponytail: target IRIs inlined whole. Only anchors are sliced today + // (iriScopes/divideIriList in the planner); add target slicing if a question + // ever pushes this past the gateway's body limit. + const targetValues = pinValues(entityIriVar(opts.target, 'C'), opts.targetIris); + // Filters stripped: the pinned IRIs are already the filtered answer set, so + // every filter clause here is a join that can only re-confirm what the VALUES + // list states. Passing the bare block rather than opts.target drops those + // clauses. Measured on the York question: re-deriving the substance filter + // cost 1s of the 8 and changed nothing. + const targetBind = bindEntityInCell({ type: opts.target.type }, '?s2celltarget', 'C', false); + const reach = + opts.direction === 'downstream' + ? `?flowline hyf:downstreamFlowPathTC ?_flTarget .` + : `?_flTarget hyf:downstreamFlowPathTC ?flowline .`; + + return `{ + SELECT DISTINCT ?flowline WHERE { + { + SELECT DISTINCT ?s2celltarget WHERE { + ${targetValues} + ?s2celltarget rdf:type kwg-ont:S2Cell_Level13 . + ${targetBind} + } + } + ?_flTarget spatial:connectedTo ?s2celltarget . + ${reach} + } + }`; +} + // Returns flowline geometries traced from the anchor entities the pipeline // already resolved in FIND_ANCHOR_IRIS. // @@ -499,12 +703,16 @@ export interface FusedFlowlineOpts { // leaving sample points with no stream under them. Binding the resolved IRIs // removes the guess and keeps this layer consistent with the facility layer. export function buildFusedFlowlineQuery(opts: FusedFlowlineOpts): string { - const anchorBind = bindEntityInCell(opts.anchor, '?s2anchor', 'A'); + // Bare block, same reasoning as targetReachClause: anchorIris is the resolved + // answer set, so the block's own filters can only re-confirm the VALUES list. + // For a facilities anchor that drops `fio:ofIndustry` plus a NAICS type scan + // per pinned IRI; for a samples anchor it drops the whole observation chain, + // including the coso:measurementUnit join this branch exists to keep out of + // queries that do not read it. + const anchorBind = bindEntityInCell({ type: opts.anchor.type }, '?s2anchor', 'A', false); // ponytail: inlined as VALUES rather than re-derived. Anchor sets are small // (tens), unlike the sample IRI lists that forced server-side fusion. - const anchorValues = `VALUES ${entityIriVar(opts.anchor, 'A')} { ${opts.anchorIris - .map(wrapUri) - .join(' ')} }`; + const anchorValues = pinValues(entityIriVar(opts.anchor, 'A'), opts.anchorIris); const seedCells = `{ SELECT DISTINCT ?s2cellus WHERE { @@ -524,13 +732,20 @@ export function buildFusedFlowlineQuery(opts: FusedFlowlineOpts): string { spatial:connectedTo ?s2cellus . ?flowline hyf:downstreamFlowPathTC ?downstream_flowline .`; + const reachesTarget = targetReachClause(opts); + // Unbounded: the flowline set is the plain transitive closure. if (!opts.maxDistanceKm) { return ` ${PREFIXES} SELECT DISTINCT ?flowline ?flowlineWKT ?fl_type ?streamName WHERE { - ${seedCells} - ${flowlinePattern} + { + SELECT DISTINCT ?flowline WHERE { + ${seedCells} + ${flowlinePattern} + } + } + ${reachesTarget} ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName } @@ -582,6 +797,7 @@ export function buildFusedFlowlineQuery(opts: FusedFlowlineOpts): string { BIND(xsd:float(?_plen) + xsd:float(?_extra) AS ?_ptotal) } GROUP BY ?flowline } + ${reachesTarget} ?flowline geo:hasGeometry/geo:asWKT ?flowlineWKT ; nhdplusv2:hasFTYPE ?fl_type . OPTIONAL { ?flowline rdfs:label ?streamName }