← Reading listRESOLVE THE POINTS THAT SIT ON TWO TERRITORY BOUNDARIES
Text

Geographic analysis acceptance workshop / 6 MIN READ

Resolve the points that sit on two territory boundaries

Check the spatial membership rule before allowing a join to assign territory totals.

Published by SNS Media Tech

AI-assisted research and analysis for the SNS Creative Fieldbook

Sources checked 2026-11-07

A location-to-territory join needs a defined spatial relationship and an explicit policy for zero or multiple matches. A technically valid point can sit on a shared edge, and a business assignment must not depend on whichever row the software returns first.

What you will leave with: A point-to-territory acceptance matrix with interior, edge, overlap, gap and excluded-hole fixtures plus a separate assignment rule.

Use this when

  • A market report assigns public business locations to geographic territories.
  • A revised polygon layer changes counts even though the input locations are unchanged.

Not coordinate conversion, address verification, permission to map private people or an automatic allocation of sales ownership.

Separate geometric membership from business assignment

Write whether the task asks which areas geometrically cover a point or which single territory should own it for reporting. Those questions can have different answers. A location on a shared edge may qualify for more than one area under an inclusive relationship, while a business rule may still require one accountable reporting territory. Record both outputs rather than pretending geometry determines the commercial policy.

PostGIS documents a boundary distinction between ST_Contains and ST_Covers: a polygon does not contain a point lying only on its boundary, while covers includes the boundary. These are named predicate semantics, not interchangeable plain-language labels. Ask the implementation owner to identify the actual relationship used by the selected software and to demonstrate its behavior instead of choosing an operator from its friendly name.

Sources for this sectionST_Contains →ST_Covers →

Create a fixture set that makes ambiguous cases visible

Use invented polygons and points with known relationships. Include an ordinary interior point, a point outside all areas, a point exactly on a shared edge, a point within overlapping areas and a point inside a deliberately excluded hole. Preserve the intended geometry and expected membership set before running the join. Do not rely only on points comfortably inside familiar territories.

For each point, record zero, one or multiple matched territory identifiers before any deduplication. Compare distinct input points with output rows: a join can multiply rows without creating new locations. Keep unmatched records visible as exceptions rather than silently dropping them from market totals. If a hole or overlap was not intended, refer the boundary layer to its owner rather than moving the point to make the counts look tidy.

Make a one-territory policy explicit where required

If reporting requires exactly one assignment, have the responsible business and geospatial owners approve the treatment of shared edges and overlaps. Possible policies must be justified for the task; this lesson does not prescribe a nearest-center rule or a particular priority order. A geographic relationship returning two matches is useful evidence, not an error that may be hidden by keeping the first row.

Retain both the observed membership set and the final approved assignment with the reason for any override. Test whether sorting the polygon file differently changes an outcome that should be stable. Include a territory revision in the rehearsal and identify which previously accepted points change membership. A changed boundary can legitimately move an assignment, but that change must be distinguishable from a random join-order effect.

Reconcile counts before using the joined output

Build a reconciliation from input points to unmatched, uniquely matched and multiply matched points, then to the final reporting assignment. Inspect the geographic inputs with a qualified owner; PostGIS warns that invalid geometries can produce unexpected predicate results. Geometry repair is a separate controlled operation, not permission to reshape a commercial boundary during an editorial acceptance review.

Record the point snapshot, polygon version, predicate, approved assignment policy and unresolved exceptions together. Recheck the boundary fixtures when either source changes. The accepted result explains how each location entered the territory report without claiming that an area’s customers share identical behavior or that a spatial assignment establishes service availability. No private-location upload, production join or ownership change is performed in this exercise.

Sources for this sectionST_Contains →ST_Covers →

Make the reasoning concrete.

A fictional trade directory counts public exhibitors by two adjacent exhibition districts. Its inclusive join returns an edge location twice, and a staff member removes duplicate rows by keeping whichever district appears first in the export.

Deduplicate the rows

Opening: Keep the first district and report the resulting totals.

Hypothesis: The output has one row per exhibitor.

Risk: File order silently becomes the territory policy.

Accept membership and assignment separately

Opening: Retain the two geometric matches and apply an approved stable reporting rule.

Hypothesis: The count can be reconciled without concealing why the location needed a decision.

Risk: The responsible owner must resolve ambiguous cases before a single-territory report is released.

The directory retains the shared-edge fixture and tests it after reversing the source order. It accepts the report only when the assignment follows the documented policy rather than arbitrary row order.

Take the questions into your next brief.

Use these prompts in your own notes. Nothing is submitted from this page.

  1. Question

    Is the output geometric membership or one business assignment?

  2. Relationship

    Which spatial predicate and boundary semantics are actually used?

  3. Fixtures

    What should happen for interior, edge, overlap, gap and hole points?

  4. Multiplicity

    How are zero and multiple matches preserved before assignment?

  5. Reconciliation

    Do stable identities, boundary versions and approved overrides explain the totals?

Watch for the wrong conclusion.

  • Assuming contains and covers treat boundary points identically.
  • Removing duplicate join rows before investigating multiple membership.
  • Moving a point or reshaping a boundary to meet an expected total.

Your next action

Add one exact shared-edge point to a synthetic territory test and inspect every match before approving any deduplication.

Sources & scope

Original editorial analysis, synthetic fixtures and review questions. Primary documentation supports narrowly identified technical distinctions. No production data operation, private-location transmission, routing-service use or geographic allocation is performed.

  • ST_Contains →Primary platform documentation · Supports: Supports the interior/boundary distinction and invalid-geometry caution. The membership/assignment workflow is original.
  • ST_Covers →Primary platform documentation · Supports: Supports inclusive boundary coverage and its distinction from contains. No source SQL or coordinate examples are reused.