simplefeatures v0.34.0 Release Notes
-
2021-11-02
๐ Special thanks to Albert Teoh for contributing to this release.
๐ฅ Breaking change: Renames the
AsFoo
methods of the Geometry type toMustAsFoo
(whereFoo
is a concrete geometry type such asPoint
). 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 anyAsFoo
methods they are calling toMustAsFoo
.๐ฅ Breaking change: Adds new methods named
AsFoo
to the Geometry type. These methods have the signatureAsFoo() (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 theIs
andAs
call only specified once. Users now just have to callAsFoo
, and can then check the flag. This helps to eliminate the class of bugs there the type specified withIsFoo
erroneously differs from the type specified byAsFoo
.