Skip to main content

Questions tagged [hibernate-spatial]

Hibernate Spatial is a generic extension to Hibernate ORM for handling geographic data. Hibernate Spatial is part of the Hibernate Object/Relational Mapping (ORM) project. Since Hibernate Spatial v5, Hibernate Spatial has been a module of the Hibernate ORM. Hibernate Spatial is open source and licensed, like Hibernate, under the LGPL license.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Passing Geometry parameters in HQL queries in Intellij Console

I'm struggling getting IntelliJ to accept objects as parameters (i.e. geometry-objects) when testing out my JPQL queries (hibernate-spatial 6.4.4) in my Spring application via the JPA-Console. In the ...
PeteHegn's user avatar
0 votes
1 answer
3k views

Problem to serialize and deserealize Geom field Spring Boot

I have a exception Caused by: org.hibernate.type.SerializationException: could not deserialize and another exception Caused by: java.io.StreamCorruptedException: invalid stream header: 30313031 My ...
Javier Aguilar's user avatar
1 vote
0 answers
2k views

Error while creating PostGIS 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 @...
jossefaz's user avatar
  • 237
0 votes
0 answers
485 views

Making Hibernate Spatial DWITHIN compatible with both H2GIS and PostGIS

I have following: @Query("SELECT f FROM Feature f WHERE DWITHIN(f.geometry, :centre, :range, true) = TRUE") DWITHIN is hibernate spatial function explained here. boolean dwithin(Geometry, ...
Mandroid's user avatar
  • 153
1 vote
1 answer
1k views

Creating a shapefile with SQL Query Using Geotools Hibernate and Java

Here is my context : 1] I have geometries in an postgresql database 2] My application uses JAVA/Hibernate 3] I Currently use Geotools to create a shapefile How I do it ? First i retrieve my ...
Geek Junior's user avatar
1 vote
0 answers
23 views

Within returns results despite there is no points inside the selected polygon

