simplefeatures v0.33.0 Release Notes
-
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. ItsAsGeometry
returns an emptyGeometryCollection
in the case where it's empty. The result ofAsGeometry
is unchanged for non-empty envelopes.๐ฅ Breaking change: The
NewEnvelope
function signature has changed. It now accepts a slice ofgeom.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'sEnvelopeFromGeoms
method has been removed. To replicate the behaviour of this method, users can construct aGeometryCollection
and call itsEnvelope
method.๐ฅ Breaking change: The
Envelope
type'sMin
,Max
, andCenter
methods now returnPoint
s rather thanXY
s. When the envelope is empty,Min
,Max
, andCenter
return empty points.๐ฅ Breaking change: The
Envelope
type'sDistance
method now returns(float64, bool)
rather thanfloat64
. 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 theGeometry
,GeometryCollection
,Point
,LineString
,Polygon
,MultiPoint
,MultiLineString
, andMultiPolygon
types now returnEnvelope
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 hasIsEmpty
,IsPoint
,IsLine
, andIsRectanagle
methods. These correspond to the 4 possible envelope categories.