hibernate-spatial

How to get geoJSON from spring REST Controller?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-25 02:09:25
问题 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 features of this layer in a class. I defined the class below: @Entity @Table(name="MyPoint") public class MyPoint { @id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long Id; @Column private String name; @Type(type = "org

How to get geoJSON from spring REST Controller?

巧了我就是萌 提交于 2020-01-25 02:09:08
问题 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 features of this layer in a class. I defined the class below: @Entity @Table(name="MyPoint") public class MyPoint { @id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long Id; @Column private String name; @Type(type = "org

PostgisDialect vs PostgreSQLDialect or both?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 15:32:48
问题 My application is going to use the following technologies: Postgresql Postgis JPA/Hibernate Spring Spring Data JPA I understand (from the Hibernate Spatial documentation) that one has to use the following dialect: org.hibernate.spatial.dialect.postgis.PostgisDialect What I don't understand though is how the above dialect relates to the standard Posgresql dialect, i.e. org.hibernate.dialect.PostgreSQLDialect ... Is the Postgis dialect a superset of the standard Posgresql dialect? Will all

Hibernate spatial is offline - anyone got more information

天大地大妈咪最大 提交于 2019-12-25 06:25:00
问题 Since a few days hibernatespatial.org is offline, along with the mailing lists and Maven repositories. Has anyone got news on that? 回答1: It's online now, and pointing interested parties at Hibernate's own site since the project is being brought into the Hibernate fold. 回答2: I ran into this same issue (hibernatespatial.org has been offline for days). I was able to resolve it by uploading the artifacts to our internal repo and then setting hibernate to timeout almost immediately Maven

Hibernate Spatial - 'Invalid endian flag value encountered' Exception

﹥>﹥吖頭↗ 提交于 2019-12-23 08:36:40
问题 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 given radius of a particular latitude/longitude. The geometry values seem to be persisted without any problem, and are defined like this in my entity class: @Column(columnDefinition = "Geometry", nullable = true) @Type(type = "org.hibernate.spatial.GeometryType") private Point coordinates = null; I

Using JPA Criteria Api and hibernate spatial 4 together

跟風遠走 提交于 2019-12-17 16:31:12
问题 Given the query example here: http://www.hibernatespatial.org/tutorial-hs4.html Query query = em.createQuery("select e from Event e where within(e.location, :filter) = true", Event.class); query.setParameter("filter", filter); Is it possible to rewrite the query using jpa 2 criteria api?( I am unsure how i should deal with the within(e.location, :filter) part. 回答1: I recently work at the exact same problem. My solution is a own Predicate for the within-keyword. public class WithinPredicate

Type geometry not found with postgis and hibernate-spatial

試著忘記壹切 提交于 2019-12-13 21:43:08
问题 I'm trying to setup a project with hibernate-spatial using postgis. Following the tutorial for hibernate-spatial 4.0-M1 I first run into the problem that the dependency postgis-jdbc-1.5.3.jar couldn't be found. Like suggested here by somebody I used the version 1.5.2 and the tutorial compiles. But I got an error if I try to run it. I set the debug-level for hibernate to debug und stumbled upon the following problem: DEBUG SQL - create table Event ( id int8 not null, date timestamp, location

Is com.vividsolutions.jts.geom.Geometry directly transportable using requestfactory?

二次信任 提交于 2019-12-13 04:37:46
问题 Is com.vividsolutions.jts.geom.Geometry directly transportable using requestfactory or do i have to use a value proxy with my entityproxy? 回答1: Per http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html#transportable, you'd have to use a ValueProxy . But it doesn't seem possible to roundtrip the geometry as there are less setters than getters (i.e. the geometry cannot be re-constructed from an empty object just by calling setters); so you'd probably have to transport the textual

which function is good to check whether the given lat & lng is inside the polygon?

为君一笑 提交于 2019-12-13 04:26:17
问题 I have found the following mysql spatial functions which can check a given lattitude and longtitude is inside the polygon or not. 1 - MBR_Contains 2 - MBR_Within Please guide me, which will give fast and accurate result to check a given point is inside or outside of the polygon in MySql server by the query itself. Also Suggest me, If you found any better solution than this ( It should be checked by query in Mysql Server.)? Regards, ArunRaj 回答1: They're likely the same (in terms of speed), but

How to use spatial annotation?

让人想犯罪 __ 提交于 2019-12-13 03:38:06
问题 I am using elastic search with hibernate search.I am having a requirement where I have to build tiles map in kibana.For that I need to have geo_point data with latitude and longitude value.I found in hibernate we have @spatial annotation to do this,but when I am using I am getting below exception. java.lang.NullPointerException at org.hibernate.search.engine.metadata.impl.TypeMetadata$Builder.getAnalyzerReference(TypeMetadata.java:631) I am having two model entity and I am writing it below.I