Skip to content

Releases: peterstace/simplefeatures

v0.52.0

07 Oct 18:16
Compare
Choose a tag to compare

2024-10-08

Special thanks to Albert Teoh for contributing to this release.

  • Upgrades golangci-lint to v1.61.0.

  • Adds a new group of functions to the geom package that construct geometries. These functions have names in the form New{Type}{Dimension}, where Type is one of {Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon}, and Dimension is one of {XY, XYZ, XYM, XYZM}. They accept coordinates at the appropriate level of nesting that corresponds to the geometry type. These functions panic if the number of coordinates provided is not consistent with the dimension (this behaviour is consistent with the behaviour of the NewSequence function).

v0.51.0

18 Aug 19:39
Compare
Choose a tag to compare

2024-08-19

Special thanks to Albert Teoh for contributing to this release.

  • Fixes a Polygon validation bug that falsely identified an invalid ring as being valid. The bug occurred in the rare edge case where an inner ring is outside the outer ring and the first control point of the inner ring touches the outer ring.

  • Upgrades golangci-lint to v1.59.1.

  • Fixes a bug where geometry collections with mixed coordinate types were erroneously allowed during WKT and WKB parsing.

  • Fixes a bug where the Simplify method would drop coordinate type to XY in some scenarios where the result is an empty geometry.

  • Adds a wrapper to the geos package for the GEOSTopologyPreserveSimplify_r function (exposed as TopologyPreserveSimplify).

  • Adds wrappers to the geos package for the GEOSCoverageSimplify_r and GEOSCoverageSimplifyVW_r functions (exposed as CoverageIsValid and CoverageSimplifyVW).

  • Breaking change: Overhauls the TWKB unmarshalling related functions in a breaking way:

    • Removes the UnmarshalTWKBWithHeaders and UnmarshalTWKBBoundingBoxHeader functions.

    • Modifies the UnmarshalTWKBEnvelope function to return an ExtendedEnvelope (which is a regular XY Envelope with the addition of Z and M ranges).

    • Adds UnmarshalTWKBList and UnmarshalTWKBSize functions, which return the (optional) ID list and (optional) sizes of TWKBs without fully unmarshalling them.

v0.50.0

07 May 00:52
Compare
Choose a tag to compare

2024-05-07

Special thanks to Val Gridnev for contributing to this release.

  • Adds "foreign member" support for GeoJSON features. This allows for additional properties to be included in GeoJSON features that are not part of the standard GeoJSON specification.

v0.49.0

18 Apr 19:37
Compare
Choose a tag to compare

2024-04-19

Special thanks to Daniel Cohen for contributing to this release.

  • Fixes two bugs in TWKB marshalling and unmarshalling. The first bugfix correctly rounds coordinates (rather than truncating them) and the second bugfix fixes a numerical stability issue when calculating the scale factor.

v0.48.0

14 Apr 19:41
Compare
Choose a tag to compare

2024-04-15

Special thanks to Val Gridnev and Albert Teoh for contributing to this release.

  • Adds new Densify methods on each concrete geometry types that add additional linearly interpolated control points such that the distance between any two consecutive control points is at most a fixed distance. This can be useful when transforming geometries from one projection to another.

  • Adds a new method SnapToGrid to each concrete geometry type. The method returns a copy of the geometry with its control points snapped to a base 10 grid.

  • Make LERP operations robust in all edge cases.

  • Upgrades golangci-lint to v1.56.2.

  • Adds wrappers in the geos package for the GEOSConcaveHull_r function (exposed as ConcaveHull).

v0.47.2

14 Apr 19:02
Compare
Choose a tag to compare

2024-04-15

  • Adds support for the sfnopkgconfig build tag, which has an effect on the build process of the github.com/peterstace/geos package. It causes the #cgo pkg-config directive to be replaced with the #cgo LDFLAGS: -lgeos_c directive (which was the previous behaviour, before v0.47.1). This is useful in environments where pkg-config is not available or the geos.pc file is not installed. The majority of systems won't need to use the sfnopkgconfig build tag.

v0.47.1

14 Apr 18:59
Compare
Choose a tag to compare

2024-03-08

Special thanks to Val Gridnev and Albert Teoh for contributing to this release.

  • Uses #cgo pkg-config directives in the github.com/peterstace/geos library, rather than manipulating LDFLAGS directly. This fixes an issue where the library could not be built on some Mac environments.

v0.47.0

18 Jan 21:48
Compare
Choose a tag to compare

2024-01-19

Special thanks to Albert Teoh for contributing to this release.

  • Adds new functions RotatedMinimumAreaBoundingRectangle and RotatedMinimumWidthBoundingRectangle. These functions calculate the non-axis-aligned (rotated) bounding rectangles for geometries, minimising either the area or width.

  • Eliminates some redundant benchmarks, improving the execution speed of the benchmark suite.

  • Unify the GEOS wrappers used for the github.com/peterstace/simplefeatures/geos package and the package used for reference implementation tests.

v0.46.0

24 Nov 04:00
Compare
Choose a tag to compare

2023-11-24

Special thanks to Albert Teoh for contributing to this release.

  • Fixes two DCEL renoding bugs. The first affected some inputs that had overlapping line segments. The second affected some inputs that caused the location of line vs. line intersections to differ on which input was being renoded.

  • Adds a method with signature Envelope() Envelope to type Sequence.

  • Simplifies the internal representation of the Envelope type.

  • Upgrades golangci-lint to v1.55.2.

  • Breaking change: Renames Envelope's ExtendToIncludeXY method to ExpandToIncludeXY. This makes the names of the ExpandToIncludeXY and ExpandToIncludeEnvelope methods have consistent naming.

  • Breaking change: Alters the signature (and behaviour) of the NewEnvelope function. It previously returned an Envelope and an error, and new just returns an Envelope. It no longer validates that its inputs don't contain NaN or +/- infinity (this can be checked via the Validate method if desired). It also now accepts a variadic list of XY values, rather than a slice of XY values.

v0.45.1

29 Sep 05:46
b7ef97b
Compare
Choose a tag to compare

2023-09-29

  • Fixes a bug in Envelope's TransformXY method, where (depending on the transform) invariants in the newly created Envelope value would be violated.