Skip to content

Orphan wells: matched facilities without geometry aren't rendered #30

Description

@prayaslashkari

Summary

In a "wells near facilities" query, some wells appear on the map with no facility marker nearby ("orphan wells"). Investigation shows these are correct matches — the well genuinely shares an S2 cell with a facility — but the matching facility is not rendered because it has no geometry in the knowledge graph.

Example

Query: What wells in Maine are near facilities? (Bedrock wells, Near / 0 miles, any facility).

Two orphan wells:

  • MGS-Well.47714 (Bedrock, Domestic)
  • MGS-Well.122680 (Bedrock, Domestic)

Both match the same facility, EPA FRS FRS-Facility.110071228748 (NAICS 423930, recyclable-material wholesaler), which sits in their S2 cell. Verified live on federation:

well 122680 | cells: 1 | facilities in cell: 3 | with-industry: 1
well 47714  | cells: 1 | facilities in cell: 3 | with-industry: 1

facility 110071228748 | industry 423930 | hasGeometry: false

The match is real, but hasGeometry: false → the facility can't be plotted. buildFacilitiesByIri (and the fused facility bind) require geo:hasGeometry/geo:asWKT to draw a facility, so it's silently dropped from the map while the well still shows.

Root cause

EPA FRS facilities without coordinates in the KG. Not a query bug: the spatial join is correct; the facility just has no mappable point. Affects any facility-side layer that filters on geometry.

Impact

Wells look unmatched/orphaned even though they satisfy the relationship, which is confusing when interpreting proximity results.

Options

  1. Add a notice — e.g. "N matched facilities have no mapped location" so users know the count of unplotted matches. (Recommended: keeps all correct wells, adds transparency.)
  2. Restrict wells to those whose matching facility has geometry — self-consistent map, but hides genuinely-near wells. (Not recommended.)
  3. Upstream: enrich/geocode geometry-less FRS facilities.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions