Last updated: 2026-07-15

Spatial & PostGIS

Jam SQL Studio decodes geometry and geography columns and draws them on real maps — a peek map in the grid, a full Map results view in the Query Editor, a map pane in Table Explorer with spatial filters, and a dedicated Spatial Explorer workspace. It works across all five relational engines, with an OpenFreeMap basemap on by default and a private planar fallback for offline work.

Which columns count as spatial

Jam SQL Studio decodes each engine's native geometry / geography wire format the moment a spatial value appears in a result set:

EngineSpatial typesWire format decodedCurves
PostgreSQL / PostGISgeometry, geographyEWKB (with SRID)Yes
MySQL / MariaDBgeometry & subtypes4-byte SRID prefix + WKBNo curve types
SQL Servergeometry, geographyCLR UDT (MS-SSCLRT)Yes
OracleSDO_GEOMETRYSDO ordinates + element infoYes
SQLiteSpatiaLite / GeoPackageSpatiaLite blob, GPKG header + WKBYes

Azure Data Explorer (Kusto) has no spatial column types, so these surfaces do not appear there.

SQLite note: spatial columns are detected in Table Explorer and the peek map. A raw Query Editor SELECT over SQLite doesn't yet carry the column-source metadata SQLite needs to auto-detect geometry, so browse SQLite spatial data through Table Explorer — or declare the column (below) — rather than a bare SELECT in the Query Editor.

In the results grid

Every spatial cell shows a compact summary — geometry type, vertex count and SRID (for example POLYGON · 5 pts · SRID 4326) — plus a map button. Clicking it opens a peek popover with a fit-to-data mini map, so you can eyeball a shape without leaving the grid. Both results grids match: the Query Editor results and the Table Explorer grid behave identically.

A geometry cell's peek popover in Jam SQL Studio showing a filled polygon on an OpenFreeMap basemap with Copy WKT and Copy GeoJSON buttons.
The peek popover fits the geometry to a mini map — with Copy WKT / Copy GeoJSON right there.

Query Editor — Map results view

Run any query that returns geometry and switch the results area to the Map tab. Jam SQL Studio plots every feature in the result, fit to the data, with a "Color by" selector and a feature count. Geometry is reprojected to WGS 84 when its SRID resolves; otherwise it falls back to a planar fit.

Jam SQL Studio's Query Editor with the Map tab active, plotting region polygons, a route line and city points over an OpenFreeMap basemap of Central Europe.
The Map results view plots polygons, lines and points over a live basemap.

Table Explorer — map pane & spatial filters

Open a table with a geometry column and toggle the map pane beside the grid. Selecting a row highlights its feature on the map, and selecting a feature highlights its row — the two stay in sync both ways.

Jam SQL Studio's Table Explorer with the map pane open beside the grid, a selected row's polygon highlighted on an OpenFreeMap basemap.
The Table Explorer map pane stays in sync with the grid — select a row, see its feature.

The filter row gains spatial filter chips:

  • Within bounding box — set the box from the current map view; Jam SQL Studio emits engine-correct SQL (for example ST_Intersects on PostGIS, STIntersects on SQL Server, SDO_FILTER on Oracle). Available on every engine (SQLite needs SpatiaLite loaded).
  • Within distance — a point + radius, emitted as ST_DWithin / STDistance / SDO_WITHIN_DISTANCE on PostgreSQL, SQL Server, MySQL and Oracle (some engines require SRID 4326). SQLite supports the bounding-box filter only.
  • Within a drawn area — click Draw area and trace a polygon straight on the map (click to drop points, click the first point or double-click to close, Esc to cancel); rows whose geometry falls inside the shape are kept. It emits ST_Intersects against your polygon reprojected to the column's SRID on PostGIS, MBRIntersects on MySQL, STIntersects on SQL Server and SDO_GEOM.RELATE on Oracle. Offered on native geometry / geography columns with a single known SRID (MySQL and Oracle require SRID 4326); SQLite and declared coordinate columns keep to the bounding-box filter.
A polygon drawn directly on the Table Explorer map in Jam SQL Studio, filtering the grid to rows whose geometry falls inside the drawn area.
Draw a polygon on the map and the grid filters to the rows inside it — the SQL is emitted for you.

Chips only offer the sub-operators an engine and its SRID can actually run — unsupported combinations are disabled with a tooltip that explains why. The map toolbar keeps everything in one row: a Filter group with an In view button (clip the query to whatever the map is currently showing) and the Draw area button, then the Color by selector and a feature count.

Not sure what the map can do? The (?) button in the map's top-right corner opens a short legend of its keyboard and mouse gestures — step through features with J / K, hold M and drag to measure, Alt-hover for coordinates, and paste WKT or drop GeoJSON to compare.

