All Versions
44
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v0.40.0 Changes

    2022-09-28

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

    • ๐Ÿ›  Fix a bug where the original coordinates type was not retained when using the OmitInvalid constructor option on invalid LineStrings and Polygons.

    • ๐Ÿ‘Œ Improves the performance of WKB parsing.

    • โž• Add a TransformXY method to the Envelope type.

  • v0.39.0 Changes

    2022-06-10

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

    • โž• Add support for GeometryCollections in Union, Intersection, Difference, SymmetricDifference, and Relate.
  • v0.38.0 Changes

    2022-05-27

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

    • โž• Add initial linear referencing methods to LineString. The initial methods are InterpolatePoint and InterpolateEvenlySpacedPoints.

    • ๐Ÿ›  Fixes a bug in the TransformXY method where empty MultiPoint and MultiLineStrings would have their coordinates type downgraded to XY.

    • โž• Add a new DumpRings method to the Polygon type, which gives the rings of the polygon as a slice of LineStrings.

    • ๐Ÿ‘‰ Uses unsafe.Slice for internal WKB conversions. This increases the minimum Go version required to use simplefeatures from 1.14 to 1.17.

  • v0.37.0 Changes

    2022-03-29

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

    • ๐Ÿ‘Œ Improves performance of ForceCW and ForceCCW methods by eliminating unneeded memory allocations.

    • โž• Adds full support for TWKB (Tiny Well Known Binary) as a serialisation format.

    • ๐Ÿ›  Fixes a vet warning affecting Go 1.18 relating to printf verbs in tests.

    • ๐Ÿ›  Fixes a bug in ExactEquals that incorrectly compares empty points of unequal coordinate type as being equal.

  • v0.36.0 Changes

    2022-01-24

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

    • Eliminates redundant calls to the optional user supplied transform func during area calculations.

    • โž• Adds IsCW and IsCCW methods, which check if geometries have consistent clockwise or counterclockwise winding orientation.

  • v0.35.0 Changes

    2021-11-23

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

    • ๐Ÿ›  Fixes spelling of "Marshaller" when referring to the interface defined in the encoding/json package.

    • โž• Adds UnmarshalJSON methods to each concrete geometry type (GeometryCollection, Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon). This causes these types to implement the encoding/json.Unmarshaler interface. GeoJSON can now be unmarshalled directly into a concrete geometry type.

    • ๐Ÿ‘‰ Uses the %w verb for wrapping errors internally. Note that simplefeatures does not yet currently expose any sentinel errors or error types.

    • ๐Ÿ’ฅ Breaking change: Changes the Simplify package level function to become a method on the Geometry type. Users upgrading can just change function invocations that look like simp, err := geom.Simplify(g, tolerance) to method invocations that look like simp, err := g.Simplify(tolerance).

    • โž• Adds Simplify methods to the concrete geometry types LineString, MultiLineString, Polygon, MultiPolygon, and GeometryCollection. These methods may be used if one of these concrete geometries is to be simplified, rather than converting to a Geometry, calling Simplify, then converting back to the concrete geometry type.

    • ๐Ÿ›  Fixes a bug in Simplify where invalid interior rings would be omitted rather than producing an error.

    • โž• Adds a wrapper in the geos package for the GEOSMakeValid_r function (exposed as MakeValid).

  • v0.34.0 Changes

    2021-11-02

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

    • ๐Ÿ’ฅ Breaking change: Renames the AsFoo methods of the Geometry type to MustAsFoo (where Foo is a concrete geometry type such as Point). This follows the go convention that methods and functions prefixed with Must may panic if preconditions are not met. Note that there's no change in behaviour here, it's simply a rename (these methods previously panicked). Users may resolve this breaking change by just updating the names of any AsFoo methods they are calling to MustAsFoo.

    • ๐Ÿ’ฅ Breaking change: Adds new methods named AsFoo to the Geometry type. These methods have the signature AsFoo() (Foo, bool). The boolean return value indicates if the conversion was successful or not. These methods are useful because they allow concrete geometries to be extracted from a Geometry value, with the concrete type for the Is and As call only specified once. Users now just have to call AsFoo, and can then check the flag. This helps to eliminate the class of bugs there the type specified with IsFoo erroneously differs from the type specified by AsFoo.

  • v0.33.1 Changes

    2021-10-14

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

    • โž• Adds a new method MinMaxXYs (XY, XY, bool) to the Envelope type. The first two return values are the minimum and maximum XY values in the envelope, and the third return value indicates whether or not the first two are defined (they are only defined for non-empty envelopes).
  • 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.