Simplefeatures Versions Save

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification

v0.50.0

3 weeks ago

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

1 month ago

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

1 month ago

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

1 month ago

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

1 month ago

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

4 months ago

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

6 months ago

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

8 months ago

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.

v0.45.0

8 months ago

2023-09-29

Special thanks to Albert Teoh for contributing to this release.

This release contains a large number of breaking changes, primarily surrounding geometry validation. See https://github.com/peterstace/simplefeatures/discussions/525 for background and an overview of the changes.

  • Breaking change: The geom.ConstructorOption type has been removed. Previous uses of geom.DisableAllValidations can be replaced with geom.NoValidate. Previous uses of OmitInvalid should be managed manually (no replacement for this functionality is provided).

  • A Validate() error method is added to Geometry and each concrete geometry type. This allows geometry constraints to be checked after geometry construction.

  • Breaking change: Geometry results from GEOS (wrapped by the github.com/peterstace/simplefeatures/geos package) are no longer validated. The variadic constructor options in function signatures have been removed. If users wish to validate these results, then Validate() can be called manually.

  • Breaking change: The TransformXY methods no longer validate geometry constraints of the result. The variadic constructor options have been removed as method parameters, as have the error returns. If users wish to validate these results, then Validate() can be called manually.

  • Breaking change: The direct geometry constructors (NewPoint, NewLineString, NewPolygon, NewMultiPoint, NewMultiLineString, NewPolygon, and NewGeometryCollectiion) no longer perform any geometry validation. They no longer accept constructor options or return an error, resulting in a function signature change. If users wish to validate the results, then Validate() can be called manually.

  • Breaking change: XY's AsPoint method no longer checks the validity of the result and no longer returns an error. An AsPoint method is added to the Coordinates type to shadow XY's AsPoint method (since XY is embedded in Coordinates).

v0.44.0

8 months ago

2023-06-23

Special thanks to Albert Teoh for contributing to this release.

  • Breaking change: Removes the Insert and Delete methods from the RTree type in the rtree package. Users relying on the Insert and Delete methods are advised to restructure their programs not to rely on them, or use alternative r-tree implementations, such as the github.com/tidwall/rtree package.

  • Performs a minor non-user-facing cleanup in the rtree package.

  • R-tree performance improvements that moderately reduce the amount of memory and slightly reduce the amount of CPU that they use.

  • Exposes an AsBox() rtree.Box method on the geom.Envelope type, that converts the envelope to an rtree.Box.

  • Adds a String() string method to the geom.Envelope type.