Hibernate Spatial is a generic extension to Hibernate for handling geographic data. Hibernate Spatial is open source and licensed, like Hibernate, under the LGPL license. Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts away from the specific way your database supports geographic data, and provides a standardized, cross-database interface to geographic data storage and query functions.
Questions tagged [hibernate-spatial]
161 questions
0
votes
2 answers
How to send PostGiS Geometry and Point data types through Spring Boot Rest API
I have an query that returns an interface OverlayDTO that I get from a native query. center is PostGIS point and geometry as you might have guessed it is geometry
@Query("SELECT " +
"o.geometry as geometry, " +
"o.center as center, "…

Simonas Petkevičius
- 348
- 1
- 2
- 12
0
votes
1 answer
How to build JPA Predicate for checking point belongs to given polygon
I'm trying to build javax.persistence.criteria.Predicate which determines is point belongs to a given polygon.
That predicate I want to use to build the query. I want to use Criteria API to dynamically build queries on given params from a…

Woland
- 623
- 2
- 13
- 31
0
votes
2 answers
Jhipster-generated Spring Boot + MySql project config for spatial queries
My goal is to add the capability for geospatial queries to my jhipster-generated Spring Boot + MySql project, but I have failed to properly configure my H2 database for queries performed by my tests and by my dev database for local deployments of…

kingofswords
- 95
- 1
- 2
- 8
0
votes
1 answer
Construct LineString using org.geolatte.geom
How do I convert the following MySQL expression to a corresponding org.geolatte.geom.LineString, using the org.hibernate:hibernate-spatial library.
LineString(Point(-1, start_timestamp), Point(1, end_timestamp));
The DSL.linestring requires a…

user634545
- 9,099
- 5
- 29
- 40
0
votes
1 answer
Hibernate Spatial with MySQL and Spring Boot
I am developing an app that will store location data from map to the MySQL database.I came across MySQL spatial data types which can be useful to perform some operations on the location data.
I wanted to integrate hibernate spatial with spring boot…

kemblekaran
- 174
- 2
- 14
0
votes
1 answer
No Dialect mapping for JDBC type: 1111 when selecting "org.locationtech.jts.geom.Point" in native query
I want to implement a projection for messages with a calculated distance using native query
@Entity
@Table(name= "messages")
data class Message(
@Id
@GeneratedValue
var id: Int?=null,
var message: String,
var userName: String,
var…

DCO
- 1,222
- 12
- 24
0
votes
2 answers
JTS geometry in Hibernate spatial generating " ERROR: function within(geometry, bytea) does not exist"
Hibernate-spatial 5.4.22, hibernate.dialect = org.hibernate.spatial.dialect.postgis.PostgisDialect
A very straightforward query:
import org.locationtech.jts.geom.Geometry;
...
@Query(value = "Select s from #{#entityName} s where within(s.shape,…

Scaddenp
- 67
- 11
0
votes
1 answer
Storing coordinates retreived by Google Maps GeocodingApi in an Oracle Database and calculate distances between them with SDO_GEOM.SDO_DISTANCE
I wrote a Spring-Application where I use the com.google.maps.GeocodingApi.GeocodingApi to retreive coordinates for addresses. After that I use the method com.vividsolutions.jts.geom.GeometryFactory.createPoint() to generate a Point I can store in my…

Lutz W
- 1
- 2
0
votes
1 answer
Error while creating spatial entity with Hibernate and GeometrySerializer : No qualifying bean of type 'GeometryParser>'
I tried to create a simple application with a geometry persistent layer (Spring boot with hibernate-spatial)
Here is my Entity class :
// Annotations from lombok project
@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
…

jossefaz
- 3,312
- 4
- 17
- 40
0
votes
0 answers
Function "ST_WITHIN" not found in Spring Boot Application using h2 In-Memory Database and Hibernate Spatial
In a Spring Boot application (h2 in-memory database + Hibernate Spatial) in a Junit test, I'm getting error "Function "ST_WITHIN" not found" for a "within" query
pom.xml:
com.h2database
…

cnmuc
- 6,025
- 2
- 24
- 29
0
votes
1 answer
How to use PostgisFunctions in hibernate-spatial to transform CRS geometry
Hibernate (entity-manager, spatial...) version is 5.4.14
Database dialect as follows: org.hibernate.spatial.dialect.postgis.PostgisPG95Dialect
PostgresSQL 10, Postgis 2.4
Geometry field is being defined by org.locationtech.jts.geom thus in regards…

lujjas
- 68
- 9
0
votes
1 answer
Hibernate 5.4 PostgisDialect deprecated?
Due to Grails 3 migration to Grails 4 had to upgrade Hibernate 5.1.5 to the latest Hibernate 5.4.14 (including hibernate-entitymanager, hibernate-spatial, hibernate-ehcache, hibernate-core...).
JVM: OpenJDK 11
org.springframework.boot…

lujjas
- 68
- 9
0
votes
2 answers
Get Query is not working when using HQL in Hibernate Spatial
I am using Spring boot along with Hibernate for a Spatial query.
Libraries used:
1. Spring boot - 2.1.3.RELEASE
2. Hibernate Spatial - 5.3.7.Final
3. MariaDB - mysql Ver 15.1 Distrib 10.1.36-MariaDB
Whenever I use HQL as depicted below in Query, I…

Vishal nigam
- 51
- 1
- 8
0
votes
1 answer
How to find points within Polygon?
I recently work with hibernate spatial and I have such a question. I wanna to get all points inside polygon. How can I do that?
For example my distance query looks lite this:
final Coordinates coordinates =…

Mefisto_Fell
- 876
- 1
- 10
- 30
0
votes
1 answer
Why I've got org.postgresql.util.PSQLException: ERROR: Invalid endian flag value encountered?
I recently worl with hibernate-spatial 5 and I bumped with problem. When I'm trying to add my Geometry data to Postgres. I've got the next error on the commit transaction stage:
javax.persistence.PersistenceException:…

Mefisto_Fell
- 876
- 1
- 10
- 30