All Versions
56
Latest Version
Avg Release Cycle
65 days
Latest Release
70 days ago

Changelog History
Page 3

  • v0.33.0 Changes

    2021-10-11

    ๐Ÿš€ Special thanks to Albert Teoh for contributing to this release.

    • ๐Ÿ’ฅ Breaking change: The Envelope type can now be an empty envelope. Previously, it was only able to represent a rectangle with some area, a horizontal or vertical line, or a single point. Its AsGeometry returns an empty GeometryCollection in the case where it's empty. The result of AsGeometry is unchanged for non-empty envelopes.

    • ๐Ÿ’ฅ Breaking change: The NewEnvelope function signature has changed. It now accepts a slice of geom.XY as the sole argument. The behaviour of the function is the same as before, except that if no XY values are provided then an empty envelope is returned without error.

    • ๐Ÿ’ฅ Breaking change: The Envelope type's EnvelopeFromGeoms method has been removed. To replicate the behaviour of this method, users can construct a GeometryCollection and call its Envelope method.

    • ๐Ÿ’ฅ Breaking change: The Envelope type's Min, Max, and Center methods now return Points rather than XYs. When the envelope is empty, Min, Max, and Center return empty points.

    • ๐Ÿ’ฅ Breaking change: The Envelope type's Distance method now returns (float64, bool) rather than float64. The returned boolean is only true if the distance between the two envelopes is defined (i.e. when they are both non-empty).

    • ๐Ÿ’ฅ Breaking change: The Envelope method on the Geometry, GeometryCollection, Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon types now return Envelope instead of (Envelope, bool). The empty vs non-empty status is encoded inside the envelope instead of via an explicit boolean.

    • The Envelope type now has IsEmpty, IsPoint, IsLine, and IsRectanagle methods. These correspond to the 4 possible envelope categories.

  • v0.32.0 Changes

    2021-09-08

    ๐Ÿš€ Special thanks to Albert Teoh for contributing to this release.

    • ๐Ÿ’ฅ Breaking change: Consolidates MultiPoint constructors and simplifies MultiPoint internal representation. Removes the BitSet type, previously used for MultiPoint construction. Removes the NewMultiPointFromPoints and NewMultiPointWithEmptyMask functions. Modifies the NewMultiPoint function to accept a slice of Points rather than a Sequence.

    • ๐Ÿ’ฅ Breaking change: Consolidates Point construction. Removes the NewPointFromXY function. It is replaced by a new AsPoint method on the XY type.

    • ๐Ÿ”จ Refactors internal test helpers.

    • โž• Adds linting to CI using golangci-lint.

    • ๐Ÿ’ฅ Breaking change: Renames geometry constructors for consistency. NewPolygonFromRings is renamed to NewPolygon. NewMultiLineStringFromLineStrings is renamed to NewMultiLineString. NewMultiPolygonFromPolygons is renamed to NewMultiPolygon.

    • ๐Ÿ’ฅ Breaking change: Adds checks for anomalous float64 values (NaN and +/- infinity) during geometry construction.

      • The NewPoint function now returns (Point, error) rather than Point. The returned error is non-nil when the inputs contain anomalous values.
      • The NewLineString function's signature doesn't change, but now returns a non-nil error if the input Sequence contains anomalous values.
      • The OmitInvalid constructor option now has implications when constructing Point and MultiPoint types.
      • The NewEnvelope function now returns (Envelope, error) rather than Envelope. The returned error is non-nil when when the input XYs contain anomalous values.
      • The Envelope type's ExtendToIncludePoint method is renamed to ExtendToIncludeXY (better matching its argument type). It now returns (Envelope, erorr) rather than Envelope. The returned error is non-nil if the inputs contain any anomalous values.
      • The Envelope type's ExpandBy method is removed due to its limited utility and complex interactions with anomalous values.
  • v0.31.0 Changes

    2021-08-09

    ๐Ÿš€ Special thanks to Albert Teoh for contributing to this release.

    • ๐Ÿ›  Fixes some minor linting (and other similar) issues identified by Go Report Card.

    • โž• Adds a new DumpCoordinates method to geometry types. This method returns a Sequence containing all of the control points that define the geometry.

    • โž• Adds a new Summary method to all geometry types. This method gives a short and human readable summary of geometry values. The summary includes the geometry type, coordinates type, and component cardinalities where appropriate (e.g. number of rings in a polygon).

    • โž• Adds a new String method to all geometry types, implementing the fmt.Stringer interface. The method returns the same string as that returned by the Summary method.

    • โž• Adds a new NumRings method to the Polygon type. This method gives the total number of rings that make the polygon.

  • v0.30.0 Changes

    2021-07-18

    • โž• Adds Dump methods to Geometry, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection types. These methods break down composite geometries into their constituent non-multi type parts (i.e. Points, LineStrings, and Polygons) and return them as a slice.

    • ๐Ÿ›  Fixes a bug in the BitSet data structure. This data structure is used to specify which Points within a MultiPoint are empty during manual construction.

  • v0.29.0 Changes

    2021-07-04

    • Modifies error string formatting to be more consistent. Errors should treated opaquely by users, so this change is only cosmetic.

    • โœ… Modifies the GEOS wrapper functions for testing spatial relationships between geometries to use direct pass through to their GEOS equivalents. These functions are Equals, Disjoint, Touches, Contains, Covers, Intersects, Within, CoveredBy, Crosses, and Overlaps (all in the geos package). Previously, these functions passed through to GEOSRelatePattern_r (which calculates a DE-9IM Intersection Matrix), and the intersection relationship was calculated in Go afterwards. Using a more direct passthrough allows the GEOS library to make better optimisations in same case.

  • v0.28.1 Changes

    2021-05-14

    • Modifies the Simplify function to use an iterative rather than recursive approach. This prevents crashes for complex geometries.
  • v0.28.0 Changes

    2021-05-14

    • Reimplements the ConvexHull operation using a more robust and numerically stable algorithm. The new algorithm is the Monotone Chain algorithm (also known as Andrew's Algorithm).

    • โž• Adds a new Simplify function that simplifies geometries using the Ramer Douglas Peucker algorithm.

  • v0.27.0 Changes

    2021-04-11

    • ๐Ÿ’… Changes the Boundary method to use GEOS style behaviour rather than PostGIS style behaviour for empty geometries. This means that Boundary now always returns a consistent geometry type.

    • โž• Adds back the RTree Insert and Delete methods. These were previously removed in v0.25.1.

    • โž• Adds Scan methods to each concrete geometry type, so that that they implement the database/sql.Scanner interface.

  • v0.26.0 Changes

    2021-02-19

    • โž• Adds a Relate top level function, which calculates the DE-9IM matrix describing the relationship between two geometries.

    • โž• Adds named spatial predicate top level functions, implemented in terms of DE-9IM matches. These are Equals, Intersects, Disjoint, Contains, CoveredBy, Covers, Overlaps, Touches, Within, and Crosses.

  • v0.25.1 Changes

    2021-01-31

    • ๐Ÿ›  Fixes a noding bug in DCEL operations (Intersection, Union, Difference, and SymmetricDifference) that occasionally caused a panic.

    • ๐Ÿ”„ Changes the strategy for joining together geometries in DCEL operations using "ghost lines". Geometries were previously joining using a naive radial line approach, but are now joining using a euclidean minimum spanning tree. This greatly reduces the number of additional crossing control points introduced by DCEL operations.