geotools简介
官网
https://docs.geotools.org/latest/userguide/index.html
架构图
常用功能列表
Module | Purpose |
---|---|
gt-render | Implements of Java2D rendering engine to draw a map |
gt-jdbc | Implements for accessing spatial database |
gt-main | Implements for accessing spatial data |
gt-xml | Implements of common spatial XML formats |
gt-cql | Implements of Common Query Language for filters |
gt-main | Interfaces for working with spatial information. Implements filter, feature, etc… |
jts | Definition and implementation of Geometry |
gt-coverage | Implementation for accessing raster information |
gt-referencing | Implementation of co-ordinate location and transformation |
gt-metadata | Implementation of identification and description |
gt-opengis | Definition of interfaces for common spatial concepts |
插件
Module | JAR | Plugin |
gt-render | ||
gt-jdbc | gt-jdbc-db2 | Geometry in DB2 |
gt-jdbc-h2 | Pure Java “H2” database | |
gt-jdbc-mysql | Geometry in MySQL | |
gt-jdbc-oracle | Oracle SDO Geometry | |
gt-jdbc-postgis | PostgreSQL extension PostGIS | |
gt-jdbc-sqlserver | SQL Server | |
gt-jdbc-hana | SAP HANA | |
gt-jdbc-terasdata | Teradata | |
gt-main | gt-shape | Shapefile read/write support |
gt-wfs | WFS read/write support | |
gt-xml | ||
gt-cql | ||
gt-main | ||
jts | ||
gt-coverage | gt-geotiff | GeoTIFF raster format |
gt-arcgrid | arcgrid format | |
gt-mif | MIF format | |
gt-image | JPG, PNG, TIFF formats | |
gt-referencing | epsg-access . | Official EPSG database in Access |
epsg-hsql | Pure Java port of EPSG database | |
epsg-wkt | Lightweight copy of EPSG codes | |
epsg-postgresql | PostgreSQL port of EPSG database | |
gt-metadata | ||
gt-opengis |
扩展
除此之外,GeoTools
团队在GeoTools
的基础上实现了一些扩展,当然了,这些扩展是为了提供一些额外的功能。这些扩展是相互独立的,我们可以直接在项目中使用。
JAR | Extension |
---|---|
gt-graph | Work with graph and network traversals |
gt-validation | Quality assurance for spatial data |
gt-wms | Web Map Server client |
gt-xsd | Parsing/Encoding for common OGC schemas |
gt-brewer | Generation of styles using color brewer |
GeoTools
团队为了支持GeoTools
中的XML模块,将几个XML模式打包成JAR形式,方便开发者进行调用。
JAR | Schema |
---|---|
net.opengis.ows | open web services schema |
net.opengis.wfs | web feature service |
net.opengis.wps | web processing service schema |
net.opengis.wcs | web coverage service schema |
net.opengis.wfs | web feature service schema |
org.w3.xlink | XLink schema |
XSD解析器通过一系列XSD插件使用这些工具。这些插件指示如何使用Eclipse XSD库解析和编码额外的内容来解析XML模式文档,并提供“绑定”,显示如何解析和编码Java类,如String、Date、URL和Geometry。
JAR | Bindings |
---|---|
gt-xsd-core | Basic types defined by XML schema |
gt-xsd-fes | filter 2.0 |
gt-xsd-filter | filter (used by OGC CAT and WFS) |
gt-xsd-kml | keyhole markup language |
gt-xsd-wfs | web feature service |
gt-xsd-wps | web processing service |
gt-xsd-gml3 | geographic markup language 3 |
gt-xsd-gml2 | geographic markup language 2 |
gt-xsd-ows | open web services |
gt-xsd-wcs | web coverage service |
gt-xsd-wms | web map service |
gt-xsd-sld | style layer descriptor |
以下是GeoTools
不支持的扩展,你也可以使用Maven下载它们来使用。
Unsupported | Purpose |
---|---|
gt-swt | Standard widget toolkit interactive map |
gt-swing | Swing interactive map |
gt-oracle | retired oracle support |
gt-postgis | retired PostGIS support |
gt-db2 | retired db2 support |
gt-wps | Web Processing Service client |
gt-process | Job system for spatial data |
geotools引用
maven项目中引用值得注意的地方
1 在pom中配置仓库
<repositories>
<repository>
<id>osgeo</id>
<name>OSGeo Release Repository</name>
<url>https://repo.osgeo.org/repository/release/</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
<repository>
<id>osgeo-snapshot</id>
<name>OSGeo Snapshot Repository</name>
<url>https://repo.osgeo.org/repository/snapshot/</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>
<!--GeoServer-->
<repository>
<id>GeoSolutions</id>
<url>http://maven.geo-solutions.it/</url>
</repository>
</repositories>
2 如果setting中使用了阿里云镜像设置不起作用
<mirror>
<!--该镜像的唯一标识符。id用来区分不同的mirror元素。 -->
<id>nexus-aliyun</id>
<!--*指的是访问任何仓库都使用我们的私服-->
<mirrorOf>*,!osgeo,!GeoSolutions,!osgeo-snapshot,!alfresco</mirrorOf>
<!--镜像名称-->
<name>Nexus aliyun</name>
<!--该镜像的URL。构建系统会优先考虑使用该URL,而非使用默认的服务器URL-->
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public