JTS Topology Suite

JTS is an open source spatial library defining geometry, spatial relationships, and functions for processing geometries.

locationtech project

JTS Topology Suite

locationtech projectJTS

JTS Topology Suite is an open source library of spatial predicates and functions for processing geometries. JTS provides a complete, consistent, and robust implementation of fundamental algorithms for processing linear geometry on the 2-dimensional cartesian plane.

JTS Topology Suite provides an object model for planar geometry together with a set of fundamental geometric functions. JTS conforms to the Simple Features Specification for SQL published by the Open GIS Consortium.  JTS is designed to be used as a core component of vector-based geomatics software such as geographical information systems. It can also be used as a general-purpose library providing algorithms in computational geometry.

Core features

  • Geometry Model

    • Point, Line, Area
    • Geometry Collections
  • Geometry Operations

    • All SFSSQL operations: Intersect, union, within, ...
    • Full DIM-9 Relationships
  • Precision handling

    • Work with float, double, fixed, and double double coordinates
  • Geometric constructions

    • Factory driven construction for consistent configuration
  • Metric functions

    • Cartesian 2D distance, Hausdorff distance, ...
  • Spatial algorithms

    • buffer creation, line offsets, line simplification, ...
  • Spatial structures

    • Spatial indexes: Quadtree and R-tree
    • Advanced: Delauney triangulation
  • Input / Output

    • Text: WKT, GML, GeoJSON, ...
    • Binary: WKB
    • Integration: Shapefile, Oracle SDO, ...
  • High-precision arithmetic

    • Computational stability backed by an extensive test suite and 17 years of development and refinement.

Implemented Standards

  • Geographic JSON (GeoJSON)
  • Geography Markup Language (GML)
  • Simple Features for SQL (SFSQL)
  • Well-Known Binary (WKB)
  • Well-Known Text (WKT)