Loading...

Spatial Database & APIs

You can actually transform your WordPress installation into a proper spatial database using Mapster WP Maps. This is a very advanced feature that will properly require you to write some custom SQL, but Mapster will set up the infrastructure for you.

Plain SQL does have some decent spatial query possibilities — it’s not PostGIS, but it works well. Normally, Mapster WP Maps saves your data as basic strings of geoJSON, which is convenient for using with a custom post type, but not great for spatial analysis.

However, if you want to use your database for spatial querying, in Pro you can opt to turn on the spatial database. This will store your various geographies as geometry types in SQL, with a reference to the original post_id.

With this, you’ll be able to create custom endpoints in WordPress to do whatever kind of spatial queries you might want.

Check out the documentation more for spatial database and spatial API information.