<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article The &amp;quot;Where&amp;quot; Problem: Real-Time Spatial Engineering with Lakeflow SDP in Technical Blog</title>
    <link>https://community.databricks.com/t5/technical-blog/the-quot-where-quot-problem-real-time-spatial-engineering-with/ba-p/151192</link>
    <description>&lt;H3&gt;&lt;SPAN&gt;Introduction: Modern Data Engineering has a Location Problem&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;In the world of data engineering, the "What" and "When" are often handled with ease. We know what was bought and when it was delivered. But for industries like logistics, retail, and telecommunications, the most critical question is often &lt;/SPAN&gt;&lt;STRONG&gt;"Where?"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Historically, processing spatial data at scale has been a "bolt-on" experience. Data engineers had to juggle external libraries like Apache Sedona, manage complex UDFs, or deal with the overhead of manual spatial indexing. These silos led to fragmented pipelines and performance bottlenecks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.databricks.com/product/data-engineering/spark-declarative-pipelines" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Databricks Lakeflow SDP&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; (Spark Declarative Pipelines) &lt;/STRONG&gt;now&amp;nbsp;&lt;SPAN&gt;bridges that gap.&amp;nbsp;Native spatial types and functions mean your data engineers can write geospatial logic in the same data pipelines they already run; no special tools, no additional libraries, and no context switching.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;The Lakeflow Advantage: Connect, Pipeline, and Orchestrate&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks Lakeflow was built to simplify the entire data lifecycle. By bringing spatial support into Lakeflow SDP, we’ve eliminated the friction of moving between specialized GIS tools and your production ETL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Native Spatial Types:&lt;/STRONG&gt;&lt;SPAN&gt; Support for &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/data-types/geometry-type" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;GEOMETRY&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/data-types/geography-type" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;GEOGRAPHY&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; types means no more converting coordinates to strings or complex arrays.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Photon-Accelerated:&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-st-geospatial-functions#topological-relationships" target="_self"&gt; Spatial Predicates&lt;/A&gt; are vectorized in C++, allowing the engine to process up to millions of geometries per second.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Declarative Simplicity:&lt;/STRONG&gt;&lt;SPAN&gt; You define &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;what&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; the spatial transformation is; Lakeflow SDP handles the &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;how&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;, including state management and incremental processing.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;The Foundation: Native Spatial SQL &amp;amp; Data Types&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Most spatial pipelines store coordinates as doubles, string, or binary, and hope for the best. With the recent update to Lakeflow SDP, storing and processing spatial data has changed at the engine level. Lakeflow SDP now utilizes native column types that maintain bounding box and spatial reference metadata with every value. That metadata allows for &lt;/SPAN&gt;&lt;STRONG&gt;Data Skipping&lt;/STRONG&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;Spatial Joins&lt;/STRONG&gt;&lt;SPAN&gt; that are significantly faster than 3rd Party libraries. &lt;/SPAN&gt;&lt;SPAN&gt;Lakeflow SDP supports:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;GEOMETRY:&lt;/STRONG&gt;&lt;SPAN&gt; For planar coordinate systems (X, Y), ideal for local maps.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;GEOGRAPHY:&lt;/STRONG&gt;&lt;SPAN&gt; For spherical coordinates (Longitude, Latitude) on the Earth’s surface, essential for global logistics.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Once your columns are spatial types, you operate on them with ST_ functions, the same function family used across PostGIS and other spatial databases, so there's nothing new to learn. &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-st-geospatial-functions" target="_self"&gt;&lt;SPAN&gt;Databricks ships over 90&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; of these across various categories: constructors (&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_point" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Point&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_geomfromwkt" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_GeomFromWKT&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;), predicates (&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_intersects" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Intersects&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_contains" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Contains&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;), measurements (&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_area" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Area&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_distance" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Distance&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_length" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;ST_Length&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;), and more.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The key shift: these functions run inside your Lakeflow SDP pipelines, not in a sidecar library or a post-processing notebook. You ingest, transform, and query spatial data in the same declarative SQL you already use for everything else.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Overview of the 90+ spatial sql functions available in Databricks." style="width: 562px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25204iEC4FF411C64EB94E/image-dimensions/562x490?v=v2" width="562" height="490" role="button" title="lakeflow_spatial_sql.jpg" alt="Overview of the 90+ spatial sql functions available in Databricks." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Overview of the 90+ spatial sql functions available in Databricks.&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Performance Spotlight: Fast Spatial Joins&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;A common operation in geospatial engineering is the Spatial Join—for example, determining which delivery truck is currently inside which service zone. Databricks Spatial SQL (including Python and Scala bindings) &lt;/SPAN&gt;&lt;A href="https://www.databricks.com/blog/databricks-spatial-joins-now-17x-faster-out-box" target="_self"&gt;&lt;SPAN&gt;outperforms traditional library-based approaches&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; by leveraging native bounding box metadata and engine-level spatial indexing. Because these optimizations are built directly into the product, you can achieve high-performance out of the box without the headache of manual partitioning or managing external libraries. It’s all about making the heavy lifting automatic, so you can spend more time putting your location data to work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Benchmark Chart showing improvement over a traditional library." style="width: 547px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25205iBEA4F99B91B43E60/image-dimensions/547x286?v=v2" width="547" height="286" role="button" title="2025-09-blog-launch-of-spatial-joins-og-1200x628-1.png" alt="Benchmark Chart showing improvement over a traditional library." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Benchmark Chart showing improvement over a traditional library.&lt;/span&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Real-World Implementation&lt;/SPAN&gt;&lt;/H3&gt;
