Releases: peterstace/simplefeatures
v0.52.0
2024-10-08
Special thanks to Albert Teoh for contributing to this release.
-
Upgrades
golangci-lint
tov1.61.0
. -
Adds a new group of functions to the
geom
package that construct geometries. These functions have names in the formNew{Type}{Dimension}
, whereType
is one of {Point
,LineString
,Polygon
,MultiPoint
,MultiLineString
,MultiPolygon
}, andDimension
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 theNewSequence
function).
v0.51.0
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
tov1.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 theGEOSTopologyPreserveSimplify_r
function (exposed asTopologyPreserveSimplify
). -
Adds wrappers to the
geos
package for theGEOSCoverageSimplify_r
andGEOSCoverageSimplifyVW_r
functions (exposed asCoverageIsValid
andCoverageSimplifyVW
). -
Breaking change: Overhauls the TWKB unmarshalling related functions in a breaking way:
-
Removes the
UnmarshalTWKBWithHeaders
andUnmarshalTWKBBoundingBoxHeader
functions. -
Modifies the
UnmarshalTWKBEnvelope
function to return anExtendedEnvelope
(which is a regular XYEnvelope
with the addition of Z and M ranges). -
Adds
UnmarshalTWKBList
andUnmarshalTWKBSize
functions, which return the (optional) ID list and (optional) sizes of TWKBs without fully unmarshalling them.
-
v0.50.0
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
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
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
tov1.56.2
. -
Adds wrappers in the
geos
package for theGEOSConcaveHull_r
function (exposed asConcaveHull
).
v0.47.2
2024-04-15
- Adds support for the
sfnopkgconfig
build tag, which has an effect on the build process of thegithub.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 wherepkg-config
is not available or thegeos.pc
file is not installed. The majority of systems won't need to use thesfnopkgconfig
build tag.
v0.47.1
2024-03-08
Special thanks to Val Gridnev and Albert Teoh for contributing to this release.
- Uses
#cgo pkg-config
directives in thegithub.com/peterstace/geos
library, rather than manipulatingLDFLAGS
directly. This fixes an issue where the library could not be built on some Mac environments.
v0.47.0
2024-01-19
Special thanks to Albert Teoh for contributing to this release.
-
Adds new functions
RotatedMinimumAreaBoundingRectangle
andRotatedMinimumWidthBoundingRectangle
. 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
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 typeSequence
. -
Simplifies the internal representation of the
Envelope
type. -
Upgrades
golangci-lint
tov1.55.2
. -
Breaking change: Renames
Envelope
'sExtendToIncludeXY
method toExpandToIncludeXY
. This makes the names of theExpandToIncludeXY
andExpandToIncludeEnvelope
methods have consistent naming. -
Breaking change: Alters the signature (and behaviour) of the
NewEnvelope
function. It previously returned anEnvelope
and anerror
, and new just returns anEnvelope
. It no longer validates that its inputs don't contain NaN or +/- infinity (this can be checked via theValidate
method if desired). It also now accepts a variadic list ofXY
values, rather than a slice ofXY
values.
v0.45.1
2023-09-29
- Fixes a bug in
Envelope
'sTransformXY
method, where (depending on the transform) invariants in the newly createdEnvelope
value would be violated.