geotools

Google maps spatial reference system

寵の児 提交于 2020-01-10 19:37:11
问题 What is Google map's spatial reference system using when you enter a lat, long into the maps search bar? I've found hints that it might be WGS84 but after converting to that coordinate system, nothing shows up when i paste the coordinates into the google maps search box. I am converting from GDA MGA 56. Sample: Input MGA56 coords: 336301, 6253363 Expected WGS86 coords: -33.8473340793201, 151.230631835944 I get: 16834916.928327594 -4008321.1020318186 Spatial coord systems: EPSG:28356 for MGA56

Android App build on geotools library missing native java libs

谁都会走 提交于 2020-01-05 02:50:07
问题 I want to use geotools(8.0-M3 currently, could be also 2.7.3) library in an Android app, using eclipse. (win7 prof, 4gb ram) But the build process crash, and i get following error Unhandled event loop exception Java heap space The java heap space problem should be solveable, but it seems there is more. (3gb should be enough, isn't it?) My final target is to be able to request a postgres postgis db on geoserver by OGC "web feature service" and "web map service". I already set the eclipse ini

Neo4j Spatial over REST through the JAVA API not working (for me)

六月ゝ 毕业季﹏ 提交于 2020-01-04 05:51:07
问题 I'm working on a Grails app over Neo4J which I'd like to also export as a GIS database. Looking at the examples for how to use neo4j in GeoServer/uDig it appears that the Spatial integration is only via embedded neo4j databases. Does anyone know whether it's possible to set things up so that my Neo4J is available over REST, so that I can interface to it from a variety of places? At first sight it appears that it ought to be possible: // Works with this embedded database //def graphDb = new

Java API for parsing MapInfo TAB format

那年仲夏 提交于 2020-01-02 12:19:49
问题 I am working on parsing a MapInfo TAB Format file in Java. It consists of a set of four files viz .TAB, .ID, .MAP and .DAT. After searching on web I came across a parser provided by GeoTools at this repository: https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/data/MapInfoFileReader.java When I use this API for parsing the MAPInfo TAB format file bundle, the API throws exception: "Didn't find a minimum of three control points in the .tab file." I

Geotools distance calculation fails with no convergence exception for several lat lon points

我怕爱的太早我们不能终老 提交于 2020-01-02 05:34:07
问题 I have a number of points which make getOrthodromicDistance method to fail with exception in geotools lib, while these points are valid lat lon points: Point which throws the exception (lat,lon): val p1= (5.318765,-75.786109) val p2= (-6.32907,106.09254) eg exception: No convergence for points 75°47,2'W 06°19,7'S and 106°05,6'E 05°19,1'N. java.lang.ArithmeticException: No convergence for points 75°47,2'W 06°19,7'S and 106°05,6'E 05°19,1'N. at org.geotools.referencing.GeodeticCalculator

Java equivalent of OpenLayers [closed]

你离开我真会死。 提交于 2019-12-31 10:48:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am looking for a Java library to display map data from various sources, including shapefile, WMS, WFS, Google Maps, possibly ArcIMS, etc. It seems like OpenLayers is the closest thing to what I want, except it's a JavaScript library, and I'm writing a Swing application. GDAL looks promising, but as far as I can

Java equivalent of OpenLayers [closed]

守給你的承諾、 提交于 2019-12-31 10:47:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am looking for a Java library to display map data from various sources, including shapefile, WMS, WFS, Google Maps, possibly ArcIMS, etc. It seems like OpenLayers is the closest thing to what I want, except it's a JavaScript library, and I'm writing a Swing application. GDAL looks promising, but as far as I can

[导入]使用GEOTOOLS(2.3)读取POSTGIS内容

浪尽此生 提交于 2019-12-31 09:30:20
摘要: 刚刚开始学习GeoTools得时候就是感觉关于这方面的资料真是少的可怜,无奈之中翻E文资料,苦学E文。。。唉。。。但是如果说一个知名的开源项目文档中错误百出,我真的很是无奈。。。 这段时间公司的工作也是很忙,所以只能抽空晚上慢慢研究GeoTools了。。。 将今天的测试用的GeoTools读取PostGis内容的代码发布出来,希望能对和我一样想去学习GeoTools的同仁起到帮助作用,也希望各位WEBGIS大拿多给我一些意见。。。毕竟以前不是搞GIS,现在很是吃力。。。 阅读全文 sinoly 2007-01-27 03:04 发表评论 文章来源: http://www.blogjava.net/sinoly/archive/2007/01/27/96245.html 来源: https://www.cnblogs.com/sinoly/archive/2007/09/15/894303.html

read coordinates from shp file and compute distance

蹲街弑〆低调 提交于 2019-12-31 03:57:09
问题 I want to compute the nearest distance from a point to a shp file (ports.shp) from natural earth data. For example, I am loading the features of the file: ... String filename = "10m_cultural/ne_10m_ports.shp"; ... public static void Calcs(String filename) throws IOException, NoSuchAuthorityCodeException, FactoryException, TransformException { HashMap<String, Object> params = new HashMap<>(); params.put("url", DataUtilities.fileToURL(new File(filename))); DataStore ds = DataStoreFinder

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