&lt;H4&gt;&lt;SPAN&gt;1. Simulation: Austin Couriers&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;To demonstrate these capabilities, we implemented a real-time courier delivery simulation. This demo tracks a fleet of 50 couriers across Austin, TX, navigating a road network derived from &lt;A href="https://overturemaps.org/" target="_self"&gt;Overture Maps&lt;/A&gt;.&amp;nbsp;The simulation can be configured to work with other named regions and to control various properties, including how much chaos to introduce.&amp;nbsp;The simulation that emits the events is driven from &lt;/SPAN&gt;&lt;A href="https://github.com/databricks-solutions/lakeflow-deliveries/blob/main/dab/src/courier_delivery_pipeline/explorations/austin_delivery_sim.ipynb" target="_self"&gt;austin_delivery_sim&lt;/A&gt;&lt;SPAN&gt; notebook.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;source = OvertureSource.local(OVERTURE_DIR)
_sim_names = {f.name for f in fields(SimConfig)}
_cfg = dict(
   overture=source,
   output=SimulationOutput(output_path=OVERTURE_DIR),
   bounds=BBOX,
   area_name="Austin, TX",
   region="US-TX",
   # Fleet
   num_couriers=50,
   assign_closest_courier=True,  # False =&amp;gt; random among available (ignores mode)
   assign_courier_mode="random", # closest | round_robin | random
   unavailable_after_delivery_sec=5.0,
   # Routing
   speed_km_h=73.0,      # (default - this is 45 mph equivalent)
   use_osmnx=True,       # OSMnx planned_route per assignment (default)
   assignment_use_osmnx=True,
   turn_penalty_sec=0.0, # to speed up the demo (default is 10 sec)
   # GPS
   gps_interval_sec=10.0,
   perturbation_meters=10.0,
   # Dispatch
   delivery_frequency_sec=0.5,
   assignments_per_dispatch_wave=0,
   min_assignment_separation_m=15.0,
   # Chaos
   delay_rate_target_pct=4.0,      # — ~4% slow bucket (0.48–0.72 factor)
   max_abandonments_per_tick=1,
   progress_factor_std=0.11,       # - tight normal spread (0.11)
   slow_progress_factor_min=0.48,
   slow_progress_factor_max=0.72,
   abandon_check_after_sec=60.0,
   abandon_check_route_frac=0.38,
   abandonment_threshold_pct=30.0, # - abandon at 1.3× expected
   abandon_hold_sec=18.0,
   assignment_route_workers=6,     # parallel route solves per wave
   arrival_time_threshold_pct=10.0,
   delivery_delayed_interval_sec=30.0,
   delivery_early_interval_sec=30.0,
   # Runtime
   sim_duration_sec=1200.0,        # 20-minute live run
   clear_output_on_run=True,
)
config = SimConfig(**{k: _cfg[k] for k in _cfg if k in _sim_names})
mgr = SimulationManager(config, spark=spark)
summary = mgr.initialize()
print(json.dumps(summary, indent=2))&lt;/LI-CODE&gt;
&lt;H4&gt;&amp;nbsp;&lt;SPAN&gt;2. Lakeflow SDP: Ingestion with Native Types&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;The simulation emits raw JSON events (GPS pings, assignments, and completions) into a &lt;A href="https://docs.databricks.com/aws/en/volumes/" target="_self"&gt;Unity Catalog Volume&lt;/A&gt;. Lakeflow SDP then picks up these events using &lt;A href="https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/" target="_self"&gt;Auto Loader&lt;/A&gt; to build a live spatial gold layer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Courier Deliveries Lakeflow data pipeline (click for higher res)." style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25352iC05F27893B444E90/image-size/large?v=v2&amp;amp;px=999" role="button" title="ldp_live.png" alt="Courier Deliveries Lakeflow data pipeline (click for higher res)." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Courier Deliveries Lakeflow data pipeline (click for higher res).&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is the Lakeflow SDP &lt;A href="https://docs.databricks.com/aws/en/ldp/streaming-tables" target="_self"&gt;Streaming Table&lt;/A&gt; that ingests the raw &lt;/SPAN&gt;&lt;A href="https://github.com/databricks-solutions/lakeflow-deliveries/blob/main/dab/src/courier_delivery_pipeline/transformations/gps_event.sql" target="_self"&gt;GPS pings&lt;/A&gt;&lt;SPAN&gt; from the courier delivery simulation. The table reads JSON files continuously from the delivery_status/gps/ directory on a Unity Catalog Volume. Each row is one ping from a courier en route to a delivery, emitted every 10 seconds (default gps_interval_sec). The Source path is configured via the pipeline parameter event_base_path, e.g. '&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;/Volumes/&amp;lt;catalog&amp;gt;/&amp;lt;schema&amp;gt;/&amp;lt;volume&amp;gt;/overture/austin_default/delivery_status'&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The JSON fields (from GpsEvent dataclass):&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;event_type STRING — always "gps"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;courier_id STRING — unique courier identifier&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;delivery_id STRING — active delivery identifier&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;longitude DOUBLE — perturbed WGS84 longitude&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;latitude DOUBLE — perturbed WGS84 latitude&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;timestamp_iso STRING — ISO-8601 simulation timestamp&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;CREATE OR REFRESH STREAMING TABLE gps_event
COMMENT "Live GPS position events from the courier delivery simulation. Each row is one GPS ping per courier per gps_interval_sec."
AS
SELECT
  event_type,
  courier_id,
  delivery_id,
  longitude,
  latitude,
  ST_Point(longitude, latitude, 4326)    AS point,
  timestamp_iso,
  CAST(timestamp_iso AS TIMESTAMP) AS event_ts
