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.
41 questions
0 votes
0 answers
59 views
PostGIS cache lookup failed after database restore in integration tests
I’m facing an issue with PostGIS when running integration tests in a Quarkus-based application. The application includes geospatial data (e.g., airports with GeoFence geometries) and uses PostGIS for ...
0 votes
1 answer
4k 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 ...
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 @...
0 votes
0 answers
594 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, ...
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 ...
1 vote
0 answers
31 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) { ...
1 vote
0 answers
89 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 ...
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 is ...
2 votes
0 answers
312 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 ...
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 ...
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 ...
1 vote
0 answers
2k 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 ...
7 votes
2 answers
9k 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 ...
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, ...
1 vote
1 answer
458 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 ...