We’ve been hard at work on a new WordPress plugin called WP-GeoMeta and we’re happy to announce that it was just accepted in the WordPress plugin repository!
Spatial Support for WordPress Metadata
What does WP-GeoMeta do? WP-GeoMeta makes it possible to store spatial data within WordPress. Just storing data isn’t very useful if without a way to search it, but as luck would have it, WP-GeoMeta also lets you run spatial searches.
What do we mean by spatial data? Any location data is spatial data. It could be latitude-longitude points representing stores, airports, cities, homes, etc. It could be the line of a river, a road or a GPS trace from a trip you took. It could be a polygons showing the boundary of a state park, a county or a sales area.
Or, the spatial data could be your own data that will enable functionality on your site to delight your customers.
How Does WP-GeoMeta Work?
WP-GeoMeta hooks into the WordPress metadata function such as update_post_meta and others to detect when spatial data is being stored. It stores a copy of the the data in a table with spatial datatype columns and a spatial index. Later, when you use WP_Query or get_posts with MySQL spatial functions WP-GeoMeta will ensure that the indexed data is used giving you fast spatial queries.
Who is WP-GeoMeta for?
WP-GeoMeta will be most useful for developers. The plugin makes it very easy to save and query spatial data. It works using the metadata and query functions you (or your developer) are already used to. It’s well documented and it comes with test scripts to verify that everything works the way it should.
Besides the ease of use, it is free and Open Source (pull requests accepted!) so you can include it in your projects. It was made with developers in mind, and even handles having multiple versions installed.
We would absolutely love to see you use it in your plugin! For more details, see our developers file on GitHub.
Go Put the Where In WordPress
The only way to get better spatial support in WordPress would be to create your own custom spatial tables and write your own spatial queries for each search. WP-GeoMeta dramatically lowers the bar in how difficult it is to use spatial data in WordPress. It lets you work on your site or plugin’s core functionality and leave the query writing to WordPress.
So get WP-GeoMeta and make use of your spatial data!
If all of this sounds interesting but you’d rather leave it in the hands of the experts, we’d love to help! We can develop your WordPress GIS site or plugin, ensuring that your spatial data is delighting your customers and making you look good. Tell us about your project on our Contact Us page.