JTS提供了一套操作几何向量的java类库
早期版本 com.vividsolutions,已废弃不在维护
现在版本 com.locationtech.jts 由eclipse开源基金会托管
jts-core核心类库使用说明
具体结合示例代码详细介绍JTS下面核心包下面的geometry、coordinate、wkb、wkt等操作使用说明
计算点到线的垂线
延线的画线方向,判断点在线的右侧还是左侧
线到线投影
根据起始点求一个线的子线
计算线上面距离点起点一定距离的交点坐标
扩buffer,左扩N米右扩N米
单位换算
核心模块:
jts-core- 核心类库:提供geometry model, operations, algorithms, and spatial data structuresjts-io-common- I/O classes for open spatial formats
The following modules depend on proprietary libraries, and are not built by default:
jts-io-ora- Oracle reader and writerjts-io-sde- SDE reader and writer
The following modules are applications and data for testing and working with JTS
jts-tests- The JTS XML test suite and the Test Runner applicationjts-app-The TestBuilder GUI, for working with JTS geometry interactively
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.16.1</version>
</dependency>