persistence icon indicating copy to clipboard operation
persistence copied to clipboard

JPA support for spatial queries and spatial data types

Open jgrassel opened this issue 6 years ago • 3 comments

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

jgrassel avatar Nov 21 '18 18:11 jgrassel

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.

andyjefferson avatar Nov 21 '18 18:11 andyjefferson

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.

m-reza-rahman avatar Apr 27 '21 03:04 m-reza-rahman

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.

beikov avatar Mar 18 '22 12:03 beikov