Repository navigation
GeoFrame 0.3.0
Like earlier releases, it is distributed through the v0.3.0 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).
This release closes the GEOS and GDAL parity gaps left from 0.2.0. GeoFrame now reads curved
geometries and collections whose members mix dimensions, and follows GEOS for single-sided
polygon buffers and simplify's repair. No public function changes its signature. The results that change are
listed under Changed and Fixed.
Added
- Curved geometries are read linearized, as GDAL reads them:
CircularString,CompoundCurve,
CurvePolygon,MultiCurveandMultiSurface(ISO WKB, PostGIS EWKB and GeoPackage
binary, with Z, M or both, either byte order) becomeLineString,Polygon,
MultiLineStringandMultiPolygon. GDAL 3.12's arc stroking is ported (4° steps,
OGR_ARC_STEPSIZEhonoured, full circles and collinear arcs), so vertices match pyogrio bit
for bit on 30 fixture cases and within 3e-12 on 26 000 fuzzed arcs. It covers GeoPackage
(read_fileandstream_file),read_postgis,GeoSeries.from_wkband GeoParquet / Feather
WKB columns, andread_file_info/list_layersreport the linear type. Before, one curve
row aborted the whole read. WKT curves are still an error. - A
GEOMETRYCOLLECTIONwhose members have different dimensions (a 2D point next to a Z point)
is read as GEOS reads it instead of raising. The collection has Z when any member has Z and M
when any has M, whatever the WKB header says. A GeoArrow collection holds one dimension, so
the members are promoted withNaNfor the ordinates they lack, which is what Shapely's
get_coordinatesreports.has_z,has_m,z,mandforce_2dagree with GeoPandas,
but the promoted member's WKT and WKB carryZ NaN. In WKT, a member of another dimension
inside a collection taggedZ,MorZMis still an error, as in GEOS.
Changed
buffer(single_sided: true)on polygons follows GEOS. The polygon gets the ordinary buffer,
the input and buffer boundaries are noded, and the largest face is kept when there is more
than one. For a square of sides, a positive distancednow returns the polygon itself
froms/d ≈ 4.68, and a negative one returns the ordinary negative buffer from about 6.83;
the old guide of "about four times the distance" was wrong. 2 700 fuzzed cases agree with
Shapely within 2 % area. Lines and points are unchanged.simplify(preserve_topology: false)repairs an invalid Douglas-Peucker result with GEOS's
buffer(0), ported to Rust (DPTransformer::createValidArea: per polygon, once per
multipolygon). A self-crossing ring keeps its positive-winding lobes, and overlapping or
edge-touching parts dissolve. Results match Shapely vertex for vertex, including ring start,
direction and part order: 15 475 fuzzed repairs, the 50 European countries of the tour at 2, 5
and 20 km, and 242 countries at 50 km. Valid results are untouched.- On a polygon with Z, the vertices that repair adds take GEOS's Z instead of
NaN. A new
crossing node gets the mean of the Z interpolated along its two segments, and aNaNZ lying
on another ring is interpolated along it. 1 390 of 1 504 fuzzed repairs agree on every Z; the
rest are points where three or more rings meet.
Fixed
dissolve(observed: false)takes each key's levels from its own values. It used
Explorer.Series.categories/1, which in Explorer 0.13 returns every string categorized
anywhere in the process, so unrelated categories (and, under concurrency, values from other
frames) could appear as groups. Unobserved combinations of several keys are still added, as
pandas does.
Documentation
set_precisionon an invalid multipolygon keeps its merged, valid result invalid_output
andkeep_collapsedwhere GEOS raisesTopologyException(about half of random invalid
multipolygons). This is a decision, pinned by a test.- The reference suite has 19 118 cases: 18 393 agree with GeoPandas / Shapely, 725 are
documented deviations and none is unexplained (0.2.0: 18 379 agree, 739 documented).