geotools

Reading ESRI shapefiles from the InputStream in Java

不问归期 提交于 2021-02-11 08:39:33
问题 I have a web application that is supposed to read a shapefile from a user's disk. I use a MultipartFile class (https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/multipart/MultipartFile.html) to upload it. As far as I understand, it is not possible to recover a file path from the MultipartFile . It causes a problem for me because I use the following code to interpret the shapefile content (I attach the constructor which is crucial): private ShapeFile(final File

org.getools - NoSuchFieldError: METER

老子叫甜甜 提交于 2021-01-29 14:13:02
问题 A Maven Java project using geotools 15.2 generates an error : NoSuchFieldError: METER pom.xml <dependency> <groupId>org.geotools</groupId> <artifactId>gt-data</artifactId> <version>15.2</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-shapefile</artifactId> <version>15.2</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-swing</artifactId> <version>15.2</version> </dependency> When running the code, the error is generated

NoSuchAuthorityCodeExcpetion in geotools program (gradle build) converting between coordinate systems

大兔子大兔子 提交于 2021-01-28 02:58:08
问题 I have a java geotools program to convert a coordinate between two coordinate systems. It attempts to convert between coordinate system ESPG:4326 and ESPG:5179. I receive the following exception when trying to execute this line in my code: CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326"); Exception in thread "main" org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS". at org.geotools.referencing

使用GeoTools 调用WFS服务(Java)

让人想犯罪 __ 提交于 2020-07-27 08:23:43
/** Title: TestBufferAnalysis.java Description: Copyright: Copyright (c) 2020 */ package com.shuidao01.test.geotools; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.geotools.data.DataStore; import org.geotools.data.DataStoreFinder; import org.geotools.data.FeatureSource; import org.geotools.data.Query; import org.geotools.factory.CommonFactoryFinder; import org.geotools.feature.FeatureCollection; import org.geotools.feature.FeatureIterator; import org.geotools.util.factory.GeoTools; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts

How do I create a circle with latitude, longitude and radius with GeoTools?

£可爱£侵袭症+ 提交于 2020-07-17 11:04:01
问题 Right now I have: Polygon circle = geometryBuilder.circle( myLong, myLat, radiusInMeters, 10); And it creates (with lat=28.456306, long=-16.292034 and radius=500) a nonsense polygon with huge latitudes and longitudes, such as: POLYGON ((483.678055 28.482505000000003, 388.1865521874737 -265.4101211462366, 138.1865521874737 -447.04575314757676, -170.8304421874737 -447.0457531475768, -420.8304421874737 -265.41012114623663, -516.321945 28.482504999999943, -420.83044218747375 322.3751311462365,

Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar

空扰寡人 提交于 2020-06-17 09:37:05
问题 I have used geotools library, in my project I have added all the dependencies to the buildpath Downloaded the libraries from Sourseforge. Added the same to the library, When I try to execute the application, I am getting the below error. SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details. Exception in thread "main" java.lang

Geotools lib suddenly disappear from repository

我们两清 提交于 2020-05-22 09:27:00
问题 Yesterday when I tried building a common service, it yield an error 253 Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:21.2, org.geotools:gt-epsg-wkt:jar:21.2, org.geotools:gt-epsg-hsql:jar:21.2: Could not find artifact org.geotools:gt-main:jar:21.2 in spring-milestones (https://repo.spring.io/milestone) It was success just a few hours ago, before the issue occurs. No change has been made for a long

Geotools lib suddenly disappear from repository

时光总嘲笑我的痴心妄想 提交于 2020-05-22 09:25:21
问题 Yesterday when I tried building a common service, it yield an error 253 Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:21.2, org.geotools:gt-epsg-wkt:jar:21.2, org.geotools:gt-epsg-hsql:jar:21.2: Could not find artifact org.geotools:gt-main:jar:21.2 in spring-milestones (https://repo.spring.io/milestone) It was success just a few hours ago, before the issue occurs. No change has been made for a long

Geomesa-Hbase集群部署

爱⌒轻易说出口 提交于 2020-05-03 16:30:28
本文记录一下Geomesa-Hbase集群部署,在单机部署的基础上 https: // www.cnblogs.com/help-silence/p/12817447.html 1.搭建集群 https: // www.cnblogs.com/help-silence/p/12517442.html 2.安装Hadoop分布式环境 https: // www.cnblogs.com/help-silence/p/12518731.html 3.安装Zookeeper https: // www.cnblogs.com/help-silence/p/12523466.html 4.修改Hbase配置为集群模式 https: // www.cnblogs.com/help-silence/p/12524484.html 5.Geomesa-Hbase不需要改动 6.测试环境 可以参照Geomesa-Hbase单机版的测试方法; 这里我用了idea中的代码测试,直接运行hbase的qucikstart就可以使用,由于maven编译qucikstart一直没有编译成功,我是用idea中maven插件进行编译, 一些没有找到的依赖包,我手动下载并导进工程(geotools相关的jar包,还有Geomesa-Hbase的lib下的所有jar包),可以运行