使用 GeoTools 时无法找到 FactoryRegistry class
Not able to locate FactoryRegistry class when using GeoTools
我正在尝试使用 GeoTools 库加载和解析 shapefile。但是,当我尝试加载文件时,导致以下调用是 org.geotools.factory.FactoryRegistry
:
的依赖项失败
DataStore newStore = DataStoreFinder.getDataStore(connect);
错误:
org/geotools/factory/FactoryRegistry
java.lang.NoClassDefFoundError: org/geotools/factory/FactoryRegistry
我在 gradle 中包含了以下依赖项:
compile files ('libs/geotools/gt-opengis-14.2.jar')
compile files ('libs/geotools/gt-api-14.2.jar')
compile files ('libs/geotools/gt-shapefile-14.2.jar')
compile files ('libs/geotools/gt-cql-14.2.jar')
compile files ('libs/geotools/gt-main-14.2.jar')
compile files ('libs/geotools/gt-referencing-14.2.jar')
compile files ('libs/geotools/gt-epsg-hsql-14.2.jar')
我不确定是否需要所有这些,但是 none 其中缺少 class。我还缺少其他依赖项吗? class 记录在案 here。
我正在尝试使用 GeoTools 库加载和解析 shapefile。但是,当我尝试加载文件时,导致以下调用是 org.geotools.factory.FactoryRegistry
:
DataStore newStore = DataStoreFinder.getDataStore(connect);
错误:
org/geotools/factory/FactoryRegistry
java.lang.NoClassDefFoundError: org/geotools/factory/FactoryRegistry
我在 gradle 中包含了以下依赖项:
compile files ('libs/geotools/gt-opengis-14.2.jar')
compile files ('libs/geotools/gt-api-14.2.jar')
compile files ('libs/geotools/gt-shapefile-14.2.jar')
compile files ('libs/geotools/gt-cql-14.2.jar')
compile files ('libs/geotools/gt-main-14.2.jar')
compile files ('libs/geotools/gt-referencing-14.2.jar')
compile files ('libs/geotools/gt-epsg-hsql-14.2.jar')
我不确定是否需要所有这些,但是 none 其中缺少 class。我还缺少其他依赖项吗? class 记录在案 here。