A JavaScript library for processing and analyzing 2D spatial geometries, ported from the Java Topology Suite (JTS).
JSTS is a JavaScript library that provides spatial predicates and functions for processing 2D geometries, conforming to the Open Geospatial Consortium's Simple Features Specification. It is a direct port of the Java Topology Suite (JTS), enabling complex geometric operations like buffering, intersection, and union in web and Node.js applications.
Developers building web mapping applications, GIS tools, or any software requiring advanced 2D geometric analysis and processing in JavaScript environments.
JSTS offers a comprehensive, standards-compliant geometry library with a proven API from JTS, eliminating the need for server-side geometric processing and enabling full client-side spatial analysis.
JavaScript Topology Suite
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Conforms to the OGC Simple Features Specification, ensuring interoperability with GIS systems and support for formats like WKT and GeoJSON, as highlighted in the README.
Works in browsers via ES5/ES6 builds and in Node.js as ES modules, making it suitable for both web mapping and server-side applications without Java dependencies.
Provides comprehensive spatial predicates and operations like buffering and union, directly ported from the battle-tested JTS library, enabling complex 2D analysis.
Preserves the JTS API, reducing the learning curve for developers familiar with JTS and offering a reliable, community-vetted interface for geometric operations.
Java overloading issues, such as in GeometryFactory.createMultiPoint, can cause unexpected behavior, and shortcut methods like .buffer are missing unless using the monkey-patched ES5 bundle.
TopologyExceptions may be thrown due to floating-point precision issues, requiring additional steps like GeometryPrecisionReducer and strict input validation, which adds setup complexity.
Using ES6 modules requires a bundler like Rollup for most environments, complicating setup compared to simple script tag inclusion, as noted in the README's caveats.