Skip to content

GeoFrame 0.3.2

Choose a tag to compare

@roger120981 roger120981 released this 26 Nov 23:09
· 12 commits to main since this release

Like earlier releases, it is distributed through the v0.3.2 git tag and GitHub release, not
through Hex yet; the release attaches precompiled NIFs for nine targets. A git dependency builds
the NIF from source (a stable Rust toolchain is required).

A patch release that fixes the two known issues listed with 0.3.1: rows holding an empty member
point, and get_coordinates on non-finite values. No public function changes its signature.

Fixed

  • get_coordinates returns NaN and infinite ordinates (:nan, :infinity, :neg_infinity)
    as Shapely does instead of raising ArgumentError: an infinite X, Y, Z or M, or a NaN X or Y,
    could not cross from the NIF.
  • to_wkt writes an empty member as EMPTY, as GEOS does. A MULTIPOINT with an empty member
    point (Shapely writes MULTIPOINT (EMPTY, (1 1)) to WKB as a NaN point) made to_wkt raise a
    NIF panic, and an empty member line of a MULTILINESTRING or an empty ring of a POLYGON was
    written as (), which no reader accepts. from_wkt now also reads MULTIPOINT (EMPTY, ...).
  • A MULTIPOINT or collection with an empty member point (as Shapely writes
    MULTIPOINT (EMPTY, (1 1)) to WKB) is no longer treated as missing. As in GEOS, the member
    takes no part in computations (is_empty is false, and bounds, centroid, the measures,
    predicates and constructive functions see the other members) but is still a member
    (count_geometries counts it, get_geometry and explode return it as POINT EMPTY, and the
    affine functions keep it). Before, is_empty was true and every measure null, and a
    GeoPackage written from such a row read back as null. Checked on 1 200 random rows against
    Shapely 2.2.

Known issues

  • A MULTIPOLYGON with an empty member polygon (MULTIPOLYGON (EMPTY, ((0 0, 1 0, 1 1, 0 0))),
    in WKT or WKB) cannot be stored and is rejected with a misleading message about mixed
    dimensions. Present since earlier releases.