persistence
persistence copied to clipboard
JPA support for spatial queries and spatial data types
Various database implementations have added support for spatial awareness [1], both in data types as well as the ability to execute queries that can consider spatial comparisons (location, distances between locations, etc.) As of the JPA 2.2 spec, there is no native support for such capabilities -- should support for spatial data be considered for the next version of the JPA specification?
[1] - https://en.wikipedia.org/wiki/Spatial_database
FWIW Some JPA providers already provide support for such types, and their querying. http://www.datanucleus.org:15080/products/accessplatform_5_2/jpa/mapping.html#_geospatial_types http://www.datanucleus.org:15080/products/accessplatform_5_2/jpa/query.html#jpql_functions_geospatial
OGC Simple Feature spec would provide a starting point for such a specification.
How realistic is it that this would make it into Jakarta Persistence any time in the future? This seems rather expansive and unlikely to be supported by many vendors. I would suggest just closing this to reduce clutter.
Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker
Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.
Hibernate provides support for spatial data types and functions for a long time already with its hibernate-spatial module. If anyone is willing to work on the spec parts, Hibernate can serve as a compatible implementation.