
Store and edit geospatial data with PostGIS in a Strapi v5 custom field
released February 4, 2026
npm install @gismark/strapi-geometry-fieldsStore and edit geospatial data with PostGIS in a Strapi v5 custom field.
The plugin accepts WKT (Well-known text) or GeoJSON from the API and stores it in a PostGIS column in the db table of the content type. You can use multiple geometry fields across different content types. All features are editable and draggable using the hosted Leaflet.Editable and Path.Drag.
Screenshot is a multipolygon with the boundaries of France as WKT.

This plugin only runs with PostgreSQL and needs PostGIS to be installed. If you haven't already done so, run this query in Postgres:
CREATE EXTENSION postgis;For the Leaflet map and the markers to display you must allow Openstreetmap in your middlewares.js. Update "strapi::security" like so:
{ name: "strapi::security", config: { contentSecurityPolicy: { useDefaults: true, directives: { "img-src": ["'self'", "data:", "*.tile.openstreetmap.org"], upgradeInsecureRequests: null, }, }, }, },In the settings, choose if the plugin should handle WKT or GeoJSON from the API (default is WKT)
Add this field to the schema.json of your content type
"geometry": { "type": "customField", "customField": "plugin::geometry-fields.geometry" }Currently, these geometries as WKT and GeoJSON are supported by the plugin for all CRUD functions:
Geometry Fields is used in a production environment by Gismark, a web application for creating interactive maps with an AI-assisted workflow
MIT
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