FROM STREAM read_files(
  '${event_base_path}/gps/',
  format                        =&amp;gt; 'json',
  schema                        =&amp;gt; 'event_type STRING, courier_id STRING, delivery_id STRING, longitude DOUBLE, latitude DOUBLE, timestamp_iso STRING',
  includeExistingFiles          =&amp;gt; true
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Lakeflow SDP &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/ldp/dbsql/materialized" target="_self"&gt;Materialized Views&lt;/A&gt; are used to visualize 100m and 1km geofences around each delivery POI—via &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_buffer" target="_self"&gt;ST_Buffer&lt;/A&gt;—as well as mantaining active routes (see repo for more).&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;3. Databricks Apps: From Pipelines to Insights&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Data engineering doesn't end at the table. To close the loop, we deployed a &lt;/SPAN&gt;&lt;A href="https://www.databricks.com/product/databricks-apps" target="_self"&gt;Databricks App&lt;/A&gt;&lt;SPAN&gt; that queries these Lakeflow Materialized Views. Using &lt;/SPAN&gt;Pydeck&lt;SPAN&gt;, the app visualizes the road network (Overture Maps), the active courier routes, and the real-time geofence status—refreshing every 15 seconds as the pipeline processes new pings.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The app provides global stats as the simulation progresses to readily measure in-flight deliveries and how many have been completed or abandoned. There is per minute Throughput windowed calculations for deliveries and GPS pings. Also, POIs and Couriers can be post-filtered for more granular tracking or triaging of delivery issues.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Databricks App UI - Couriers moving along their assigned routes towards delivery POIs (click for higher res)." style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25302i17C79D52008E617C/image-size/large?v=v2&amp;amp;px=999" role="button" title="app_deliveries.png" alt="Databricks App UI - Couriers moving along their assigned routes towards delivery POIs (click for higher res)." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Databricks App UI - Couriers moving along their assigned routes towards delivery POIs (click for higher res).&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A key requirement for logistics is knowing when a courier is approaching a Point of Interest (POI). We use&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/functions/st_dwithin" target="_blank" rel="noopener"&gt;ST_DWithin&lt;/A&gt; for the actual distance tests between GPS pings and POIs, see &lt;A href="https://github.com/databricks-solutions/lakeflow-deliveries/blob/main/dab/src/app/queries.py" target="_self"&gt;queries.py&lt;/A&gt;. Here is a culminating query used by the app to reflect various GPS ping status for active couriers and whether they are within 1km or 100m of their target POI.&amp;nbsp;Note: queries are composed in python, so there are some variables injected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;WITH latest_gps AS (
  SELECT
    courier_id,
    delivery_id,
    longitude,
    latitude,
    event_ts,
    ROW_NUMBER() OVER (PARTITION BY courier_id ORDER BY event_ts DESC) AS rn
  FROM {_table("gps_event")}
  WHERE {_vp_g}
),
active AS (
  SELECT courier_id, poi_id, target_lon, target_lat FROM {_table("active_route")}
),
in_1km AS (
  SELECT DISTINCT g.courier_id
  FROM latest_gps g
  JOIN active ar ON g.courier_id = ar.courier_id
  WHERE g.rn = 1
    AND ST_DWithin(
      ST_Point(ar.target_lon, ar.target_lat, 4326),
      ST_Point(g.longitude, g.latitude, 4326),
      {d1}
    )
),
in_100m AS (
  SELECT DISTINCT g.courier_id
  FROM latest_gps g
  JOIN active ar ON g.courier_id = ar.courier_id
  WHERE g.rn = 1
    AND ST_DWithin(
      ST_Point(ar.target_lon, ar.target_lat, 4326),
      ST_Point(g.longitude, g.latitude, 4326),
      {d100}
    )
)
SELECT
  g.courier_id,
  g.delivery_id,
  g.longitude,
  g.latitude,
  g.event_ts,
  CAST(DATEDIFF(MINUTE, g.event_ts, current_timestamp()) AS INT) AS age_minutes,
  (i1.courier_id   IS NOT NULL) AS in_1km_geofence,
  (i100.courier_id IS NOT NULL) AS in_100m_geofence,
  (ar.courier_id   IS NOT NULL) AS has_active_route
