Skip to content

GeoFrame 0.3.1

Choose a tag to compare

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

Like earlier releases, it is distributed through the v0.3.1 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: WKT is read as GEOS reads it in two more cases. Text that 0.3.0 read is read the
same way, and no public function changes.

Fixed

  • WKT without a Z, M or ZM tag whose coordinates have three or four ordinates is read as
    GEOS reads it instead of raising: POINT (1 2 3) is POINT Z (1 2 3) and four ordinates are
    ZM (never M). The first coordinate sets the dimension, and every other coordinate of that
    geometry must match it, as in GEOS. A collection member infers its own dimension
    (GEOMETRYCOLLECTION Z (POINT (1 2 3)) is valid; GEOMETRYCOLLECTION M (POINT (1 2 3))
    raises "cannot mix dimensionality"). This applies to GeoSeries.from_wkt and to WKT geometry
    columns in GeoParquet, Feather and Arrow. Text that was read before is read the same way. On
    12 000 random WKT texts, accepted and rejected inputs match Shapely 2.2, and so do the
    coordinates, except for one GEOS quirk: MULTIPOINT (1 2 3 4, 5 6 7 8) (no inner
    parentheses) is ZM here, while GEOS drops its M.
  • WKT ordinates NaN, inf and Infinity (any case, optional sign) are read as GEOS reads
    them instead of raising, so the WKT that to_wkt writes for a collection whose members mix
    dimensions (GEOMETRYCOLLECTION Z(POINT Z(1 2 NaN),...), since 0.3.0) reads back, and Shapely's
    Infinity is understood. POINT (NaN NaN) reads as POINT EMPTY, the GeoArrow empty point.

Known issues

  • A MULTIPOINT with an empty member point, which Shapely writes to WKB as a NaN NaN point
    (MULTIPOINT (EMPTY, (1 1))), reads with is_empty true for the whole row, and to_wkt of it
    raises (:nif_panicked). Present since earlier releases; tracked for a later release.
  • get_coordinates raises ArgumentError on an infinite ordinate. Present since earlier releases.