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
3
votes
2 answers
Spatial Hibernate 5 On Wildfly 10
I am using Wildfly 10 and developing an application using Spatial Hibernate 5 with PostGIS database. I am getting the below error in runtime.
java.lang.IllegalStateException: Received object of type org.postgresql.util.PGobject
Can anyone suggest…

Dipuraj
- 51
- 1
- 6
3
votes
0 answers
Exclude field when query with JPARepository
I know that when marking a field with @Transient , that field will be excluded during persistence . But in my case , I just want to ignore it in the find() function , not with the save() function.
For example:
myJpaRepository.save(myModel) will…

xtiger
- 1,446
- 2
- 15
- 33
3
votes
1 answer
Spatial predicates with Hibernate 5 ORM
I´m migrating an existing application from Hibernate 3.6.10.Final (with hibernate-spatial 1.1.1) to Hibernate 5 ORM, which is supposed to include spatial capabilities. Therefore, I removed the reference to org.hibernatespatial in the pom.xml and…

krause
- 436
- 5
- 24
3
votes
2 answers
Postgis Point Data type is not persisting into DB
When I try to persist Point datatype to postgres DB it is failing with error
org.postgresql.util.PSQLException: ERROR: column "pointColumn" is of type point but expression is of type geometry
Here is my pojo…

Sunil Kumar
- 5,477
- 4
- 31
- 38
3
votes
3 answers
how to save geojson(in javascript) to geometry(MultiPolygon,4326) in PostGIS with Hibernate
I'm working on a jsf project(version 2.2).I have a geoJson object in javascript.The other side I have a column with type of geommetry(MultiPolygon,4326) in PostGIS. I'm using Hibernate 4.3.8 and Postgresql 9.3.
Geometry column definition in model…

Haktan Aydın
- 581
- 1
- 6
- 21
3
votes
1 answer
Hibernate spatial and PostGIS with WildFly 8
I'm migrating from Glassfish4 to WildFly8 application server and get the following error:
Can't convert object of type org.postgresql.util.PGobject
I am using Hibernate Spatial and PostGIS. For the Glassfish server I added the postgis jar to the…

user473453
- 894
- 2
- 11
- 23
2
votes
1 answer
Incorrect result using Geometry.reverse() for XYM coordinates
We are using jts-core (org.locationtech.jts:jts-core:jar:1.19.0) together with hibernate-spatial (org.hibernate:hibernate-spatial:jar:5.6.10.Final:compile) to retrieve geometries with measured dimensions from a PostGis (14.3) database.
The query…

wjans
- 10,009
- 5
- 32
- 43
2
votes
1 answer
Is PostgisPG10Dialect superseded by PostgreSQLDialect now?
I am using hibernate-spatial in version 6.1 with PostgreSQL 12.12.
According to older guides or this question, org.hibernate.spatial.dialect.postgis.PostgisDialect is
the right dialect to use. However, this dialect does not exist anymore. The newest…

Tim Lammarsch
- 161
- 1
- 1
- 10
2
votes
1 answer
How to make spring boot, spatial hibernate and postgis work?
I can't start my spring boot(2.6.3) project with hibernate-spatial in create mode.
It tells me that type "geometry does not exist".
The geometry type comes from the hibernate-spatial library.
However, I applied everything necessary:
add…

Fanga
- 67
- 1
- 7
2
votes
0 answers
How to create GIST spatial index on postgis with JPA annotations
I am using springboot, hibernate-spatial with postgis database to store and query spatial objects. I wonder if there is a way to create GIST spatial index on postgis with JPA annotations. I have only seen very old posts about spatial index creation…

Mikail Yetkin
- 31
- 4
2
votes
1 answer
Long and Lat values not passing to .createPoint(new Coordinate(long, lat));
I am using Hibernate Spatial, Postgres/Postgis, Spring Boot Gradle.
I am currently trying to populate point data to my Postgres/Postgis database. I am able to create a point -- however, when I pass my variables double longitude and double latitude,…

madelyn
- 23
- 4
2
votes
1 answer
Mapping MySQL Point Data Type with Hibernate
I have an existing MySQL database with a column in a table that has a "point" data type. The first thing I did was add the spatial dependency to our gradle build file via:
implementation 'org.hibernate:hibernate-spatial:5.4.2.Final'
I'm struggling…

JamesB41
- 703
- 10
- 20
2
votes
1 answer
Hibernate Spatial: how to determine an envelope over lots of entries
I have following given:
A database containing addresses with city, street, house number and an geometry.
@Id
@Column(name = "fid", unique = true)
private Integer fid;
@Column(name = "city")
private String city;
@Column(name = "street")
private…

SirFartALot
- 1,215
- 5
- 25
2
votes
1 answer
Grails 3 - Geometry type in domain
I'm trying to add a Point to a domain object in Grails 3.3.8 (current latest release). Grails 3.3.8 uses Hibernate 5.1.5, which has support for hibernate-spatial.
In build.gradle:
compile group: 'org.hibernate', name: 'hibernate-spatial', version:…

Anonymous1
- 3,877
- 3
- 28
- 42
2
votes
2 answers
How to store map geometry object to MS-SQL geometry column in Java?
I am trying to store a geometry object into my MS-SQL database which has a table with a geometry column. I get geometry in JSON format.
Here I got the latest MSSQL-JDBC version which had datatype 'com.microsoft.sqlserver.jdbc.Geometry'.
This…

Nisha
- 31
- 5