我正在尝试按照Convert Kml with multiple features to Geojson将KML文件转换为geoJson文件。 但是,我无法将jars作为包含以下类的maven依赖项。 KMLConfiguration FeatureJSON。
下面是我的pom.xml:http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 com.test.data 变流器 0.0.1-SNAPSHOT 原型 - 转换器 http://maven.apache.org
<dependencies>
<!-- https://mvnrepository.com/artifact/pull-parser/pull-parser -->
<dependency>
<groupId>pull-parser</groupId>
<artifactId>pull-parser</artifactId>
<version>2.1.10</version>
</dependency>
<dependency>
<groupId>org.geotools.xsd</groupId>
<artifactId>gt-xsd-core</artifactId>
<version>9.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.owasp.encoder/encoder -->
<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-configuration/commons-configuration -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.opengis</groupId>
<artifactId>geoapi</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository> <!--Add the snapshot repository here -->
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>opengeo</id>
<name>OpenGeo Maven Repository</name>
<url>http://repo.opengeo.org</url>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
</repository>
</repositories>
答案 0 :(得分:0)
我也在遵循该指南,并设法解决了maven deps。这是我的依赖项:
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools.xsd</groupId>
<artifactId>gt-xsd-core</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools.xsd</groupId>
<artifactId>gt-xsd-kml</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>${geotools.version}</version>
</dependency>
with repository
<repository>
<id>boundlessgeo.com</id>
<url>http://repo.boundlessgeo.com/main/</url>
</repository>
<repository>
<id>download.osgeo.org</id>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
和财产
<geotools.version>17.2</geotools.version>
很抱歉迟到的回复(不到一年BTW:D)。
希望它有所帮助。