Skip to content

Tracker for JTS implementation #1

Description

@willcohen

Current Status

This is a proof-of-concept wrapper providing basic JTS functionality compiled to WebAssembly. Many JTS features are not yet exposed through the JavaScript API.

What's available now:

  • Basic geometry operations (buffer, union, intersection, difference, convexHull)
  • Spatial predicates (contains, intersects, covers, equalsTopo, etc.)
  • STRtree spatial indexing
  • PreparedGeometry for optimized queries
  • WKT/WKB I/O with 2D/3D/4D support
  • LineMerger, CascadedPolygonUnion, OffsetCurveBuilder
  • Minimum bounding rectangles and circles

What's not available: The underlying WASM binary includes the full JTS 1.20.0 library, but most of it isn't exposed to JavaScript yet. Adding new functionality requires:

  • Creating Java wrapper methods in API.java
  • Exporting them to JavaScript using annotations
  • Handling Java-JavaScript type conversions

This isn't particularly difficult but it still isn't fully automatic.

Please use this issue to make requests for additional JTS functionality you'd like to see wrapped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions