Last updated: 2026-09-23
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, a dedicated Spatial Explorer workspace, and a map tile on SQL Dashboards. 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:
| Engine | Spatial types | Wire format decoded | Curves |
|---|---|---|---|
| PostgreSQL / PostGIS | geometry, geography | EWKB (with SRID) | Yes |
| MySQL / MariaDB | geometry & subtypes | 4-byte SRID prefix + WKB | No curve types |
| SQL Server | geometry, geography | CLR UDT (MS-SSCLRT) | Yes |
| Oracle | SDO_GEOMETRY | SDO ordinates + element info | Yes |
| SQLite | SpatiaLite / GeoPackage | SpatiaLite blob, GPKG header + WKB | Yes |
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.
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. Longitude/latitude data is drawn on the basemap, and so is Web Mercator data: geometry in SRID 3857 (or its aliases 900913, 3785, 102100 and 102113) is converted from metres to longitude/latitude for display, row by row, so a result that mixes 3857 and 4326 rows places both, and a small note on the map reads "Shown from SRID 3857 (Web Mercator)". The stored values, copies and exports keep their metres. The SRID label decides: longitude/latitude numbers stored under a 3857 label (a common mix-up on MySQL GEOMETRY SRID 3857 columns) are read as metres and land near 0°, 0°, and the note shows what was assumed — fix the label (for example with ST_SetSRID) to place them. Other coordinates that are not longitude/latitude — another projected SRID such as 2180 or 27700 stored in metres, geometry with no SRID, or latitude and longitude swapped — are drawn in their own units without a basemap, with a note that names the SRID and how to convert it (for example ST_Transform(geom, 4326) on PostGIS, MySQL and SpatiaLite, SDO_CS.TRANSFORM(geom, 4326) on Oracle; SQL Server has no built-in conversion). The Table Explorer map pane and the Spatial Explorer behave the same way; while such data is drawn without a basemap, the Table Explorer map filters In view and Draw area are disabled (the distance point cannot be picked on the map either), because the map cannot report longitude/latitude for them.
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.
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_Intersectson PostGIS,STIntersectson SQL Server,SDO_FILTERon Oracle). Available on all five relational engines (SQLite needs SpatiaLite loaded). - Within distance — a point + radius, emitted as
ST_DWithin/STDistance/SDO_WITHIN_DISTANCEon 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_Intersectsagainst your polygon reprojected to the column's SRID on PostGIS,MBRIntersectson MySQL,STIntersectson SQL Server andSDO_GEOM.RELATEon Oracle. Offered on native geometry / geography columns with a single known SRID (MySQL and Oracle require SRID 4326 or Web Mercator); SQLite and declared coordinate columns keep to the bounding-box filter.
On a Web Mercator (SRID 3857) column, In view and Draw area convert the map view or the drawn shape to the column's metres and filter in that SRID on PostgreSQL, MySQL, SQL Server and Oracle. A drawn outline that would cross itself in the column's metres is refused with a message, so you can draw it again. Rows stored past the ±180° meridian (x beyond ±20,037,508.34 m, outside the range of EPSG:3857) are matched when the view crosses ±180°, or when the same Table Explorer tab has already shown such a row from the table (after a restart, only a filter already on that column remembers it); otherwise a map filter can miss them — wrap the data (for example with ST_WrapX, or by transforming it again) to avoid that. The distance filter is not offered on such a column, because Web Mercator metres are not distances on the ground. When the loaded rows include geometry with no SRID next to the others, In view and Draw area are disabled, because a filter in one SRID would skip those rows (SQLite's filter reads no SRID, so it is not affected). On PostgreSQL, In view also works on a page that mixes Web Mercator and other SRIDs; the other databases need one SRID on the page. When a filter leaves no rows on the page, In view uses the SRID of the filter already on that column. If the map shows a different geometry column than the one the filters apply to, In view is unavailable until you pick that column under Geometry. On SQLite, In view on a native spatial column needs SpatiaLite and stays disabled without it; declared coordinate columns work without it.
A spatial filter chip the database can no longer run — for example a distance chip restored from an earlier session on a Web Mercator column — stays in the filter bar marked Not applied with the reason, and the table loads without it. Pinning the view to a dashboard leaves such a chip out of the pinned query and says so.
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 (in the column's own units, so metres on a Web Mercator column), 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.
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. Web Mercator (SRID 3857) geometry is converted to longitude/latitude on every map surface, so it sits on the basemap like SRID 4326 data. For the peek map and geometry compare, 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.
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, or a spatial hex value copied from SQL Server, PostGIS, MySQL, SpatiaLite or GeoPackage, right now? The free WKT viewer decodes and draws it 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.





