simplefeatures v0.59.0 Release Notes

Release Date: 2026-03-27 // 3 months ago
    • ➕ Add geos.ClipByRect function that clips a geometry to an axis-aligned rectangle (defined by a geom.Envelope). This wraps the GEOS GEOSClipByRect operation, which is faster than computing a full Intersection with a rectangular polygon.

Previous changes from v0.58.0

  • 2026-02-15

    • ➕ Add PreparedGeometry type and Prepare function for efficient repeated spatial predicate evaluation. When a geometry is prepared, it caches spatial indices so that subsequent calls to Intersects, Contains, ContainsProperly, CoveredBy, Covers, Crosses, Disjoint, Overlaps, Touches, and Within against different test geometries are fast. The implementation is based on a port of JTS.

    • ➕ Add Buffer function that computes the buffer of a geometry at a given distance. Options are available for controlling quad segments, end cap style (round, flat, square), join style (round, mitre, bevel), single-sided mode, and simplify factor. The implementation is based on a port of JTS. This means that Buffer is now available natively in Go without need for the GEOS dependency.

    • 🔄 Change GeometryCollection.Dimension() to return -1 for empty geometry collections (previously returned 0). This change is consistent with GEOS.

    • 🛠 Fix overlay operations (Union, Intersection, Difference, SymmetricDifference) to return dimension-appropriate empty geometries. For example, the difference of two equal polygons now returns POLYGON EMPTY rather than GEOMETRYCOLLECTION EMPTY.

    • ⚡️ Optimize Intersection to return early when input envelopes are disjoint.

    • ⚡️ Optimize overlay operations (Intersection, Difference) for GeometryCollections by using R-Tree indexing to reduce O(M×N) to O(M log N) complexity.