jts教程:Geometry包


JTS拓扑结构程序组是一个通过使用明确的精度模型和健壮的几何算法来执行空间数据操作的Java应用编程孔。JTS是用来对可以支持空间数据集的确认、处理、综合及质疑的应用程序进行改善。这篇文献就是对在JTS拓扑程序组中执行的类、方法与算法进行说明。
JTS试图尽可能精确地执行开放式地理信息系统GIS中的简单要素实现规范(SFS)。在一些情况下,SFS是不清晰的,或者是遗漏了某个规范。在这种情况下,JTS试图选择一个合理的相容的替代物。SFS的不同之处与其细节之处都将会在这个说明书中论述到。有关等级与方法的详细文献将会以Java文件的形式出现,作为原始资料代码。

参考:《JTS官方技术规范中文翻译版》

jts.geom:

数据类型{Point,MultiPoint,LineString,LinearRing,MultiLineString,Polygon,MultiPolygon,GeometryCollection}

接口:Coordinate,Envelope,GeometryFactory

支持的操作:getGeometryType(), isEmpty(), getSRID(), getCoordinate(), getCoordinates(), getNumPoints(), isSimple(), getArea(), getLength(), getBoundary(), getCentroid(), getEnvelope(), distance(geometry), isWithinDistance(geometry, distance)

例子:Tests

https://github.com/locationtech/jts/blob/master/modules/tests/src/main/java/org/locationtech/jtstest/testrunner/Test.java

空间关系判断:

空间操作:

>>github:https://github.com/locationtech/jts

  • Javadoc for the latest version of JTS
  • FAQ - Frequently Asked Questions
  • User Guide - Installing and using JTS
  • Tools - Guide to tools included with JTS
  • Developing Guide - how to build and develop for JTS
  • Upgrade Guide - How to migrate from previous versions of JTS

>>Wiki:https://en.wikipedia.org/wiki/JTS_Topology_Suite