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