jts

Converting British National Grid (EPSG:7405), coordinates into latitude and longitude coordinates Using Java( JTS prefered ) programmatically

て烟熏妆下的殇ゞ 提交于 2021-01-28 03:30:33
问题 Is there a way to use the Java to convert(British National Grid (10 Figure Grid Reference),) into lat/long? for example, I have a 558832.516608631,180065.50201851176 and would like to generate the lat/long using Java or JTS. I've seen questions/solutions using Javacript, but no solutions using Java alone. I've tried this using JTS: Coordinate c = new Coordinate(394028.93262359675,806122.3097467106); com.vividsolutions.jts.geom.Point p = gf.createPoint(c); CoordinateReferenceSystem utmCrs =

Converting British National Grid (EPSG:7405), coordinates into latitude and longitude coordinates Using Java( JTS prefered ) programmatically

南笙酒味 提交于 2021-01-28 02:15:20
问题 Is there a way to use the Java to convert(British National Grid (10 Figure Grid Reference),) into lat/long? for example, I have a 558832.516608631,180065.50201851176 and would like to generate the lat/long using Java or JTS. I've seen questions/solutions using Javacript, but no solutions using Java alone. I've tried this using JTS: Coordinate c = new Coordinate(394028.93262359675,806122.3097467106); com.vividsolutions.jts.geom.Point p = gf.createPoint(c); CoordinateReferenceSystem utmCrs =

JTS在卫星定位项目应用

孤者浪人 提交于 2020-11-20 08:01:53
1、JTS使用的maven pom <!-- 几何形状关系判断 --> <dependency> <groupId>com.vividsolutions</groupId> <artifactId>jts</artifactId> <version>1.13</version> </dependency> 2、JTS提供了如下的空间数据类型 Point MultiPoint LineString LinearRing 封闭的线条 MultiLineString 多条线 Polygon 多边形 MultiPolygon GeometryCollection 包括点,线,面 3、计算点到面的距离 WKTReader reader = new WKTReader(); Geometry point = reader.read(String.format(WKTPOINT, lng, lat)); for (String areaId : borderlineMap.keySet()) { Geometry polygon = borderlineMap.get(areaId); if (polygon.distance(point) == 0) { return areaId; } } 这里的距离polygon.distance(point)与百度的距离米大概需要乘以100000 4

How to get deserialized JTS Geometry field in Grails 4?

爷,独闯天下 提交于 2020-05-13 19:58:51
问题 I'm building a small Geo server using PostgreSQL + PostGIS + Grails 4 + Geoserver + React + JTS. The domain class has a com.vividsolutions.jts.geom.Point field that is maped to a sqlType: 'geometry(Point,4326)' . When I search any findBy...(...) search, I cannot get the result, as it is not posible deserialize in Grails 2.x I did not get this problem. It's my first time programming in Grails in 3 years. package .... import com.vividsolutions.jts.geom.Point class Aqop { String pid String pname

Jboss use JTS instead of JTA

巧了我就是萌 提交于 2020-03-05 01:34:27
问题 I have jacorb subsystem enabled in my jboss. But JTS is not enabled, I use only JTA. When an EJB remote call received by the jboss, instead of using JTA(com.arjuna.ats.internal.jta.transaction.arjunacore.jca.TransactionImporterImple) it gets JTS(com.arjuna.ats.internal.jta.transaction.jts.jca.TransactionImporterImple) and proceed with JTS. Since JTS is not enabled it failed with ORB is not initialized error. Can you please help me to identify why JTS is used instead of JTA. JBAS014134: EJB

Jboss use JTS instead of JTA

好久不见. 提交于 2020-03-05 01:34:07
问题 I have jacorb subsystem enabled in my jboss. But JTS is not enabled, I use only JTA. When an EJB remote call received by the jboss, instead of using JTA(com.arjuna.ats.internal.jta.transaction.arjunacore.jca.TransactionImporterImple) it gets JTS(com.arjuna.ats.internal.jta.transaction.jts.jca.TransactionImporterImple) and proceed with JTS. Since JTS is not enabled it failed with ORB is not initialized error. Can you please help me to identify why JTS is used instead of JTA. JBAS014134: EJB

Error de-serializing Geometry with Jackson

人走茶凉 提交于 2020-01-25 07:29:04
问题 I am trying to implement a simple geometry (GIS) controller with PostGIS database in Spring-Boot 2.2.1. When I try to de-serialize my task entity which contains the Point Geometry I am getting error: There was an unexpected error (type=Internal Server Error, status=500). Could not write JSON: org.locationtech.jts.geom.Point cannot be cast to com.vividsolutions.jts.geom.Geometry; nested exception is com.fasterxml.jackson.databind.JsonMappingException: org.locationtech.jts.geom.Point cannot be

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

How to Swap Coordinates of jts.geom.Geometry object from Lat, Long to Long,Lat in JTS

断了今生、忘了曾经 提交于 2019-12-24 10:48:45
问题 I have a geometry object of type (com.vividsolutions.jts.geom.Geometry). it is currently in latitude, longitude form and I'd like to flip the coordinates so that its longitude latitude so that I can have it in GeoJSON format for mongodb. My constraints that I am seeing are: a) the input that I would like to flip coordinates for is a Geometry object. b) The Geometry object will be either a Polygon type or Multipolygon. c) I would like to flip the coordinates before the type cast to Polygon