Questions tagged [hibernate-spatial]

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.

161 questions
1
vote
3 answers

Hibernate spatial query exception, but in the postgres console is working

I'm trying to execute this query in my Java code, using Hibernate and Hibernate Spatial: Query q = s.createQuery("SELECT c FROM crimes c WHERE ST_DWITHIN(ST_MakeLine(ARRAY['SRID=4326;POINT(-49.30621000000001…
1
vote
1 answer

Predicates in Hibernate-Spatial + PostGIS to search within miles radius with Latitude / Longitude

I am trying to use Predicates in Hibernate-Spatial to search within a radius of X miles (user defined). Though this sort of question has been asked before, only once before with Predicates and may not be current as it does not work. And I have to be…
Reece Fowell
  • 113
  • 1
  • 10
1
vote
1 answer

Hibernate Search query all the entities intersecting point

I'm working on an application that have restaurants, each one with delivery coverage, and need to answer for a user which restaurants can deliver to his/her current location. I get a trivial solution with hibernate-spatial, but when I get into…
Ignacio
  • 331
  • 6
  • 15
1
vote
1 answer

Storing geometries as SDO_POINT_TYPE with Hibernate 5 and Oracle

I am using Hibernate 5.1.0.Final in a Java application for database persistence. That will be handy for us as we expect to hit Oracle and Postgres instances, so we can have this ORM as an abstraction layer. In a former issue when querying geometries…
krause
  • 436
  • 5
  • 24
1
vote
1 answer

Hibernate Spatial 5 and MySQL 5.7

I'm using Hibernate Spatial 5.0.7 and MySQL 5.7. I need to use MySQL ST_* precise spatial operators, in order to do that I apply MySQLSpatial56Dialect, however if I use this dialect the Geometry datatype isn't correctly retrieved from the database.…
tcrespog
  • 31
  • 5
1
vote
0 answers

What is the unit of getLength() method of com.vividsolutions.jts.geom.Geometry

I am using Hibernate Spatial for developing a Web Application. I have MULTILINESTRING type Geometry and calculating length of the Geometry with geometry.getLength() in the following code snippet: //Returns a Geometry object of MULTILINESTRING…
sabyasachi3.cse
  • 49
  • 1
  • 11
1
vote
1 answer

Geographic Data types in JTS

I recently discovered the potential of using JTS library when dealing with geographic types within a project. I'm using hibernate as my ORM (including hibernate spatial). Before knowing the existence of JTS, I stored coordinates in a custom class…
joninx
  • 1,775
  • 6
  • 31
  • 59
1
vote
1 answer

HibernateException: Positions are collinear in 2D

I'm using Hibernate Spatial verion 5.0.7.Final as ORM. Sometimes when I perform a query using a Geometry as named parameter I get the following exception : org.hibernate.HibernateException: Positions are collinear in 2D I understand that sometimes…
krause
  • 436
  • 5
  • 24
1
vote
1 answer

How to persist MultiPoligon Objects in Hibernate-Spatial and Postgis

How can i make a com.vividsolutions.jts.geom.MultiPolygon objects as they occur e.g. from GeoTools using Hibernate-Spatial into a Postgis database?
Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38
1
vote
0 answers

Postgis and Oracle spatial queries with GeometryUserType parameters

Following with the configuration of Postgis and Oracle spatial for different Hibernate persistence units , I will have instances of MyClass persisted into either a Postgis or an Oracle database as configured in my persistence.xml and its mapping…
krause
  • 436
  • 5
  • 24
1
vote
1 answer

hibernate Spatial with oracle not work correct?

I'm working on GIS project. In that I want produce a web GIS by JSF + Hibernate. My Spatial data is in Oracle-Spatial 12c, for some Spatial Analysis I must be connect to Oracle DB and insert update a spatial Table. I see this link Hibernate-Spatial…
1
vote
2 answers

How to get geoJSON from spring REST Controller?

I am developing a GIS application with java(Spring-4.1.5 + Hibernate-4.3.8) and OpenLayers. For this project I use GeoTools-13RC, HibernateSptial-4.3, jts-1.13 and jackson-2.5. In this project, I have a layer in client side and in server, I save the…
Morteza Malvandi
  • 1,656
  • 7
  • 30
  • 73
1
vote
1 answer

JPA Create Parent/child relationship with a lot of children

I am trying to store entity Track with children entities TrackPoints with JPA method create. However, to store Track with its children TrackPoints last really long - about 30 seconds. I tried GenerationType.Identity and GenerationType.SEQUENCE. If I…
vkasala
  • 33
  • 5
1
vote
1 answer

Grails + Hibernate-Spatial + Postgis : conflict

I'm having a lot of trouble trying to set up a project using Grails 2.4.3 and a PostGIS database through the hibernate-spatial-postgresql plugin. It's a sample project, no other plugin than the default ones are installed. I enabled Postgres first,…
Javier92
  • 773
  • 6
  • 12
1
vote
1 answer

Can't convert object of type org.postgresql.util.PGobject

I have a problem with using Hibernate Spatial and PostGIS. I have an entity with a field like this: public class LocationBean { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Type(type =…
user473453
  • 894
  • 2
  • 11
  • 23