Spatial Explorer workspace

For multi-layer work, open the Spatial Explorer. Each layer is a query or a table, and you control its colour, an optional label column and a feature cap. Stack several layers on one basemap canvas to compare datasets — regions under routes under points.

Jam SQL Studio's Spatial Explorer workspace with two layers listed in a panel, each with its own colour, drawing filled region polygons over a basemap of Poland.
Spatial Explorer stacks multiple query/table layers, each with its own colour and cap.

Basemap & privacy

The interactive basemap (tiles from OpenFreeMap) is on by default. The first time a map renders, a dismissible notice explains that tiles are fetched from openfreemap.org and points you to the one-click opt-out in Settings → Spatial. Turn the basemap off — or work with no network, or on a geometry whose SRID can't be resolved — and the map draws a planar graticule instead, entirely offline. SRID resolution walks a ladder: built-in projections (WGS 84, Web Mercator) and a bundled EPSG definition set resolve instantly; an SRID in neither is looked up in the connection's spatial_ref_sys table; anything still unresolved falls back to the planar fit.

Curved geometry

CircularString, CompoundCurve and CurvePolygon render smoothly: their arcs are linearized on the client for display only, densified into short segments so MapLibre (which has no arc primitive) can draw them. A small "arc approximated for display" hint appears on affected geometries — and crucially, Copy WKT keeps the shape curved: a CircularString stays a CircularString, not the flattened display version, so nothing about your data changes. Curves work on PostgreSQL, Oracle, SQLite and SQL Server for root-level curve shapes (SQL Server and Oracle don't model a curve nested inside a collection); MySQL has no curve types.

A CircularString arc rendered smoothly on a map in Jam SQL Studio, with the 'arc approximated for display' hint visible.
Arcs render smoothly on screen; Copy WKT still returns the original curved geometry.

Copy & export

Grid copy (Ctrl+C) and CSV / XLSX export emit WKT; the peek and expanded-cell popovers add a Copy GeoJSON button as well. You can also draw a polygon on the Table Explorer map to filter rows by area (see above) — but Jam SQL Studio never edits stored geometry or writes shapes back to the database: the map is for exploring, filtering and exporting, not authoring.

Declaring coordinate columns

Plenty of tables store location without a geometry type — a lat/lng pair, or WKT/GeoJSON kept in text. Declare such a column as a coordinate column and Jam SQL Studio maps it like a real geometry. Four shapes are supported: WKT text, GeoJSON text, lat-lng text, and a latitude + longitude numeric pair. The declaration is stored per (connection, database) in MetaInfo, alongside loose foreign keys, JSON and enum declarations, and round-trips via MetaInfo export / import.

Try it without a database

Want to sanity-check a WKT or GeoJSON string right now? The free WKT viewer parses and draws geometry in your browser — no install, no data leaves the page. For the story behind the feature — and how each engine's wire format gets decoded — read the spatial support launch post.

Frequently asked questions

Which databases can Jam SQL Studio map geometry from?

All five relational engines: PostgreSQL/PostGIS (EWKB), MySQL (SRID-prefixed WKB), SQL Server (geometry/geography CLR), Oracle (SDO_GEOMETRY), and SQLite (SpatiaLite and GeoPackage blobs). Azure Data Explorer (Kusto) has no spatial types.

Does Jam SQL Studio support curved geometry?

Yes. CircularString, CompoundCurve and CurvePolygon are rendered by linearizing their arcs on the client for display, while Copy WKT keeps the shape curved — a CircularString stays a CircularString, not the flattened display version. This works on PostgreSQL, Oracle, SQLite and SQL Server for root-level curve shapes (SQL Server and Oracle don't model a curve nested inside a collection); MySQL has no curve types.

Is a basemap shown, and where do the tiles come from?

An OpenFreeMap basemap is on by default. A one-time privacy notice explains that tiles are fetched from openfreemap.org, and you can turn the basemap off in Settings → Spatial. With no network or an unresolvable SRID, the map falls back to a planar graticule that needs no tiles.

Can I map a table that stores latitude and longitude in plain columns?

Yes. A column with no native geometry type can be declared as a coordinate column (WKT text, GeoJSON text, lat-lng text, or a latitude + longitude numeric pair) in per-database MetaInfo, after which it maps like a real geometry column.

Can I edit geometry on the map?

No. Spatial support is visualize-and-export: geometry renders on maps and copies out as WKT or GeoJSON, but there is no in-map geometry drawing or editing.

Try Jam SQL Studio Today

Download the latest version and see your geometry columns on a real map.