Mastering Alteryx Designer for Data Analysts & ETL AutomationLesson 29 of 41
Lesson 29 of 41

Spatial Match Tool: Polygon Containment & Location Intersection

Overview & Learning Objectives

Determining which sales territory a customer belongs to, or which delivery zone covers a dropoff address, is a classic geospatial problem. The Spatial Match tool evaluates the spatial relationship between two vector data streams: the Target stream (`T`) and the Universe stream (`U`). It establishes relationships like "Where Target is Within Universe" (point inside polygon) or "Where Target Intersects Universe".

  • Match spatial points to geographic boundary polygons (e.g. dark store delivery zones, voting wards, postal sectors).
  • Understand Target (`T`) vs Universe (`U`) input anchors and Matched (`M`) vs Unmatched (`U`) output anchors.
  • Configure spatial relationships: Target Within Universe, Target Contains Universe, and Intersects.

Industry Standard

Standard: Logistics engineering protocols at Swiggy and Zepto mandate using the Spatial Match tool to assign incoming orders to hyper-local dark-store delivery polygons in real time, routing unmatched orders to out-of-service queues.

Real-World Example: ScoopCraft Ice Cream Dark Store Catchment Routing

ScoopCraft checks whether customer delivery addresses (Target points) fall inside authorized 10-minute delivery polygons (Universe polygons).

Customer Location (Target `T`)Delivery Polygon (Universe `U`)Spatial Relationship ConfiguredOutput Anchor
Cust: Priya (Point: Bandra West)Bandra Dark-Store 3km PolygonWhere Target is Within UniverseM Anchor (Assigned to Bandra Dark-Store)
Cust: Rohan (Point: Khar)Bandra Dark-Store 3km PolygonWhere Target is Within UniverseM Anchor (Assigned to Bandra Dark-Store)
Cust: Anita (Point: Thane)Bandra Dark-Store 3km PolygonTarget Outside Delivery PolygonU Anchor (Out of Delivery Catchment Zone)

Configuration & Core Workflow

-- Spatial Match Tool Configuration
Target (T) Input:   Customer Delivery Points (SpatialObj)
Universe (U) Input: Store Delivery Zone Polygons (SpatialObj)

Spatial Relationship:
  (o) Target Where Target is Within Universe  (Point Inside Polygon)
  ( ) Target Intersects Universe              (Boundary Overlap)
  ( ) Target Touches Universe

Output Anchors:
  M Anchor: Matched records (Target points that fall INSIDE Universe polygons)
  U Anchor: Unmatched records (Target points OUTSIDE any delivery polygon)

Parameters Breakdown

  • Target (T) Input: The primary records to be matched and categorized (e.g. customers, delivery orders, incidents).
  • Universe (U) Input: The reference spatial boundary layer (e.g. sales territories, delivery zones, state boundaries).
  • Matched (M) Anchor: Outputs Target records that satisfied the spatial relationship, enriched with Universe attributes.
  • Unmatched (U) Anchor: Outputs Target records that found no spatial intersection in the Universe layer.

Sample Walkthrough (Q&A)

Question: Which dataset should be connected to the Target (T) anchor vs the Universe (U) anchor?

Formula / Action: Customers (100,000 points) + Store Polygons (5 zones)

Result: Connect Customers to Target (T) and Store Polygons to Universe (U).

Explanation: The Target stream represents the entities you want to classify and retain in output; the Universe stream represents the reference boundary regions.

Common Mistakes & Limitations

  • Selecting "Where Target Contains Universe" when matching customer points to zones (a single point cannot contain a polygon; the polygon contains the point!).
  • Forgetting to check the Unmatched (`U`) anchor to see how many potential customers are being lost due to incomplete delivery zone coverage.

Keyboard Shortcuts

ActionWindowsMac
Point in PolygonSelect "Where Target is Within Universe"Target is Within
Zone Boundary OverlapSelect "Target Intersects Universe"Intersects

Pro Tips & Modern Alternatives

  • Use the `Find Nearest` tool if customer points do not fall inside any polygon and you want to locate the closest open outlet.
  • Use the `Distance` tool if you only need straight-line distance between two fixed points.