cancel
Showing results for 
Search instead for 
Did you mean: 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results for 
Search instead for 
Did you mean: 
MohanaBasak
Databricks Employee
Databricks Employee

A year ago we put a natural-language layer on a 3D map. This time we rebuilt the whole thing on Lakebase and PostGIS, wired Genie to the same tables, and made the map answer back, drawn region and all. Deploy is one notebook.

See it in 45 seconds

📹 Draw a region on the network map, ask Genie a question in plain English, and watch the answer land back on the map. (GeoGenie 2 · live demo · synthetic Dallas network)

What GeoGenie was, and what changed

The original GeoGenie answered a simple question: can you ask a map things in plain English? You drew a polygon on a Cesium globe, and Genie answered questions scoped to whatever sat inside it. No SQL, no dashboards. It was a Streamlit app with Genie doing the talking.

That first version proved the point, but under the hood it was demo code. GeoGenie 2 keeps the promise identical (draw a region, ask in English, get a scoped answer) and rebuilds everything beneath it into something a carrier could put into production. What's new:

MohanaBasak_0-1788296249485.png

Piece by piece, that's the whole stack rebuilt:

MohanaBasak_1-1788296249486.png

A quick primer: Lakebase and PostGIS

If you live in the Databricks or GIS world these are old news. If not:

  • Lakebase is Databricks' managed Postgres database. It's a real, transactional Postgres you don't have to operate: it scales on its own, and it sits right next to the lakehouse so the same data is one hop from Unity Catalog and Genie. Think of it as the fast, operational store the map reads from live.
  • PostGIS is the long-standing spatial extension for Postgres. It teaches the database about geography: it adds real geometry types (points, lines, polygons), spatial indexes that make "what's inside this shape?" fast, and a family of ST_* functions (ST_Contains, ST_Point, …) that do the actual geometric math.

An ArcGIS-style network map — that talks back

The demo is a synthetic wireless carrier around Dallas. It shows the same view a telco runs in an ArcGIS Experience Builder app (antennas with coverage sectors, fiber cables, equipment nodes, mount sites, all clickable) but as a single Databricks App. ESRI is reduced to a browser drawing library; every data question is answered by Databricks.

Two capabilities here are worth calling out: one normally takes extra ArcGIS infrastructure, and the other a standard ArcGIS app can't do at all:

  • Lasso an area for an expansion verdict. Draw a shape and get a Build / Marginal / Pass call, scored on the market demand not already covered by existing antenna sectors. Esri can do this kind of spatial scoring too, but usually via ArcGIS Server geoprocessing or GeoAnalytics. Here it's one PostGIS function against the same Lakebase table the map already reads, answered in milliseconds, with no separate analytics tier.
  • Ask Genie about the network in plain English. This is the part a plain Experience Builder app doesn't do. Questions are automatically scoped to the region you drew; the answer comes back as a prose summary, a result table, and, when the answer is geographic, the matching assets plotted back onto the map.

Draw a region. Ask. See it on the map.

This is what the whole app is built around. You lasso a neighborhood, type a question, and Genie answers only about what's inside your shape. Here's a real exchange:

MohanaBasak_2-1788296249486.png

That "plotted on the map" line is new in GeoGenie 2, and it took a small insight to get right. Genie can render a map image itself, but that image is generated server-side and arrives without its basemap tiles, so the points land on a blank grey rectangle. So instead of showing Genie's picture, the app reads the rows Genie returns and draws them on its own ArcGIS basemap: points for coordinates, hexagons for H3 cells, colored by whatever the answer is about (a category like site_type gets distinct colors and a legend; a measure like homes_passed gets a gradient). The map does the drawing; Genie does the thinking.


Scoping a drawn shape, two honest ways

"Restrict this answer to my polygon" sounds simple, but there are two legitimate ways to do it. Databricks supports both, so GeoGenie 2 shows both the ways. The app turns your drawn shape into a filter hint and hands it to Genie; the badge on each question tells you which path it takes.

MohanaBasak_3-1788296249486.png

Why not just send the geometry? A PostGIS geometry column federates into Unity Catalog as an opaque WKB hex string. Genie can read the text, but ST_* can't operate on it. So the two usable paths are the h3_cell text column and geometry reconstructed from plain lat/lon. The real geom still powers the fast map queries, just inside Lakebase, where it's a first-class type.

How it works: one source of truth, two consumers

Everything hangs off one idea: the network lives in Lakebase Postgres + PostGIS, and every row carries both a real geom and an h3_cell. Two consumers read it, the map and Genie, each the way it's best served.

MohanaBasak_4-1788296249487.png

No ArcGIS Server, no hosted feature service, no ArcGIS Enterprise portal. The only runtime ESRI dependency is the browser fetching basemap tiles. The map is fast because it talks to Postgres directly; Genie is possible because the same rows are one federated catalog away.

The Databricks features it stands on

Six platform capabilities, each doing one job, all provisioned by the single notebook:

MohanaBasak_5-1788296249487.png

The whole thing, from one notebook

The part customers care about most: you run one notebook. Open it, hit Run All, and it stands up every piece end-to-end, idempotently, so re-running is safe:

  1. Lakebase project — Postgres with PostGIS enabled.
  2. Schema + synthetic data — five tables, a deterministic Dallas network generated straight into Postgres.
  3. The ROI function — analyze_expansion_roi(), with a smoke test.
  4. UC federated catalog — registers Lakebase so Genie can read it.
  5. The Genie Space — created programmatically, schema and scoping instructions baked in. No manual space creation, no ID to copy anywhere.
  6. The app — created, resources attached, deployed, and Postgres grants applied.

The notebook is the single source of truth for the whole deployment, and there's an optional Asset Bundle wrapper if you'd rather run it as a job from CI/CD.

The map was never the hard part

Plenty of tools can draw antennas on a basemap. What a carrier's GIS stack usually can't do is let a planner ask "how many rooftop sites in this corridor have no fiber within 200 meters?" and get an answer, on the map, in seconds, without a ticket to the GIS team.

That's the shift GeoGenie 2 is about. The map becomes a way to point at a question; Databricks answers it. ESRI draws, PostGIS measures, Genie interprets, and it's the same five tables underneath the whole time.

Draw a shape, ask in plain English, and let the warehouse do the geospatial work.


Keep going

The network, subscribers, and revenue in this demo are 100% synthetic, generated deterministically inside the provisioning notebook. It does not represent any real carrier.

2 Comments