FROM latest_gps g
LEFT JOIN active  ar   ON g.courier_id = ar.courier_id
LEFT JOIN in_1km  i1   ON g.courier_id = i1.courier_id
LEFT JOIN in_100m i100 ON g.courier_id = i100.courier_id
WHERE g.rn = 1;&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Architecting for the Future&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;By unifying spatial intelligence with the Lakeflow engine, we are removing the "spatial tax" that has traditionally slowed down innovation. Whether you are calculating flood risks, optimizing delivery routes, or analyzing cell tower coverage, Lakeflow SDP provides the scale and simplicity needed to turn raw coordinates into actionable business insights.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Ready to get started?&lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Explore:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Visit the Databricks &lt;A href="https://www.databricks.com/product/data-engineering" target="_self"&gt;Lakeflow&lt;/A&gt; and &lt;A href="https://www.databricks.com/product/databricks-apps" target="_self"&gt;Apps&lt;/A&gt; product pages.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Deep Dive:&lt;/STRONG&gt;&lt;SPAN&gt; Read our technical blog on &lt;/SPAN&gt;&lt;A href="https://www.databricks.com/blog/databricks-spatial-joins-now-17x-faster-out-box" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;17x Faster Spatial Joins&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG style="color: #1b3139; font-family: inherit;"&gt;Demo:&lt;/STRONG&gt;&lt;SPAN&gt; Check out the &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://github.com/databricks-solutions/lakeflow-deliveries" target="_blank" rel="noopener"&gt;Courier Delivery Simulation Repository&lt;/A&gt;&lt;SPAN&gt; to configure and deploy the example &lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/" target="_self"&gt;DAB&lt;/A&gt; into your own workspace.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Mon, 30 Mar 2026 10:10:41 GMT</pubDate>
    <dc:creator>mjohns</dc:creator>
    <dc:date>2026-03-30T10:10:41Z</dc:date>
    <item>
      <title>The "Where" Problem: Real-Time Spatial Engineering with Lakeflow SDP</title>
      <link>https://community.databricks.com/t5/technical-blog/the-quot-where-quot-problem-real-time-spatial-engineering-with/ba-p/151192</link>
      <description>&lt;P&gt;In modern data pipelines, “what” and “when” are easy boxes to tick — but “where” has always been the outlier. Spatial data has long lived in silos, demanding external libraries, custom scripts, and painful overhead. That ends now. With Databricks Lakeflow SDP introducing native spatial support, geospatial processing becomes a first-class citizen in your ETL stack — fast, declarative, and deeply integrated. From real-time logistics to global service zones, it’s time to make “where” your competitive edge.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 10:10:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/technical-blog/the-quot-where-quot-problem-real-time-spatial-engineering-with/ba-p/151192</guid>
      <dc:creator>mjohns</dc:creator>
      <dc:date>2026-03-30T10:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: The "Where" Problem: Real-Time Spatial Engineering with Lakeflow SDP</title>
      <link>https://community.databricks.com/t5/technical-blog/the-quot-where-quot-problem-real-time-spatial-engineering-with/bc-p/152605#M971</link>
      <description>&lt;P&gt;Really fantastic write-up&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/36003"&gt;@mjohns&lt;/a&gt;&amp;nbsp;... thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 21:12:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/technical-blog/the-quot-where-quot-problem-real-time-spatial-engineering-with/bc-p/152605#M971</guid>
      <dc:creator>BradSheridan</dc:creator>
      <dc:date>2026-03-30T21:12:03Z</dc:date>
    </item>
  </channel>
</rss>