I have a method that uses within function, in order to check if a point is within a polygon: public List<PointsEntity> findPointsIntoAnExistingPolygon(PolygonEntity polygon) { ...
Carlos FTG's user avatar
1 vote
0 answers
76 views

Why coordinates are saved like "0101000020110F00003CDBA337DCC351C06D37C1374D374840" in db? [closed]

On my DB, the data looks like this: In the DAO I am executing a query: public Object login(UserEntity user) { StringBuffer sb = new StringBuffer(); sb.append("SELECT user FROM ...
Carlos FTG's user avatar
1 vote
1 answer
1k views

Sending geographic data from Postman?

I am trying to create a GIS app using Java, Spring and Hibernate. I send a JSON from Postman like this: { "pointName":"any location", "geom":"POINT(-71.060316 48.432044), 3857" } The JSON ...
Carlos FTG's user avatar
2 votes
0 answers
273 views

Hibernate spatial intersects() over antimeridian

I have a DB full of objects that contain a location (usually a polygon). I have a query defined that uses Hibernate Spatial's intersects() method to find all the objects that are with a box that's ...
user1050166's user avatar
0 votes
1 answer
3k views

Hibernate and Mysql gives "Geometry byte string must be little endian." error

I'm using mysql and wildly. I want to look for points in a given polygon. My method looks like: public Response getGeoJsonByBox( @QueryParam("topLeftX") double ...
dominic's user avatar
  • 121
1 vote
1 answer
4k views

Error using Wildfly10 + Hibernate-Spatial + Postgis

Hey I have set up a Nominatim Server to geocode my adresses. Because this all ready has the data I need in a other place I want to connect my Server again this database. So I tried to set up a ...
dominic's user avatar
  • 121
1 vote
0 answers
1k views

java.lang.IllegalArgumentException: Can't convert object of type org.postgresql.util.PGobject

I am trying to fetch GIS data using nativeSQLQuery, but I am facng below issue. Stack Trace: java.lang.IllegalArgumentException: Can't convert object of type org.postgresql.util.PGobject ...
AshiWandre's user avatar
7 votes
2 answers
7k views

Using geometry or point for postgis

I have a table with points that has lon/lat, i am adding postgis to my app. I am doing some tests and I found type POINT and type GEOMETRY. I want to convert my columns lon and lat to a point. For ...
Juan Diego's user avatar
1 vote
0 answers
2k views

Unexpected token in a sql query (Hibernate)

I have no more idea in how to run this query: SELECT row_to_json(fc)::text FROM (SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (SELECT 'Feature' As type, ...
gaia's user avatar
  • 99
1 vote
1 answer
425 views

Getting data from postgis with hibernate is returning an hash instead of the rows

Is the first time that i use spring and hibernate starting from the basics, i need to get geometries from a postgis table populated with Qgis. I generate a persistence mapping of the table with ...
gaia's user avatar
  • 99
1 vote
0 answers
468 views

Is it necessary to use hibernate-spatial for postgis?

I'm beginner in GIS. I have a database in PostgreSQL that contains a table location, that table contains a column with type point. I have to get points and display it on google map. Once I did the ...
salma's user avatar
  • 11
2 votes
0 answers
2k views

How to use Geometry objects (Point and LineString) in Hibernate Spatial

I'm developing an application in java (underlying database is postgresql 9.1) using hibernate 5, hibernate spatial and more technologies. Previously to my knowledge of the JTS classes to represents ...
joninx's user avatar
  • 205
3 votes
2 answers
2k views

NHibernate spatial geometry type become NULL

I am using postgres/postgis as db and Nhibernate as ORM on a C# project. This is the first time I try to map postgis to a .Net application. My setup uses NHibernate version 4.0.4.4000 and NHibernate....
Keyjote's user avatar
  • 133
2 votes
1 answer
4k views

Query all Object within n kilometer Radius with Hibernate Spatial?

I use hibernate spatial attach a geolocation to a car. My card domain class looks like this: import com.vividsolutions.jts.geom.Point class Card { String name Point location } My program is in ...
Michael's user avatar
  • 121
2 votes
2 answers
3k views

How to programmatically import a Shapefile into Oracle DB using Java?

What's the best approach to import a user uploaded shapefile into an Oracle DB? The dbf, shx and shp files of the Shapefile come in a ZIP Archive. Currently, we unzip programatically and then parse ...
nachtigall's user avatar
3 votes
0 answers
3k views

How to get geoJSON from spring REST Controller? [closed]

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 ...
Morteza Malvandi's user avatar
0 votes
2 answers
1k views

Does hibernate spatial support st_geometry created by ArcSDE?

We are using ArcSDE 10.0 to export data to the Oracle database, and the spatial property are saved using the SDE.st_geometry format. Now in our J2EE application we tried to manage these data by ...
giser's user avatar
  • 761
0 votes
1 answer
760 views

Oracle spatial index takes no effect

I am using hibernate spatial 4.0 with hibernate core 4.3, and we are using the oracle 11g with spatial extension. This is the entity and dao: @Entity public class Pts{ @Type(type = "org....
giser's user avatar
  • 761
1 vote
0 answers
272 views

FinderException after upgrade to Jboss 7

I am using hibernate to persist data. This was working in Jboss 5. Recently we upgraded to Jboss 7. The jars used remain same i.e. hibernate3.jar, hibernate-spatial-1.1.jar, hibernate-spatial-oracle-1....
Shariq's user avatar
  • 61
0 votes
1 answer
815 views

Use Hibernate with Oracle and Esri St_geometry type

Can anyone tell me whether I could use Hibernate with esri ST_GEOMETRY type? I have found that Hibernate Spatial does support SDO_Geometry, but nothing for ST_Geometry. I am using oracle 11g and ...
Smalis's user avatar
  • 776
5 votes
1 answer
3k views

Error saving polygon with hibernate spatial and postgis

I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin. Caused by: org.postgresql.util....
tmvolpato's user avatar
1 vote
0 answers
172 views

Which type in entities for PostGIS/Hibernate Spatial

I already manage to store, read and update PostGIS rows with Hibernate Spatial with a Point and a MLineString in a very simple case : a MLineString defining a road, display a point along this road ...
Zofren's user avatar
  • 259
2 votes
0 answers
243 views

Use of postgis with hibernate

We have an existing postgis database. Our application is developed in Java, but queries database through a jni dll, which appears to be not very effective for our purpose. I've managed to migrate to ...
raggnic's user avatar
  • 141
2 votes
1 answer
16k views

I nead to find the nearest places based on latitude/longitude points

I have a java aplication backed by a mysql database which contains events with locations (latitude/longitude), the location data is saved as POINT data type. I nead to find the nearest events in some ...
simonC's user avatar
  • 121
0 votes
1 answer
3k views

Getting fail to store Polygon Shape Object in Geometry Datatype with hibernate spatial API

Tried to store Polygon shape in database with HibernateSpatial API. I have followed this tutorial to store values. I am using Mysql as my database server. So Made some couple of changes for my ...
user2959196's user avatar
0 votes
1 answer
840 views

Choosing database for cartesian coordinates? [closed]

I'm trying to figure out, which database would be the best choice to store cartesian coordinates (x,y,z). I want to query for the distance between 2 positions, which positions are in a sphere ...
Andy's user avatar
  • 11
2 votes
1 answer
3k views

Running hibernate-spatial in Eclipse

I have a problem with Hibernate Spatial. I followed the tutorial 4.x, and I created my project using maven. after correcting some minor errors in pom.xml and in persistence.xml, executing the project (...
Pierock's user avatar
  • 35
5 votes
0 answers
2k views

Hibernate Spatial - 'Invalid endian flag value encountered' Exception [closed]

I'm trying to run a simple query in Hibernate Spatial 4.0 on PostgreSQL 9.3. I have a number of objects in a table with latitude/longitude values, and I'm trying to query objects that fall within a ...
Shadowman's user avatar
1 vote
0 answers
652 views

Hibernate Spatial - Query within an X kilometer radius?

I am new to Hibernate Spatial, and am trying to perform a simple query of objects within a given radius. I've created a number of entries in my database with properties corresponding to a latitude ...
Shadowman's user avatar
7 votes
2 answers
3k views

Find points that fall within a radius using Hibernate Spatial

I am using hibernate spatial and postgis and i want to find the points that fall within a certain radius. Using this SQL: SELECT name FROM institution WHERE ST_DWithin(geom,ST_GeographyFromText('SRID=...
vintuwei's user avatar
  • 171
2 votes
0 answers
379 views

What is the relation between geotools and hibernate-spatial ( differences and similarities) [closed]

I know that hibernate-sapatial is supposed to be an abstraction for the db . And from what i understand there is some kind of possibillity to do that with geotools? ( to what extent i do not know). ...
Rokk's user avatar
  • 29
1 vote
1 answer
653 views

hibernate spatial DDL creation with maven hibernate3 plugin

This is a very special question, I hope that somebody here already worked in a similar project setup. I am working with Netbeans and started a maven web project based upon the maven HS 4.x tutorial ...
Jürgen Zornig's user avatar
10 votes
1 answer
5k views

Hibernate Spatial 4 and PostGIS 2.0

I'm having some issues integrating these technologies: Hibernate Spatial 4.0-M1 PostGIS 2.0.2 (with compiled JDBC 2.0.2) Hibernate 4.1.1 The specific error is: Caused by: org.postgresql.util....
gonzalomelov's user avatar
2 votes
2 answers
1k views

Integrating Spring hibernate-spatial and Solr [closed]

For a new project I'm looking for a more "mainstream" like server side web development technology stack. This question could also be asked in Stack Overflow, but as we also use GeoServer and ...
Jürgen Zornig's user avatar
3 votes
3 answers
8k views

Hibernate Spatial MappingException for Geometry Column

I'm using Hibernate Spatial in a GIS application. I have an entity class, in which one of the columns is a geometry column, as shown below: @Entity @Table(name = "table_name") public class Admin ...
okello's user avatar
  • 1,780
1 vote
1 answer
3k views

Hibernate Spatial Maven Issue

I'm following the tutorial at http://www.hibernatespatial.org/tutorial-hs4.html. I've created a maven project, and imported it into Eclipse. However, when I run mvn dependency:list, I get the error ...
okello's user avatar
  • 1,780