我想在我的 java 项目中使用 geotools,执行以下操作:
import org.geotools.data.shapefile.ShapefileDataStore;
pom.xml试图在我的文件中添加一些 geotools 所需的依赖项,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ZJ_raw_to_DB</groupId>
<artifactId>ZJ_raw_to_DB</artifactId>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>19-SNAPSHOT</geotools.version>
</properties>
<dependencies>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>${geotools.version}</version>
</dependency>
</dependencies>
但是,maven 无法下载所有 geotools 依赖项,我检查了本地存储库 geotools 目录,.jar那里没有文件。我按照这篇文章的答案,但仍然无法解决。有人能告诉我如何让这些地理工具依赖项工作吗?
呼啦一阵风
相关分类