GeoPandas / GeoPolars (dev) / GeoFrame parity matrix

Copy Markdown View Source

Sources: GeoPandas stable API reference (geoseries, geodataframe, io, tools, sindex, testing pages all fetched OK; the reference index page was not needed). GeoPolars dev snapshot (docs/Roadmap.md, docs/Tier per expression.md, geopolars/geopolars/geo/*.py, expr/geo.py). GeoFrame = main (lib/**, native/geoframe_core).

Legend: โœ… done | ๐ŸŸก partial | โŒ missing | โ›” out of scope. GeoPolars column: yes = exposed in the Python API on dev; no/roadmap = absent (the Roadmap lists binary predicates, set ops, interpolate/project, line joining etc. as unchecked). GeoFrame names are GeoFrame.GeoSeries.* unless noted. GeoFrame backend today: geo 0.33, geoarrow-* 0.9, geoparquet 0.9, proj4rs, flatgeobuf, geozero, shapefile 0.9, rusqlite 0.40 with bundled SQLite (the only C code, compiled by cc), zip, geo-buf-style buffer. See native/geoframe_core/Cargo.toml for the exact versions. Note: GeoFrame has no GeoDataFrame-level delegation of GeoSeries methods other than area/length/bounds/centroid (users call GeoSeries on gdf.geometry); this is counted as โœ… for the series member and noted once in section 12.

Reference testing

Since batch V every operation GeoFrame shares with GeoPandas is checked against the real library: test/reference/generate.py (dev-only; GeoPandas 1.2.0, Shapely 2.2.0, GEOS 3.14.1, pyproj 3.8.0) computes the results for a fixed corpus and commits them as JSON in test/reference/fixtures/; test/geo_frame/reference_test.exs compares GeoFrame with them in CI without Python (19 118 cases across 114 operations, including sjoin, sjoinnearest, dissolve and unionall on small frames and, since batch B, overlay (all five hows, with and without keep_geom_type, on polygon, line and point frames), clip, clip_by_rect, explode and intersection_all; since batch E also concave hull, bounding shapes, inscribed circle, Delaunay, constrained Delaunay, Voronoi and make_grid; since batch I1 also is_simple, normalize, set_precision, get_precision, to_json and `__geo_interface; since batch I2 alsooffset_curve,snap,shared_paths,minimum_clearance,minimum_clearance_line,polygonizeandbuild_area; since batch I3 alsois_valid_coverage,invalid_coverage_edgesandsimplify_coverage; since Z1 alsohas_z,has_m,z,m,force_2d,force_3dand Z/M WKB and WKT; since Z2 the Z/M behaviour of the affine functions,to_crs,reverse,normalize,boundary,exterior,get_geometry,simplify,set_precisionandsnap; Z5 addsget_coordinates(include_z:, include_m:)andfrom_xy(z:)in the standalonezm_coords.json). 18 393 cases agree, 725 are documented deviations (most of them the null/empty class) and none is unexplained (REFERENCE_REPORT=1 mix test test/geo_frame/reference_test.exsprints the table per operation). Since batch G1 the I/O fixtures are separate: 23 small Feather, GeoParquet and Arrow IPC files written by GeoPandas 1.2 / pyarrow 26 (test/reference/fixtures/io/, generated bygenerate_io.py) are read in CI bytest/geo_frame/parity_g1_test.exs, andscripts/crosscheck_io.sh(dev-only) checks the opposite direction: 100 files written by GeoFrame (every format, including Z, M and ZM files checked with their ordinates, null geometries and multi-geometry GeoParquet, Feather and Arrow files) read correctly in GeoPandas, and 23 Z/M files (test/reference/fixtures/io/zm/) are read in CI bytest/geo_frame/zm_io_test.exs. Known differences are listed intest/reference/known_deviations.exsand the suite asserts that each one still deviates. Seetest/reference/README.md` for the tolerances and how to regenerate. Documented deviations:

  • Null and empty inputs. GeoFrame returns nil where GeoPandas returns False, 0, NaN or an empty geometry (area, predicates, centroid, envelope, bounds, ...); count_geometries of an empty atomic geometry is 0 (Shapely: 1). POINT EMPTY cannot be stored in geo types.
  • Non-finite results. A measure that overflows or is undefined (area, length, distance, hausdorff_distance, frechet_distance, project, bounds, total_bounds, x, y, z, m, geodesic and minimum-bounding measures) is :infinity, :neg_infinity or :nan in the Explorer f64 series, as GeoPandas gives inf/nan (issue #60); the NIF used to raise ArgumentError there. Overflow inside a distance gives :infinity as GEOS does. GeoFrame can differ where GEOS overflows an intermediate (a 1e200 square: length is finite here, inf in GEOS).
  • Invalid input. Predicates and relate on a self-intersecting bowtie polygon follow geo's relate and differ from GEOS in a few pairs. Valid inputs agree in every case.
  • Zero-area polygons and degenerate lines. A polygon ring whose vertices are all collinear is invalid, as in GEOS, and make_valid collapses it to its linework (MULTILINESTRING noded at every vertex, a LINESTRING for two distinct points, a POINT for one; a collapsed hole is dropped and kept as a line beside the polygon, other polygons of a multipolygon stay, as a GEOMETRYCOLLECTION). Not repaired, and left unchanged: a collapsed shell that has holes (GEOS builds a polygon from the holes), and a geometry collection holding such a polygon. Lines that overlap across parts are not merged. is_ring is false for the two-point closed line LINESTRING (1 1, 1 1); is_valid_reason gives GEOS' text and coordinate (see its row for the classes whose coordinate can differ).
  • envelope of a horizontal/vertical line. GeoFrame returns a line; GEOS 3.14 returns a zero-area polygon with repeated vertices.
  • buffer mitre/bevel joins on the acute corner of a closed line differ between geo-buf and GEOS; round caps and joins, flat and square caps on open lines agree (area within 2 %).
  • line_merge of a polygon gives an empty collection (GEOS merges its boundary).
  • Set operations. Every point/line/polygon combination agrees with GEOS (batch B removed the 302 series deviations and the mixed-family dissolve one). Remaining: GeometryCollection input gives nil for union, difference and symmetric_difference (storage flattens nested collections). Results agree within 1e-6, not bit-exactly: geo's boolean operations snap intersection points to an integer grid (about 1e-8 of the extent).
  • Batch E. Sixteen documented cases, all on degenerate or tied input: the concave hull of the symmetric e_ring point set (equal edge lengths erode in another order); minimum_rotated_rectangle of triangles and symmetric shapes (several equal-area minimal rectangles); minimum_bounding_circle of LINESTRING (1 1, 1 1) (GEOS: POLYGON EMPTY); maximum_inscribed_circle of an invalid bowtie; vertex snapping with a tolerance on clustered input (GEOS snaps against the endpoints of the triangle edge a new vertex lands on, GeoFrame against every kept vertex in lexicographic order); Voronoi sides of near-cocircular rounded points. Triangle sets are compared exactly, falling back to "same count, same union" because cocircular points have several valid triangulations; maximum_inscribed_circle is a search, so its radius is compared within the tolerance.
  • Batch I1. set_precision on an invalid multipolygon (parts that overlap or lie inside each other): GEOS's overlay noder decides from edge contact after snapping (a part whose edges meet no other part's is kept, even in an invalid result; parts whose edges coincide are merged; parts whose edges cross make GEOS raise a TopologyException, "side location conflict"), GeoFrame merges parts that overlap after snapping and never raises (six documented cases; valid input agrees, including the half-up rounding of negative numbers). to_json compares as decoded JSON (key order and spacing are not compared); a null or empty geometry has "bbox": null in both.
  • Batch I2. Fifty-eight documented cases on the new operations, all on awkward input. offset_curve (35): the outer side of a closed LineString with a bevel or mitre join (GEOS keeps the closing bevel or drops the two pieces next to the start because it reads the curve off the buffer outline, whose round caps meet there; 24 cases), a polygon ring that is offset exactly onto the medial axis (2), and mitre or bevel joins around segments shorter than the distance, where GEOS cuts against the bevel-shaped buffer and GeoFrame against the disc around each vertex (9). The curve is compared by length and Hausdorff distance (within 1e-6); vertices GEOS adds by simplifying its input are not reproduced. snap (21): several snap points competing for one vertex or segment, where the order GEOS applies them in is undocumented (the port agrees in about 99 % of random cases). polygonize and build_area (1 each): lon/lat input whose overlapping polygons are merged with geo's overlay, which snaps to a grid of about 1e-9 degrees. shared_paths, minimum_clearance and minimum_clearance_line agree everywhere except the null/empty class; the clearance line compares equal when only an equally close pair differs.
  • Batch I3. Three documented cases and a handful of intended differences. invalid_coverage_edges over a series with a null row (3 cases): GeoPandas 1.2 drops the null geometry before calling GEOS and pads the result with NaN at the end, so every result after the null moves up one row; GeoFrame keeps each result in its row and gives nil for the null one. Where Shapely raises (simplify_coverage over a null or a non-polygon row) GeoFrame returns nil for that row and simplifies the rest; is_valid_coverage and invalid_coverage_edges ignore non-polygons as Shapely does. A non-finite gap_width or tolerance is an ArgumentError (Shapely accepts NaN and inf silently), a row with a NaN or infinite coordinate is nil, and the work is capped (see Resource limits). simplify_coverage and the validators were reconstructed from the published GEOS/JTS behaviour and then fitted to Shapely by black-box fuzzing (the gap_width rule, the vertex-in-neighbour test, the way a ring is rebuilt from its edges: the first edge as stored, so a ring may start at another node and come out reversed): 8,900 random validator cases, 10,800 random coverages, 280 hand-built ones and 12,402 overlapping inputs agree vertex for vertex, as do the 805 committed fixture cases. Structures the generators do not make (for instance one free ring shared by three levels of nesting) are untested.
  • Tolerances. to_crs against PROJ: within 1e-6 projected units (1e-9 degrees back), including the Florida East (ftUS) transverse Mercator. Geodesic area, length and point distance: within 1e-6 of pyproj.Geod.

Fixed thanks to the suite: distance/dwithin returned 0.0/true (or f64::MAX for an empty collection) for empty inputs instead of nil; remove_repeated_points reduced a collapsed line to a one-point LINESTRING (GEOS keeps two points).

1. Constructors / conversion (GeoSeries)

GeoPandasGeoPolars devGeoFrameStatusNotes
GeoSeries.from_wktfrom_wkt yesfrom_wkt/2, from_wkt!/2โœ…
GeoSeries.from_wkbfrom_wkb yesfrom_wkb/2, from_wkb!/2โœ…accepts PostGIS EWKB; the SRID becomes "EPSG:<srid>" unless crs: is given; mixed SRIDs are an error; curved geometries (WKB types 8-12) are linearized as GDAL does, see Curved geometries
GeoSeries.from_xy / points_from_xypoint, line_string, multi_point, polygon... constructors from columns yesfrom_xy/3, GeoFrame.points_from_xy/3โœ…lists or Explorer series; nil/NaN -> null point; crs:; z: builds POINT Z (a nil/NaN z is a NaN ordinate; a row with a missing x or y stays null, where GeoPandas keeps a NaN coordinate); 5 reference cases in zm_coords.json agree; see Z and M
GeoSeries.from_fileโ€”from_file/2, from_file!/2โœ…GeoFrame.read_file/2 then the geometry column; same formats and options; returns {:ok, series}
GeoSeries.from_arrowโ€” (geoarrow native)from_arrow/2, from_arrow!/2โœ…Arrow IPC stream binary (no C Data Interface on the BEAM); WKB, WKT, native GeoArrow (interleaved or separated); geometry:, crs: (only when the data has none)
GeoSeries.to_wktto_wkt yesto_wkt/1โœ…
GeoSeries.to_wkb (hex option)to_wkb yesto_wkb/2โœ…hex: true gives upper-case hex strings; srid: n | true emits EWKB
GeoSeries.to_jsonโ€”to_json/2, to_geojson/1โœ…FeatureCollection string with id, properties: {}, geometry, bbox per feature and a collection bbox; show_bbox:, drop_id:, to_wgs84:; the crs member for a non-4326 AUTHORITY:CODE CRS as GeoPandas; compact JSON (Python adds spaces). Reference-tested (decoded JSON); to_geojson/1 stays the list of geometry maps
GeoSeries.to_arrowโ€”to_arrow/2โœ…IPC stream binary with ARROW:extension:name/metadata (CRS as PROJJSON); geometry_encoding: :wkb | :geoarrow; native needs one geometry kind (X and MultiX mix as MultiX)
GeoSeries.to_fileโ€”to_file/3โœ…a one-column frame through GeoFrame.write_file/3 (all formats and options)
GeoSeries.__geo_interface__โ€”to_geo_interface/1โœ…string-keyed FeatureCollection map with ids and bboxes; coordinates are lists (Python: tuples); reference-tested
GeoSeries(...) constructor from geometries list/Shapelydatatypesโ€”โ›”no Shapely in Elixir; WKT/WKB/xy are the entry points
โ€”to_polygon (box struct -> polygon) yesโ€”โ›”GeoFrame has no box dtype; envelope covers it
โ€”line_string_from_vertices, multi_*_from_*, polygon_from_rings etc. yesline_strings_from_vertices/2, multi_points_from_vertices/2, polygons_from_rings/2, multi_line_strings_from_lines/2, multi_polygons_from_polygons/2โœ…rows of {x, y}/[x, y] vertices, or {x, y, z}/[x, y, z] for Z geometries as Shapely (nil row = null, [] = empty); open rings are closed; errors name the row; crs:. Elixir lists, not polars columns or Explorer series

2. Attributes / measurements

GeoPandasGeoPolars devGeoFrameStatusNotes
areaarea, area_planar yesarea/2 (method: :planar | :geodesic)โœ…planar by default; zero for points/lines (GeoPolars errors unless allow_non_polygons)
โ€”area_geodesic yes (PROJ+geographiclib, needs CRS)area_geodesic/1โœ…mยฒ, WGS 84, unsigned (orientation-independent: rings are oriented first because geo returns the ellipsoid complement for clockwise exteriors); projected CRS reprojected to lon/lat; nil CRS raises
lengthlength yes (planar/geodesic)length/2 (method:), length_geodesic/1โœ…metres on WGS 84; polygon perimeter includes holes
distancedistance yes (planar/geodesic)distance/3 (method: :planar | :geodesic | :haversine)๐ŸŸกno align; geodesic/haversine exact for point pairs, approximate otherwise (planar nearest points in lon/lat, then geodesic between them)
boundsbounds yesbounds/1 (DataFrame minx..maxy)โœ…
total_boundsโ€”total_bounds/1โœ…
geom_typedimension_of/dtypegeom_type/1โœ…
x, yx,y yesx/1, y/1โœ…nil for non-points (GeoPandas raises)
z, mz,m yesz/1, m/1 (aliases get_z/1, get_m/1)โœ…point ordinates as f64 series; nil for non-points, empty points, points without that ordinate and nulls (GeoPandas raises for non-points, NaN otherwise); see Z and M
get_coordinatescoordinates (x/y lists)get_coordinates/2๐ŸŸกDataFrame x,y; include_index: adds row position; include_z: and include_m: add z/m columns (NaN for a vertex without the ordinate; an XYM geometry has a NaN z), checked against GeoPandas in zm_coords.json; stored NaN and infinite values come back as :nan, :infinity and :neg_infinity, as Shapely returns them (0.3.2; they raised ArgumentError before); ignore_index and index_parts are โ›” (they assume a pandas index; include_index: gives the row position); see Z and M
count_coordinatesyescount_coordinates/1โœ…
count_geometriesโ€”count_geometries/1โœ…null rows are nil (Shapely: 0); an empty atomic geometry gives 0 (Shapely: 1)
count_interior_ringsโ€”count_interior_rings/1โœ…0 for non-polygons as Shapely; null rows nil
get_geometry(index)โ€”get_geometry/2โœ…integer index, or one index per row (list / Explorer series, nil gives null); negative from end, out of range gives null
get_precision / set_precisionโ€”get_precision/1, set_precision/3 (mode: :valid_output | :pointwise | :keep_collapsed)๐ŸŸกGEOS rounding (floor(x/grid + 0.5)*grid); pointwise is exact, valid_output/keep_collapsed drop repeated vertices and collapsed parts and repair invalid snapped polygons with make_valid/boolean ops (lines are not noded; invalid multipolygon input is merged, where GEOS keeps, merges or raises by edge contact after snapping (in valid_output / keep_collapsed GEOS raises TopologyException on about half of random invalid multipolygons; matching it would mean porting OverlayNG snap-rounding to reproduce an exception, so GeoFrame keeps the merged, valid result by decision โ€” 0.3.0 B13, pinned by a test)); the grid size lives on the GeoSeries struct (GeoArrow has no precision), so only the result of set_precision/3 reports it. Reference-tested (836 cases, 6 documented on invalid input)
hausdorff_distanceโ€”hausdorff_distance/3โœ…GEOS discrete algorithm (vertex to the other geometry's linework, so polygons count as their rings, not their area), densify:; 588 polygon/multipolygon/mixed reference cases; not geo's vertex-to-vertex HausdorffDistance
frechet_distanceโ€”frechet_distance/3๐ŸŸกdensify:; discrete over the flat vertex sequence of any geometry (all parts and rings in order, as GEOS); densify splits every consecutive pair, point-only geometries are not densified; an empty geometry is nil (Shapely nan)
minimum_bounding_radiusโ€”minimum_bounding_radius/1โœ…see ยง6
minimum_clearanceโ€”minimum_clearance/1โœ…least distance between two vertices at different positions or a vertex and a segment not ending in it (R-tree, about O(n log n)); :infinity when none exists (Shapely: inf); reference-tested on 55 geometries
offset_curveโ€”offset_curve/3 (quad_segs:, join_style:, mitre_limit:)๐ŸŸกGEOS algorithm in pure Rust: the raw one-sided curve (fillets of quad_segs, never under 8 as GEOS; mitre limit; bevel) cut exactly where its distance to the input crosses the offset distance, loops dropped, pieces re-joined; polygon rings offset against each other; per-row distances. Reference-tested on 811 cases, 35 documented (closed lines on their outer side with bevel/mitre, a ring offset exactly onto the medial axis, mitre/bevel around segments shorter than the distance); GEOS' input simplification is not applied
interiorsinterior yes (rings after first)interiors/1๐ŸŸกMultiLineString of holes per polygon (GeoPandas returns a list of rings); nil for non-polygons
exteriorexterior yesexterior/1โœ…nil for non-polygons; keeps Z and M (a LineString, GeoPandas has a LinearRing type); see Z and M
boundaryboundary yesboundary/1โœ…keeps Z and M; an empty boundary is a 2D empty geometry (as GEOS); see Z and M
representative_pointโ€”representative_point/1โœ…geo InteriorPoint. Z kept for lines (GEOS picks a vertex), 2D for points and areas (the point is new); M dropped; see Z and M
โ€”mean_coordinate yesmean_coordinate/1โœ…vertex mean; polygon ring closing vertex not double counted
โ€”is_geographic yesis_geographic/1, GeoFrame.CRS.geographic?/1โœ…proj4rs is_latlong; nil without or with an unresolvable CRS
โ€”rings_overlap, self_intersects yesself_intersects/1๐ŸŸกself_intersects: not is_simple for lines and multi-lines, false for other types (no GeoPolars source to check the definition); rings_overlap is โ›” out of scope: its semantics are undocumented and the reference snapshot has no GEOS or Shapely source to check a definition against

3. Unary predicates

GeoPandasGeoPolars devGeoFrameStatusNotes
is_validis_valid yesis_valid/1โœ…geo Validation plus two GEOS rules: a zero-area collinear ring is invalid, and so is a polygon whose holes touch the shell or each other so that the interior is disconnected (Interior is disconnected; see Reference testing). make_valid repairs such a polygon into its parts (geo's repair; vertex order differs)
is_valid_reasonโ€”is_valid_reason/1๐ŸŸกGEOS' text, <reason>[<x> <y>], for the first error in GEOS' check order (coordinates, too few points, Self-intersection / Ring Self-intersection, Hole lies outside shell, Holes are nested, Nested shells, Interior is disconnected). Several errors of one class: the reported coordinate may differ (GEOS' traversal order); a disconnected interior is reported (since 0.2.0), with the coordinate of the touch that closes the cycle in ring order, which may differ from GEOS'; Ring is not closed cannot occur (rings close on construction). Reference-tested, deviations listed
is_emptyyesis_empty/1โœ…
is_ringis_ring yesis_ring/1โœ…closed, >= 4 vertices, simple; quadratic check; GEOS also accepts the degenerate LINESTRING (1 1, 1 1)
is_closedโ€”is_closed/1โœ…lines and multilines; others false (Shapely)
is_simpleself_intersects (inverse, lines)is_simple/1, self_intersects/1โœ…GEOS IsSimpleOp semantics (duplicate multipoint members, line self-contact, multi-line end-point rule, polygon rings, collections always false); R-tree segment pairs; reference-tested on 92 geometries
is_ccwis_ccw yesis_ccw/1โœ…closed LineString only; open lines and other types false
has_z, has_mvia dtypehas_z/1, has_m/1โœ…false for nulls; POINT Z EMPTY has Z; a collection has Z/M when any member does (Shapely); see Z and M
is_valid_coverage, invalid_coverage_edgesis_valid_coverage, invalid_coverage_edges yesis_valid_coverage/2, invalid_coverage_edges/2โœ…GEOS CoverageValidator rules in pure Rust (matched segments with opposite sides, crossings, collinear overlaps, vertex touches into the neighbour, interior vertices, nearly parallel segments for gap_width:); the aggregate is one boolean, the edges are one LINESTRING/MULTILINESTRING/LINESTRING EMPTY per row, in GEOS' order; 388 reference cases, 385 agree (3 differ: GeoPandas misplaces a null row), 8,900 fuzzed cases agree; rows that are not polygons are ignored, nulls stay null; work capped at 50,000,000 steps
โ€”null_out_invalid yesnull_out_invalid/1โœ…
isna / notnanull semanticsisna/1, notna/1โœ…only actual nulls, not empty geometries (GeoPandas >= 0.6)
fillnaโ€”fillna/2โœ…default GEOMETRYCOLLECTION EMPTY; WKT or one-row series; CRS checked
is_empty (missing/empty)yesโœ…โœ…listed above

4. Binary predicates

GeoPandasGeoPolars devGeoFrameStatusNotes
intersectsroadmap (no)intersects/2โœ…all predicates: null/empty rows are nil (GeoPandas False); results on invalid bowtie input can differ from GEOS (see Reference testing)
containsnocontains/2โœ…
withinnowithin/2โœ…
touchesnotouches/2โœ…
crossesnocrosses/2โœ…
overlapsnooverlaps/2โœ…
disjointnodisjoint/2โœ…
coversnocovers/2โœ…
covered_bynocovered_by/2โœ…
geom_equalsnogeom_equals/2โœ…topological equality
geom_equals_exactnogeom_equals_exact/3โœ…structure + vertex order, planar tolerance (inclusive)
geom_equals_identicalnogeom_equals_identical/2โœ…exact coordinates, NaN equals NaN
contains_properlynocontains_properly/2โœ…DE-9IM T**FF*FF*; also a sindex_query/sjoin predicate
dwithinnodwithin/3,4โœ…method: as distance/3; geodesic limit in metres
relatenorelate/2โœ…DE-9IM string
relate_patternnorelate_pattern/3โœ…validated 9-char pattern (T F * 0 1 2, case-insensitive)
align= parameter on all binary opsโ€”โ€”โ›”pandas index alignment; GeoFrame pairs by position

5. Set-theoretic / overlay

GeoPandasGeoPolars devGeoFrameStatusNotes
intersectionnointersection/2โœ…every combination of points, lines and polygons (lines are noded, shared edges and touch points are kept, mixed results are GEOMETRYCOLLECTIONs) and GeometryCollection input, member by member; agrees with GEOS within 1e-6 (integer-grid snapping). Z/M as GEOS OverlayNG: vertices keep their input Z, crossings average the Z interpolated on both segments, remaining NaN Z comes from the elevation model, M is interpolated (no fill); see Z and M
unionnounion/2๐ŸŸกall point/line/polygon combinations incl. line x line and mixed dimensions; GeometryCollection input gives nil. Z/M as intersection; see Z and M
differencenodifference/2๐ŸŸกsame; GeometryCollection input gives nil. Z/M as intersection; see Z and M
symmetric_differencenosymmetric_difference/2๐ŸŸกsame; GeometryCollection input gives nil. Z/M as intersection; see Z and M
clip_by_rectnoclip_by_rect/5โœ…row-wise, empties kept as GEOMETRYCOLLECTION EMPTY, boundary-only contact is empty; matches GEOS (polygon vertices within 1e-6). Z interpolated on the clipped edges and filled at the corners GEOS adds inside a polygon, M dropped unless the row lies inside the rectangle; polygon edges that leave and re-enter the rectangle can differ from GEOS; see Z and M
clip (GeoSeries/GDF)noGeoFrame.clip/3โœ…polygon (WKT, series, frame via union_all) or box mask, R-tree prefilter, keep_geom_type; rows in original order; a series returns a series (no index). Secondary geometry columns are kept unclipped with their rows and CRS, as GeoPandas does (issue #93). Z follows intersection / clip_by_rect; see Z and M
overlay (GDF; how=intersection/union/identity/symmetric_difference/difference)noGeoFrame.overlay/3โœ…GeoPandas algorithm (R-tree pairs, pairwise intersections, differences against the union of overlapping rows), _1/_2 suffixes, nulls on the missing side, keep_geom_type (nil logs via Logger.warning), make_valid; null-geometry rows are kept among the remainders like GeoPandas (45 reference cases, issue #63); output polygons are not re-validated. Secondary geometry columns of both frames are columns like the others: _1/_2 on a name clash, null for the missing side, kept as is for difference (25 reference cases in fixtures/multi_verbs.json, issue #93). Geometry Z/M follows the set operations used; see Z and M
intersection_allnointersection_all/1โœ…one-row series; sequential pairwise intersection, so touching inputs give their shared edge. Z/M follows the pairwise intersection; see Z and M
union_allnounion_all/1โœ…(unary_union deprecated: not needed). Z/M as the union of all rows (dissolve too); see Z and M
โ€”โ€”union_groups/3โœ…GeoFrame-only, used by dissolve

6. Constructive methods

GeoPandasGeoPolars devGeoFrameStatusNotes

| buffer | no | buffer/3 | ๐ŸŸก | cap/join/quad_segs/mitre; distance is a number or one value per row (list or Explorer.Series, nil gives a null row where Shapely raises); single_sided: true (own code: the band between a line and its offset on the left for a positive distance, the right for a negative one, flat ends, outside corners by join style; a point gives its buffer for a positive distance, a polygon as GEOS does, which only shapes lines: the ordinary buffer, or, when the polygon boundary noded with the buffer boundary encloses more than one face, the face of the largest area (holes subtracted), so a square of side s and distance d gives the band between square and buffer up to s/d = 2 + sqrt(4 + pi) (about 4.68) and the square itself above for d > 0, the band (square minus its erosion) up to about 6.83 and the negative buffer above for d < 0, and nothing when s is at most 2 |d|; a multipolygon is buffered per member and united; fuzzed against Shapely over 900 random squares, holed and star polygons and multipolygons with all three joins and distances of 0.1 to 3 either way: 2,700 cases agree within 2 % of the area); a closed line is flat at its start as in GEOS), reference-tested over 10 geometries (60 cases, all agree; a band that overlaps itself, for example a U-shaped line buffered by more than half its width, can differ from GEOS); planar; reference-tested area within 2 %, mitre/bevel joins on acute closed-line corners differ from GEOS | | centroid | centroid yes | centroid/1 | โœ… | | | convex_hull | convex_hull yes | convex_hull/1 | โœ… | Keeps Z (vertices are copied), drops M; see Z and M | | envelope | via bounds/to_polygon | envelope/1 | โœ… | horizontal/vertical line gives a line; GEOS 3.14 gives a zero-area polygon | | simplify | simplify yes | simplify/3 | โœ… | preserve_topology supported; surviving vertices keep their Z, M is dropped (Shapely); see Z and M. preserve_topology: false is GEOS's Douglas-Peucker (own code: geo's keeps four vertices per ring): a ring that collapses below four vertices is removed, a polygon whose shell collapses is empty, multipolygon parts and collection members drop, a one-part multi geometry is returned as its part, and a tolerance of 0 still removes collinear vertices, and a ring's start vertex is dropped when it is within the tolerance of the chord between its neighbours (the ring then closes on the next vertex). an invalid result is repaired with buffer(0) as GEOS does (DPTransformer::createValidArea: per polygon, a multipolygon as a whole; a self-crossing ring keeps its positive-winding lobes, overlapping or edge-touching parts dissolve), in pure Rust (buffer_zero.rs, a port of GEOS's buffer graph: ring start, ring direction and part order match vertex for vertex); the 9 reference cases agree, 19,000 fuzzed polygons and multipolygons (10,231 needed the repair) agree vertex for vertex, and so do the 50 European countries of notebooks/tour.livemd at 2, 5 and 20 km and the 242 countries at 50 km. On a polygon with Z the repair follows GEOS's noder (LineIntersector, 0.3.0 B15z): a vertex of the simplified rings keeps its Z, a NaN Z lying on another ring's segment is interpolated along it, and a new crossing node takes the mean of the Z interpolated along the first two segments through it, a NaN side giving the other; M is dropped. 12 hand cases from Shapely agree but one, and 1,390 of 1,504 fuzzed repairs agree on every Z, bit for bit (lattice polygons with one Z per position and 0-10 % NaN). The rest are points where three or more rings meet: GEOS keeps the Z of the edge it ends up using (a split edge starts with the node's Z and ends with the original vertex, SegmentNodeList::createSplitEdgePts), which a lookup by position cannot reproduce, so such a point takes the vertex's own Z or the first crossing pair | | simplify_coverage | no | simplify_coverage/3 | โœ… | GEOS CoverageSimplifier in pure Rust (geo's SimplifyVw is not coverage-aware): rings cut into edges at the coverage's nodes, each shared edge simplified once with topology-preserving Visvalingam-Whyatt (tolerance is the square root of the triangle area), simplify_boundary: false keeps the outer boundary, polygons rebuilt like GEOS (a ring may start at another node or run the other way round); 417 reference cases and 23,500 fuzzed ones (10,800 random coverages, 280 hand-built, 12,402 overlapping inputs) agree vertex for vertex; null and non-polygon rows give nil (Shapely raises); capped at 10,000,000 vertices and 50,000,000 vertex checks | | make_valid | no | make_valid/1 | ๐ŸŸก | geo MakeValid; polygons only; differs from GEOS in vertex detail; a zero-area collinear polygon collapses to its lines as in GEOS (a collapsed shell with holes is left unchanged). A valid geometry keeps Z and M, a repaired one keeps Z (a new node averages the Z of the two crossing segments) and drops M; see Z and M | | representative_point | no | โœ… | โœ… | see ยง2 | | concave_hull | no | concave_hull/2 | โœ… | ratio:, allow_holes:; port of the GEOS/JTS border erosion over the spade Delaunay triangulation (geo's ConcaveHull is a different algorithm with a different parameter); point/line for <3 or collinear vertices; exactly tied edge lengths can erode in another order than GEOS (documented). Keeps Z, drops M; see Z and M | | minimum_rotated_rectangle | no | minimum_rotated_rectangle/1 | โœ… | geo MinimumRotatedRect; point/line for degenerate input; shapes with several equal-area minimal rectangles (any triangle) can pick another one than GEOS | | minimum_bounding_circle | no | minimum_bounding_circle/1 | โœ… | own Welzl; the 32-gon Shapely draws (buffered center, quad_segs 8, starts east, clockwise); point for radius 0 | | minimum_bounding_radius | no | minimum_bounding_radius/1 | โœ… | same Welzl; 0.0 for a point | | maximum_inscribed_circle | no | maximum_inscribed_circle/2 | โœ… | tolerance:; the JTS/GEOS cell search (geo has no polylabel); line from center to nearest boundary point; polygons only (others nil) | | minimum_clearance_line | no | minimum_clearance_line/1 | โœ… | the line between the closest pair; LINESTRING EMPTY when no clearance exists; among equally close pairs GEOS may report another one (same length) | | extract_unique_points | no | extract_unique_points/1 | โœ… | MultiPoint in first-seen order. Keeps Z, drops M; see Z and M | | remove_repeated_points | no | remove_repeated_points/2 | โœ… | tolerance; own thinning keeps first and last vertex; 0 uses geo. Keeps Z and M; see Z and M | | reverse | no | reverse/1 | โœ… | every type; multi-geometry part order kept; Z and M reversed with their vertices | | normalize | no | normalize/1 | โœ… | GEOS canonical form (CW shells, CCW holes, rings from the smallest vertex, parts sorted descending by type rank/size/coordinates); reference-tested exactly. Nested collections cannot be stored; keeps Z and M by exact XY lookup (a vertex repeated with different Z takes the first) | | orient_polygons | no | orient_polygons/2 | โœ… | exterior_cw:. Keeps Z and M; see Z and M | | segmentize | no | segmentize/2 | โœ… | Euclidean, Densify. Z interpolated on the new vertices, M dropped; see Z and M | | force_2d | dtype | force_2d/1 | โœ… | drops Z and M, keeps the CRS and nulls; empties stay empty | | force_3d | dtype | force_3d/2 (z: number, list or series, default 0.0) | โœ… | adds Z to 2D geometries and empties, keeps an existing Z; XYM is left unchanged (Shapely 2.2); XYZM keeps its Z and drops M where Shapely overwrites Z with the fill value; see Z and M | | snap | no | snap/3 | ๐ŸŸก | GEOS GeometrySnapper rules as observed (snap points in order of appearance, one nearest vertex moves per snap point, segment cracking by projection); scalar tolerance; 516 of 537 reference cases agree, the 21 others have several snap points competing for one vertex (agrees with GEOS in about 99 % of random cases); work capped at 50,000,000 vertex x snap-point steps per geometry | | shortest_line | no | shortest_line/2 | โœ… | composed from ClosestPoint both ways plus segment crossings; ties may differ from GEOS | | sample_points | no | sample_points/3 | ๐ŸŸก | seed:, per-row sizes, polygons and lines, MultiPoint per row; SplitMix64 (no rand dependency), so a seed is reproducible but is not NumPy's stream; the pointpats methods (cluster_poisson, ...) are not available | | make_grid (GeoPandas 1.2, also tools.make_grid) | no | make_grid/3 | โœ… | square and hexagon, centers/corners/polygons, offset:, intersect:, flat_topped:; follows the NumPy layout index for index (arange, meshgrid, hexagon corner grouping), 144 reference cases agree element by element | | transform (apply function to coordinates) | no | โ€” | โ›” | arbitrary callbacks over NIF coordinates; to_crs/affine cover real uses | | build_area / polygonize | polygon_from_rings (different) | build_area/2, polygonize/2 (node:, full:) | ๐ŸŸก | GEOS polygonizer in pure Rust: noding with R-tree pairs, dangle and cut-edge removal, face walks split into minimal rings, invalid rings, hole assignment; full: true returns polygons, cuts, dangles and invalid rings; build_area is the even-odd symmetric difference of the filled shells. Whole series at once, one row per polygon, as GeoPandas. 72 reference cases agree except two on lon/lat input whose merged input polygons come back snapped to a 1e-9 grid (geo's overlay); with node: true the vertices of the input polygons and lines that lie on the merged outline stay, collinear ones included, as in a GEOS union. build_area still differs from GEOS in some collinear vertices that no other input touches (GEOS drops them for some multi-polygon inputs; not characterised), where a line crosses input polygons the crossing is a vertex of the merged ring and a ring is one edge (a node only at its start) as in the GEOS polygonizer, so a line piece between two rings' inner vertices is a dangle, not a face (0 of 400 and 3 of 2 000 random mixed inputs differ from GEOS, from 8 and 54; the rest are zero-length lines and last-digit rounding), and where input polygons have different Z at a shared vertex GEOS picks one by noding order. polygonize and build_area keep Z (taken from all rows), drop M; see Z and M | | delaunay_triangles | no | delaunay_triangles/2 | โœ… | tolerance:, only_edges:; like GeoPandas the whole series is one point cloud and the result has one row per triangle (or edge); cocircular points allow several triangulations, so the triangle set can differ from GEOS (compared by union); tolerance snapping differs on clustered input (documented). Keeps Z (taken from the whole series), drops M; see Z and M | | constrained_delaunay_triangles | no | constrained_delaunay_triangles/1 | โœ… | per row, a GeometryCollection of triangles filling each polygon (holes respected); other types give an empty collection; cocircular vertices allow several triangulations | | voronoi_polygons | no | voronoi_polygons/2 | โœ… | tolerance:, extend_to:, only_edges: (and Shapely's ordered:: cells always come in vertex order); whole series is one cloud, one row per cell; built from the spade triangulation with exact half-plane clipping to GEOS' envelope (not geo::Voronoi, whose clip and rays differ); tolerance snapping differs on clustered input (documented) | | explode | no | explode/2 | โœ… | {parts, positions} (the pandas index becomes the parallel list of source rows); index_parts: true adds part numbers; collections explode one level | | get_geometry / geometry parts | no | get_geometry/2, explode/2 | โœ… | get_geometry takes a scalar or per-row index (see ยง2); all parts of every row come from explode/2 |

7. Affine transformations

GeoPandasGeoPolars devGeoFrameStatusNotes
translatetranslate yestranslate/4โœ…numbers, lists or Explorer series per row; Z kept, zoff: shifts it (scalar offsets only), M dropped; see Z and M
scalescale, scale_about_centroid yesscale/4โœ…origin: :center, :centroid, {x,y}; Z kept, zfact: scales it about 0 (scalar factors only), M dropped
rotaterotate, rotate_about_centroid yesrotate/3โœ…Z kept, M dropped
skewskew, skew_about_centroid yesskew/4โœ…degrees or use_radians: true; origin as in scale/4; Z kept, M dropped
affine_transform (6/12-param matrix)affine_transform yesaffine_transform/2โœ…6 numbers [a, b, d, e, xoff, yoff] leave Z alone; 12 numbers [a, b, c, d, e, f, g, h, i, xoff, yoff, zoff] transform Z too (Shapely order); M dropped
per-row parameters (column-valued offsets/angles/origin)yestranslate/scale/rotate/skewโœ…each numeric argument is a number, list or Explorer series; nil nulls the row; origin: may be a list of {x, y}

8. Linestring / linear referencing

GeoPandasGeoPolars devGeoFrameStatusNotes
interpolateroadmapinterpolate/3โœ…normalized:, negative distance, per-row distance; MultiLineString parts concatenated; non-lines nil. Z interpolated, M dropped; see Z and M
projectroadmapproject/3โœ…normalized:, other broadcasts. 2D (the distance is measured in the XY plane, as GEOS); see Z and M
line_mergeroadmap ("Linestring joining")line_merge/2โœ…own endpoint-graph merge; directed:; non-lines give an empty collection (GEOS merges a polygon's boundary). Keeps Z, drops M; see Z and M
shared_pathsnoshared_paths/2โœ…GEOMETRYCOLLECTION of the same-direction and the opposite-direction MULTILINESTRING; inputs are noded against themselves as the overlay does; non-lines give nil (Shapely raises); 328 reference cases agree. 2D (GEOS keeps a mix of the two inputs' Z; left as a deviation); see Z and M
offset_curvenooffset_curve/3๐ŸŸกsee ยง2
shortest_linenoshortest_line/2โœ…see ยง6
chaikin-style smoothingnoโ€”โ›”not in GeoPandas; skip

9. Aggregation / dissolve

Grouping follows Explorer's API rather than pandas' object model: group_by/2 marks the groups, summarise/3 aggregates and group_map/4 applies a function.

GeoPandasGeoPolars devGeoFrameStatusNotes
gdf.groupby(by).agg(...)nogroup_by/2 + summarise/3 (GeoFrame.GroupBy)๐ŸŸกone row per group, keys first then the aggregated attributes then the geometry; attributes sum, mean, median, min, max, count, first, last, n_distinct; geometry union_all, intersection_all, collect, envelope, convex_hull, centroid, first, last, count aggregated in one NIF call over all groups; sort: and dropna: as pandas. Differences: no index (keys are columns); first/last skip nulls as pandas (not as Explorer.Series.first/last); n_distinct ignores nulls as nunique (not as Explorer's); a group's centroid is that of its union (pandas has no grouped centroid); geometry columns cannot be keys; aggregations are out: {func, column}, not named aggregation objects or callables
gdf.groupby(by).apply(fun)nogroup_map/4๐ŸŸกfun receives each group's GeoDataFrame (key columns included: pandas 3 removes them and uses them as the index) in key order and the results are concatenated, also for Explorer dataframes (a mix, a CRS or geometry column mismatch raise ArgumentError naming the group). group_keys=True becomes: key columns fun dropped are prepended as columns, there is no index. fun returning a scalar or a Series is not supported
groupby(by).head(n), .tail(n), .nth, .samplenohead/2, tail/2, slice/3, sample/2 on a grouped frame๐ŸŸกper group as Explorer; head, tail and slice return rows in original order like pandas; sample lists group after group (unspecified order); no nth, no cumcount, transform, filter or rolling

Dissolve and its options:

GeoPandasGeoPolars devGeoFrameStatusNotes
union_allnoโœ…โœ…the result can have a few vertices fewer than GEOS: collinear and near-duplicate vertices are dropped (Natural Earth 50m continents: Antarctica 4 660 vs 4 923, Asia 12 257 vs 12 259, the rest equal), areas agree to 3e-8 (notebooks/compare.livemd)
intersection_allnointersection_all/1โœ…see ยง5
GeoDataFrame.dissolvenodissolve/2 (GeoFrame.Dissolve)๐ŸŸกby, aggfunc (first,last,sum,mean,min,max,count), dropna, sort, a column-to-function map; secondary geometry columns aggregate with first/last (first/last non-null geometry, CRS kept) or count (integer column), other functions raise ArgumentError (pandas raises TypeError); dissolving by a geometry column raises (pandas groups by the shapes); as_index: false is accepted and is what the result always is (keys are leading columns, no index; as_index: true raises, level raises: there is no index to group by, โ›”); observed: false adds the unobserved combinations of the values of several :category keys as empty groups: GEOMETRYCOLLECTION EMPTY, sum/count 0, other functions null, as GeoPandas 1.2; categories with no rows are not added (pandas can declare them; Explorer 0.13 categoricals share one process-wide category mapping, so Series.categories/1 returns every string categorized in the session, not the column's own categories), so with one key the option adds nothing; the default stays observed: true (GeoPandas defaults to false) so existing calls keep their result, and mixing category and plain keys with observed: false raises. The geometry is the union of the group (Z as union_all); see Z and M
unary_union (deprecated)โ€”โ€”โ›”deprecated
GeoDataFrame.explodenoGeoDataFrame.explode/2โœ…attributes repeated; index (source row) and part columns replace the (Multi)Index; ignore_index: drops index

10. Projection handling

GeoPandasGeoPolars devGeoFrameStatusNotes
crsCRS in metadatacrs/1 (Series + GDF)โœ…
set_crsset_crs yesset_crs/2 (Series + GDF)๐ŸŸกrelabel only, no reprojection; like GeoPandas a different existing CRS raises ArgumentError (ValueError there) unless allow_override: true (same CRS, no CRS yet and nil need no option; CRSs compare by stored text, so OGC:CRS84 and EPSG:4326 differ, as in pyproj; since 0.2.0, earlier versions relabelled silently); takes a string, an integer EPSG code (as to_crs) or nil; the string may be a PROJJSON or WKT definition (issue #100)
to_crsto_crs yes (PROJ)to_crs/2๐ŸŸกproj4rs (no pipelines) plus the PROJ projections it lacks (see Datum shifts and grids); datum shifts by NTv2 / GeoTIFF grids from a user-supplied directory or else the Helmert operation PROJ picks by area of use, never downloaded: see Datum shifts and grids; accepts string or integer, or a PROJJSON / WKT definition with no code (see CRS definitions and codes outside the table); Z kept (unchanged between non-geocentric CRSs, transformed to or from a geocentric one such as EPSG:4978), M dropped; see Z and M
estimate_utm_crsestimate_utm_crs(datum_name="WGS 84")estimate_utm_crs/2 (datum_name:)โœ…the first EPSG UTM CRS of the datum, by code, whose area of use contains the centre of the bounds: the answer of pyproj.database.query_utm_crs_info (table generated from the PROJ database, any datum with UTM CRSs: WGS 84 80S-84N, NAD83, NAD27, ETRS89, ...). Geographic input is centred on its raw bounds, any other CRS on its lon/lat bounds (densified edges, pole and antimeridian handling as transform_bounds). Norway (32V) and Svalbard (32X/34X/36X) exceptions are not applied, because pyproj and GeoPandas do not apply them (5 E, 60 N is 32631, not 32632); zone edges belong to both zones and the lower code wins. 7 034 grid, edge, pole, antimeridian, projected-CRS and datum cases agree with GeoPandas 1.2 (issue #62)
crs mismatch behaviourโ€”raisesโœ…stricter than GeoPandas (which warns)
Series.crs setter from pyproj CRS objectsโ€”โ€”โ›”no pyproj object model

Datum shifts and grids

Issue #62. to_crs moves a datum that is not WGS 84 the way PROJ does when it has no network: a grid if one is installed, else a Helmert (+towgs84) set. GeoFrame never downloads a grid.

  • Helmert by area of use (default). Without a grid PROJ runs the best operation whose area of use holds the point, and a ballpark transformation (no shift) where none does and its list has a ballpark entry. GeoFrame has the same list per datum: datum_helmert.rs, generated from the PROJ database by test/reference/generate_crs_datum.py helmert_table (TransformerGroup of every geographic 2D EPSG CRS to WGS 84: 606 CRSs, 307 distinct lists, 833 operations, about 135 KB). Operations are tried in this order: not for an offshore area first (an area name that says "offshore" before it says "onshore", whatever the accuracies: "Norway - offshore north of 62ยฐN. Also Svalbard - onshore and offshore." is offshore, "Nigeria - onshore and offshore." is not), then known accuracy, best first, then smaller area, then PROJ's own order. Against Transformer.get_last_used_operation at about 5 500 sampled points of every CRS with two or more operations this picks PROJ's operation for 95.4 % (the former rule, "offshore without onshore", 95.3 %, but it left the onshore Norwegian and Finnish Lapland on an offshore operation: Tromso, Rovaniemi); the remaining misses are offshore areas with several operations of the same accuracy. Molodensky-Badekas operations are folded into an equivalent Helmert set (pivot in the translation), inverse steps are inverted and several Helmert steps are composed into one (Garoua, Kousseri, Mhast (offshore): two small-angle steps, 1e-11 relative). Four more kinds of operation:

    • a geographic offset (geogoffset: Anguilla 1957, 18" and 4.4" of latitude and longitude; the Greek datum, an offset of -5.86" and 0.28" followed by a translation on GRS80): the coordinates go from the CRS to geographic ones on its ellipsoid, are moved, and are read as WGS 84 (or GRS80 with the translation) before going to the target, in both directions (reproject.rs, via_wgs84);
    • a null operation (noop) is the same offset with zeros: PROJ runs it first for GDA94 and GDA2020 (EPSG "to WGS 84 (1)", accuracy 3 m, the same accuracy as the 1.7 m Helmert step the table used to run instead), and the table holds one for 162 CRSs (18 lists): GDA94 and its 42 MGA, Vicgrid and Albers CRSs, GDA2020 and its 41, CR-SIRGAS, Anguilla 1957, Madrid 1870 and others, which now answer like pyproj (1.2 to 1.8 m before for the Australian ones). A geocentric step between two ellipsoids with no Helmert between (GSK-2011) is a zero +towgs84;
    • an exact Helmert (helmert exact, Saba, Sint Eustatius, Bonaire: rotations of 2e-3 rad, where the small-angle +towgs84 formula of proj4rs is 9 m off): the exact rotation matrix on geocentric coordinates, in both directions (datum.rs, ExactHelmert);
    • an operation PROJ runs although the table of TransformerGroup lists only a ballpark: RD/83 and PD/83 have a direct operation that needs a grid, and PROJ then composes the Helmert to ETRS89 with the null step to WGS 84 (182 m before).

    When no operation holds the point, PROJ keeps its ballpark if its list has one (ED50, AGD66) and otherwise runs the first operation of its list: a geographic CRS with no ballpark entry has that operation last in the table, with the whole world as its area (Minna at 40E 10N, DHDN in the North Sea), and a datum with one operation applies it everywhere (RD/83, Saba). For a projected CRS PROJ first keeps the operations that meet the area of use of that CRS and orders them by it (ED50 / UTM zone 30N at 8W 42N runs the Spanish north-west operation, not the Portuguese one; Minna / UTM zone 31N runs the 7 m offshore operation, not the 15 m onshore and offshore one): GeoFrame does not know that area, so it orders by the geographic CRS and keeps the lone operation but not the first-operation fallback. That is the 1 to 12 m left for ED50 / TM and UTM CRSs, Minna / UTM (12.4 m), Aratu, Batavia, Accra and Carthage projected CRSs, and the NAD27 UTM zones that need grids. +datum=NAD27 and NZGD49, which proj4rs refuses to build without grid files, are covered the same way. A CRS that PROJ transforms only with a ballpark gets no shift, even if the bundled table lists a +towgs84.

  • Grids. NTv2 (.gsb) and the GeoTIFF grids of PROJ-data (.tif: NTv2 and NADCON conversions) are read by proj4rs. GeoFrame.Grids points at the directories holding them (set_dirs/1, config :geoframe, grid_dirs: [...], or the PROJ_NADGRIDS / PROJ_DATA environment variables, separated by :), status/1 shows which files a CRS would use and whether they are installed, and register/2 overrides the file names for a datum. The file names come from the PROJ database (test/reference/generate_crs_datum.py grid_table, 32 geographic CRSs, 104 files, best accuracy first): OSGB36 uk_os_OSTN15_NTv2_OSGBtoETRS.tif, DHDN de_adv_BETA2007.tif, NAD27 us_noaa_conus.tif, ca_nrc_ntv2_0.tif, ED50 es_ign_SPED2ETV2.tif, NTF, MGI, Tokyo, ... Grids are optional (+nadgrids=@a,@b): the ones found are used, and a point outside every grid takes the Helmert operation instead of failing, as PROJ moves on to its next operation. Grids that shift to NAD83, ETRS89, GDA94 and similar count as shifting to WGS 84 (PROJ's own step between them is null, 1 to 2 m).

  • Units, prime meridians and axes (issue #97). A geographic CRS is read and written in its own angular unit: the Paris-meridian CRSs (EPSG:4807 NTF (Paris), 4901, 4810, 4816, 4821, 4811, 4902, ...) are in grads, with the Paris meridian applied, as pyproj with always_xy. Projected CRSs whose WKT points an axis south or west get +axis (the table lacked it for EPSG:5513 and 2065, S-JTSK / Krovak: x is southing, y is westing, so coordinates are positive in the Czech Republic; 5514 is the East North twin). EPSG:3167 has the false easting PROJ has now (40 000 chains, the table has 40 000 m).

  • Projections added on top of proj4rs (proj_ext.rs, PROJ's formulas; a CRS using one is resolved as the projection plus the proj4rs geographic CRS that does the datum shift): ellipsoidal Equidistant Cylindrical (eqc: proj4rs uses a sphere, so EPSG:4087 was 22 km north-south off; PROJ 9 uses the meridian distance), Hotine Oblique Mercator variants A (+no_uoff) and B (27 codes such as 2057, 3078, 3375), Cassini-Soldner (30 codes: Tobago, Berlin, Palestine, ...), Polyconic (5472, 5880, ...), Equal Earth (8857-8859) and the New Zealand Map Grid (27200). The aeqd feature of proj4rs is now on (Guam, FSM: 3295, 3993). Each matches pyproj to the centimetre in both directions (fixture crs_parity.json). Issue #100 added Laborde Oblique Mercator (labrd, EPSG:8441 and 29701), Hyperbolic Cassini-Soldner (3139), Colombia Urban (col_urban, 32 codes such as 6244), Krovak Modified (mod_krovak: 5224, 5225, 5515, 5516, with the S-JTSK/05 polynomial) and the spherical Lambert Azimuthal Equal Area on the authalic sphere (+R_A, EPSG:9311): see below.

  • Accuracy. With a grid GeoFrame agrees with PROJ to under 1 mm on the same file (a synthetic NTv2 file and its GeoTIFF twin, 44 points inside, 5 outside, both directions; test/reference/fixtures/crs_datum/grids). Real grids give centimetres to a metre. Sweep of 5 934 non-deprecated geographic 2D and projected EPSG CRSs, three points inside each area of use, GeoFrame to_crs to EPSG:4326 against pyproj 3.8 / PROJ 9.8 without grids and always_xy (test/reference/sweep_crs.py):

    before #97after #97after #100
    compared5 0145 0815 933
    within 5 m4 590 (91.5 %)5 034 (99.1 %)5 891 (99.3 %)
    5 m to 50 m2142025
    50 m to 1 km1982717
    1 km or more1200
    fail: not in the bundled table8518510
    fail: projection missing681 (labrd, EPSG:8441)1 (EPSG:10622, Local Orthographic)
    fail: no projection name11 (EPSG:29701)0

    The 17 codes between 50 m and 1 km, all PROJ-specific: MGI (Ferro) (4805, 305 m: PROJ's operation counts the Ferro meridian as 17.6628 W, the CRS says 17.6667 W), the three Tokyo 1892 Korea belts (5169 to 5171, 260 m: PROJ goes through Korean 1985 with a prime meridian step between two Helmert sets), RD/83 and PD/83 (PROJ's own asymmetric ballpark, 4326 to the CRS and back disagree by about 190 m inside PROJ), Pulkovo 1942(83) zone 8, Pampa del Castillo / Argentina 1 (9284: the sampled point is 0.14 degrees outside the area of use of the only operation, which PROJ tests in projected coordinates) and ED50 / UTM zone 37N (96.7 m, the same edge effect). The 25 codes between 5 m and 50 m are NAD27 and SAD69 without their grids (PROJ has the same ballpark choices) and sampled points at the edge of an operation's area. The same sweep with every CRS given as its PROJJSON or WKT2 definition without a top-level identifier (CRS_SWEEP_FORM=projjson or wkt2, the converter tested on the whole registry) gives 5 893 and 5 892 within 5 m, 17 between 50 m and 1 km, none over 1 km, one failure (Local Orthographic).

    v0.1.2 (C2, null operations, exact Helmert, RD/83, the offshore rule), the same 5 934 CRSs, three points each, by code, against pyproj 3.8.0 / PROJ 9.8.1 with no grids installed (the pyproj data directory holds proj.db and its ini and list files, no .gsb or .tif):

    v0.1.1v0.1.2
    within 5 cm5 6395 838
    5 cm to 5 m25266
    5 m to 50 m2522
    50 m to 1 km177
    fail11

    No CRS got worse. The 7 between 50 m and 1 km are legacy or PROJ-specific: MGI (Ferro), the three Tokyo 1892 Korea belts (prime meridian step), Pampa del Castillo and Pulkovo 1942(83) zone 8 (the sampled point is outside the area of use of the only operation, which PROJ tests in projected coordinates), ED50 / UTM zone 37N. RD/83, PD/83 and the Gauss-Kruger CRSs on them, GDA94 and GDA2020 (83 CRSs), GSK-2011 (89), Saba, Sint Eustatius and Bonaire agree now.

CRS definitions and codes outside the table

Issue #100. to_crs and set_crs take a CRS as EPSG:<code>, OGC:CRS84, or a definition: PROJJSON, WKT1 or WKT2 text, with or without an identifier (as pyproj.CRS.from_user_input).

  • Definition converter (crs_convert.rs). PROJJSON (WKT is first translated to PROJJSON: wkt1_projjson.rs for the OGC WKT1 flavour the bundled table uses, wkt2_projjson.rs for GEOGCRS, GEODCRS, PROJCRS, BOUNDCRS and COMPOUNDCRS, datum ensembles included) is turned into the proj string the engine runs: ellipsoid (+a with +rf or +b, or +R; WKT2 axes in feet are converted), prime meridian (+pm in degrees), the linear unit (+to_meter) and +axis when an axis points south or west (polar axes named by a meridian are the usual easting and northing), a WKT1 TOWGS84 or the abridged transformation of a bound CRS (+towgs84, the coordinate frame convention is flipped), and the conversion method, found by its EPSG code or its name: Transverse Mercator (also south orientated and 3D), Lambert Conic Conformal (1SP, 1SP variant B, 2SP, 2SP Belgium, 2SP Michigan, west orientated), Albers, Lambert Azimuthal Equal Area (also spherical), Azimuthal Equidistant (also Modified and Guam), Oblique and Polar Stereographic (A, B), Hotine Oblique Mercator (A, B; B with both angles 90 degrees is the Swiss somerc, as PROJ), Mercator (A, B, spherical, Pseudo-Mercator), Cassini-Soldner (also Hyperbolic), Equidistant Cylindrical, Lambert Cylindrical Equal Area, Krovak (North Orientated, Modified), Laborde, Colombia Urban, American Polyconic, New Zealand Map Grid and Equal Earth. Parameters carry their units (degrees, grads, feet, yards, ...) and are matched by EPSG code or EPSG name. A compound CRS uses its horizontal component. Anything else is an error naming the method (Bonne, Polar Stereographic variant C, Tunisia Mining Grid, Transverse Mercator Zoned Grid System, Local Orthographic).

  • Datum of a definition. The datum shifts of a CRS (the Helmert operations by area of use and the grids) are keyed by the EPSG code of its geographic CRS. A definition that carries that identifier (as every definition PROJ or pyproj writes) shifts like the code. One that does not finds its geographic CRS by name in crs_names.rs (460 names, generated from the PROJ database), as PROJ identifies a CRS; a 3D geographic base (LUREF 3D) uses its 2D namesake. Failing that it finds it by the name of its datum in crs_datum_names.rs (1 465 names: the EPSG names and the EPSG and ESRI aliases of those 606 datums, D_OSGB_1936, D_North_American_1927, European_Datum_1950, D_GDA_1994, ...). That is what PROJ does with WKT1 text, whatever the name of the GEOGCS: a Shapefile .prj (GCS_... / D_..., no authority) is shifted like its EPSG code (GDA94, GDA2020 and CR-SIRGAS included now that their null operation is in the table), and a datum name PROJ does not know leaves the text unshifted. The datum name is keyed by the longitude of its prime meridian (generated from the PROJ database with the meridian of each geographic CRS), so D_MGI on the Ferro meridian is MGI (Ferro) (4805) and not MGI (4312), and NTF on the Paris meridian is NTF (Paris) (4807). A text on another meridian answers through that CRS like its EPSG code: Lisbon (Lisbon) 4803, CH1903 (Bern) 4801, S-JTSK (Ferro) 4818, Batavia (Jakarta) 4813, Segara (Jakarta) 4820, Oslo, Tananarive, Carthage (Paris), and the projected CRSs on them (NTF Lambert zones, Austria GK, Portuguese grids, NGO 1948, the Jakarta NEIEZ grids, LV03C) agree with pyproj. Two geographic texts are refused (unsupported WKT CRS: the datum ... has a prime meridian at ... degrees and no identifier, and PROJ shifts it to WGS 84; GeoFrame's answer for that CRS differs from PROJ's ...): MGI (Ferro), whose answer by code is 305 m off pyproj (PROJ counts the Ferro meridian as 17.6628 W), and Monte Mario (Rome), which PROJ shifts as the Greenwich datum from text but not by code (72 m). Which geographic CRSs those are is generated, not listed: a flag of the table, false where the by-code sweep or the text sweep of that geographic CRS differs from pyproj by more than 5 cm (CRS_SWEEP_OUT, CRS_ESRI_SWEEP_OUT of datum_name_table); a projected CRS on them is answered either way. A text whose datum name is known only on another meridian (D_S_JTSK is Greenwich; S-JTSK (Ferro) East North, EPSG:5221) is refused as well when PROJ shifts that datum. A datum name PROJ does not know, or a datum it does not shift (BD50 Brussels, RT38 Stockholm, Voirol 1879, the Gusterberg and St. Stephen Ferro systems), keeps its answer. Over 1 337 geographic and sampled projected CRSs written as WKT1ESRI (one point each) the differences from pyproj were 65 after C1 and are 12 (225 refused on origin/main, 2 now), and over the 5 330 projected EPSG CRSs (area-of-use centre, one point each) 115 on origin/main and 30 (1 007 refused, 36 now, 35 of them the projection names listed below); no text that was correct on origin/main is wrong or refused now. The 30 left are the ones the CRS has by code too (see the sweep above) apart from the two Ferro grids of Gusterberg and St. Stephen (9 and 4 m: the Cassini-Soldner series of proj4rs 1.4 degrees from the central meridian). ATF (Paris) as geographic text, in grads, is 178 km off (its unit, not its datum) and Tokyo 1892 and Rassadiran differ for their own PROJ-specific operations: documented deviations, not pursued. ESRI names several projections differently from EPSG, and these are read as the EPSG method PROJ maps them to: Double_Stereographic (Oblique Stereographic, RD New), Gauss_Kruger (Transverse Mercator), Albers (Albers Equal Area), Cassini, Stereographic_North_Pole / Stereographic_South_Pole (Polar Stereographic variant B), Stereographic / Polar_Stereographic_Variant_A on a pole (variant A), Mercator with a standard parallel (variant B), Hotine_Oblique_Mercator_Azimuth_Natural_Origin and Rectified_Skew_Orthomorphic_Natural_Origin (Hotine variant A), Rectified_Skew_Orthomorphic_Center (variant B), Equidistant_Cylindrical, Behrmann, Equal_Earth, ESRI's Krovak (south orientated, or north orientated with X_Scale -1 and XY_Plane_Rotation 90), a two-parallel Lambert_Conformal_Conic with a scale factor (2SP Michigan), and the EPSG parameter names PROJ writes for some of them (Transverse_Mercator_South_Orientated, Lambert_Azimuthal_Equal_Area, Azimuthal_Equidistant, Lambert_Conformal_Conic_2SP_Belgium, New_Zealand_Map_Grid); `Hotine_Oblique_Mercator_Azimuth*without a rectified grid angle use the azimuth, as PROJ does. Still refused:IGAC_Plano_Cartesiano(Colombia Urban; proj4rs differs from PROJ by about 1 m there, also for EPSG:6244),Local,Cylindrical_Equal_Areawith EPSG parameter names (PROJ ignores the standard parallel), a non-polarStereographic, andTransverse_MercatorwithDirection/Vertical_Shift`. Over the 5 330 projected EPSG CRSs written as WKT1_ESRI (area-of-use centre, one point each) 1 007 were refused before and 35 are now; the CRSs that newly differ from pyproj (26) are the datum deviations above (Ferro, Jakarta, Bern, RD/83, Potsdam, Qatar 1948, ...), not the projection. Any other datum is left unshifted, which is PROJ's ballpark and what pyproj does for a custom datum.

  • Labels. A definition with an identifier that the tables have is that code (EPSG:5515). Any other definition is its own label: the canonical JSON text (or the WKT text as given), which resolves again to the same CRS, so set_crs, to_crs, crs_equivalent and the compatibility checks of joins and overlays work on it. crs_to_authority (GeoParquet) and Shapefile .prj / GeoPackage use the identifier or the WKT text.

  • Codes outside the crs-definitions table. The table is older than the registry: 851 non-deprecated geographic 2D and projected codes were missing (568 Transverse Mercator, 143 geographic, 41 Lambert conic 2SP, 32 Colombia Urban, 24 Lambert conic 1SP, ...), and it lists neither 3D geographic CRSs nor, for the most part, geocentric or compound ones. A supplementary table, crs_extra.bin, holds the PROJJSON of every non-deprecated EPSG geographic (2D and 3D), geocentric, projected and compound CRS the table lacks, and of the two entries it leaves without a proj string (22300, 29701): 1 217 CRSs, 1.55 MB of minified JSON without the text fields (scope, area, remarks, bbox), 51 KB deflate-compressed (flate2 is already in the tree through zip and parquet). It is generated from proj.db by generate_crs_datum.py extra_table, inflated on first use, read by the converter like user PROJJSON and written as full PROJJSON to GeoParquet (pyproj reads it). The release NIF (libgeoframe_native.so, unstripped) grows from 38 394 160 to 38 662 976 bytes (+269 KB, 0.7 %): the 51 KB table, the larger Helmert and name tables, the converter and the new projections. The data are the EPSG dataset (see NOTICE for the attribution and terms of use). A second table, crs_extra_wkt1.bin (generate_crs_datum.py extra_wkt1, pyproj to_wkt("WKT1_GDAL"), 641 KB of text, 34 KB deflate-compressed), holds the OGC WKT1 of the 1 098 of those 1 217 codes PROJ can write as WKT1, so Shapefile .prj and GeoPackage gpkg_spatial_ref_sys.definition carry a definition for them like for the other codes (GeoPandas/pyogrio reads them back as the same EPSG code). The other 119 (Krovak Modified, 3D geographic, geocentric and compound CRSs, which have no WKT1 form) keep the old behaviour: no .prj and a warning for a Shapefile, an undefined definition and a warning for a GeoPackage.

  • Tests. crs_convert.json (generate_crs_datum.py convert): 42 CRSs as PROJJSON without an identifier, 12 as WKT1, 13 as WKT2, and 4 codes from the supplementary table, against pyproj within 1 cm (Laborde 5 cm, Hyperbolic Cassini-Soldner inverse 10 cm: PROJ evaluates series there); the whole registry through the sweep above.

  • Not done. Vertical or geoid grids and 3D shifts (heights stay unchanged); NADCON .las/.los text grids and NTv1 (only the .tif conversions and NTv2 are read); pyproj.sync-style downloads and PROJ_NETWORK; pipelines; operations through an intermediate CRS that change the prime meridian between Helmert steps (Tokyo 1892, MGI (Ferro)); PROJ's area test in the projected coordinates (a point just outside the geographic area of use); Local Orthographic (EPSG:10622), Bonne, Polar Stereographic C, Tunisia Mining Grid and Transverse Mercator Zoned Grid System as definitions; WKT1 for the 119 supplementary codes that have no WKT1 form (3D, geocentric, compound, Krovak Modified).

11. Spatial index and joins

GeoPandasGeoPolars devGeoFrameStatusNotes
sindex / has_sindexno(internal rstar)โ›”built per call, not a persistent object
sindex.querynosindex_query/4โœ…input = series or list of WKT: {input_idx, tree_idx}; single WKT string: list of tree indices; predicates incl. :dwithin w/ :distance; sort: accepted (output always ordered); output_format="dense" not offered
sindex.nearestnosindex_nearest/3โœ…:max_distance, :exclusive, returns distances
sindex.intersection (bbox)nosindex_intersection/2โœ…envelope test, linear scan over bounds (no persistent tree)
sindex.valid_query_predicatesnosindex_valid_query_predicates/0โœ…list of atoms; :disjoint excluded
sindex.size, sindex.is_emptynoโ€”โ›”no persistent index object
sjoinnosjoin/3โœ…how inner/left/right, predicate, distance, suffixes (the index column is index_<rsuffix>, index_<lsuffix> for a right join). Secondary geometry columns of both frames are attributes: suffixed on a clash, null for unmatched rows, their own CRS kept (issue #93); they come after the active geometry, where GeoPandas keeps the original column position
sjoin_nearestnosjoin_nearest/3โœ…max_distance, distance_col, exclusive, how; secondary geometry columns as in sjoin
GeoSeries.cx / GeoDataFrame.cxnoGeoSeries.cx/5, GeoDataFrame.cx/5 (+ read_flatgeobuf(bbox:))โœ…nil bound = unbounded; exact intersects against the box

12. GeoDataFrame specifics

GeoPandasGeoPolars devGeoFrameStatusNotes
GeoDataFrame(...)DataFrame + geometry columnGeoDataFrame.new/3โœ…
from_featuresโ€”GeoDataFrame.from_features/2โœ…list or FeatureCollection; crs:, columns:, geometry_column:; GeoJSON inference; property columns in first-appearance order across features (verified against GeoPandas 1.2) when the properties are ordered (keyword list, {key, value} pair list, or JSON decoded with Jason.decode!(json, objects: :ordered_objects)); plain Elixir maps carry no order and give columns sorted by name. The geometry column comes last (GeoPandas: first)
from_arrow / to_arrowgeoarrow nativeGeoDataFrame.from_arrow/2, to_arrow/2โœ…see ยง1; interchange verified against GeoPandas 1.2 / pyarrow 26 both ways
from_postgis / to_postgis / read_postgisroadmapGeoFrame.read_postgis/3, to_postgis/4 (+ !), GeoDataFrame.from_postgis/3, to_postgis/4โœ…optional Postgrex; EWKB with SRID; see Batch G2; verified against GeoPandas 1.2 both ways
to_geo_dictโ€”GeoDataFrame.to_geo_dict/2, GeoSeries.to_geo_dict/2, to_geo_interface/1, to_json/2, to_geojson/1โœ…to_geo_dict(frame, na:, show_bbox:, drop_id:) with GeoPandas' defaults (na: :null | :drop | :keep, show_bbox: false, drop_id: false; the series variant defaults show_bbox: true); :keep leaves nil/:nan as Explorer yields them; to_geo_interface/1 is __geo_interface__ (bboxes, ids); to_geojson/1 is the plain features list. Elixir-inherent: secondary geometry columns are properties holding GeoJSON geometry maps (GeoPandas keeps the shapely objects there)
iterfeaturesโ€”โ€”โ›”Python generator
to_jsonโ€”to_json/2, write_geojsonโœ…FeatureCollection string; na: :null | :drop, show_bbox:, drop_id:, to_wgs84:; na: :keep is rejected (it would emit NaN, not JSON); reference-tested through the series variant. A frame with secondary geometry columns raises ArgumentError (GeoPandas: TypeError, a shape is not JSON serializable)
to_wkb, to_wkt (frame)yesGeoDataFrame.to_wkb/2 (hex:, srid:), to_wkt/2, to_explorer(encoding: :wkb/:wkt)โœ…an Explorer.DataFrame with every geometry column (active and secondary) encoded, attributes unchanged, geometry columns last; hex: true gives hex strings, srid: PostGIS EWKB (GeoPandas include_srid). The other shapely keyword arguments (rounding_precision, trim, output_dimension, byte_order) are not supported
rename_geometryโ€”GeoDataFrame.rename_geometry/2โœ…renames the active geometry column; an existing column name (the same name included) raises ArgumentError "Column named <name> already exists" (GeoPandas ValueError); no inplace (immutable)
set_geometry, active_geometry_name, extra geometry columnsset_geometry (name or series, drop) yesset_geometry/3 (drop:, series with geometry_column:), put_geometry/3, geometry_columns/1, geometry/1, pull/2, names/1๐ŸŸกone active geometry plus secondary GeoSeries columns, each with its own CRS (issue #61); take/head/tail/slice/filter_with/sort_with/sample/shuffle/distinct/drop_nil/cx/join/concat_rows/explode/select/discard/rename/put keep them aligned; to_crs/set_crs act on the active one (as GeoPandas); clip, overlay, sjoin, sjoin_nearest and dissolve carry them like GeoPandas (issue #93; see their rows)
crs / set_crs / to_crs / estimate_utm_crsyesโœ…โœ…
explodenoexplode/2โœ…see ยง6
dissolve, sjoin, sjoin_nearestnoโœ…/๐ŸŸกsee ยง9/ยง11
clip, overlaynoclip/3, overlay/3 (also on GeoFrame)โœ…see ยง5
pandas ops (head, tail, take, select, rename, filter, sort, mutate, drop_duplicates, dropna, sample, shape, dtypes)polarshead, tail, take, slice, select, discard, rename, put, pull, filter/filter_with, sort_by/sort_with, mutate/mutate_with, distinct, drop_nil, sample, shuffle, shape, n_columns, dtypesโœ…wraps Explorer; filter/mutate/sort_by are macros (require GeoFrame.GeoDataFrame) whose query sees attribute columns only; geometry follows every row change; pull(gdf, geometry_column) returns the GeoSeries, dtypes maps it to :geometry; GDF-level delegation of geometry methods exists for area, length, bounds, centroid only; others via gdf.geometry
index/groupby/apply/concat of GDFspolarsGeoFrame.concat/1, GeoDataFrame.concat_rows/1, GeoSeries.concat/1๐ŸŸกrow-wise concat done (CRS and geometry column must match); grouping through group_by/summarise/group_map (see ยง9, Grouping)
merge (attribute join)polarsGeoDataFrame.join/3, GeoFrame.merge/3โœ…how: inner/left/right/outer/cross via Explorer; right is a DataFrame or GeoDataFrame (its geometry is dropped, single geometry column); left geometry follows rows, null for right-only rows. Deviations: :outer puts left-only rows last (pandas sorts by key) and keeps k/k_right instead of coalescing; inner/left/right match pandas row order

13. I/O

GeoPandasGeoPolars devGeoFrameStatusNotes
read_parquet (GeoParquet)from_geoparquet, geoparquet_metadata yesread_parquet/2 (columns:, bbox:)โœ…every geometry column declared in geo is decoded: the primary_column is the active geometry, the others are secondary geometry columns with their own CRS (a columns: list selects them by name; bbox: filters rows on the primary); covering bbox column never surfaced; bbox: prunes row groups and filters rows with a covering column or native encoding, else filters after decoding
to_parquetwrites yes, with_covering bboxwrite_parquet/3โœ…secondary geometry columns are written after the active one, each with its own geo entry (encoding, CRS, bounds); write_covering_bbox: adds the covering column for the active geometry only (GeoPandas declares one for every column, but then lists the extra covering columns as attributes on read); compression: (snappy, zstd, gzip, lz4, brotli, none) + compression_level:, row_group_size:, geometry_encoding: :wkb | :geoarrow, write_covering_bbox:, schema_version: "1.0.0" | "1.1.0"; no index/partition options; complete PROJJSON (top-level type, so geopandas.read_parquet parses it) for EPSG:4326/4269/3857, WGS 84 UTM zones and every other EPSG code in the bundled table (geographic incl. 3D, geocentric, projected and compound CRS, translated from the table's WKT1/WKT2; all 6 176 converted codes parse in pyproj, and a datum-shifted BOUNDCRS entry is written as its source CRS, like pyproj names the code; 8 codes the table leaves empty keep the stub; 14 differ numerically from pyproj's own definition because the table lacks a datum shift or stores a parameter in other units: EPSG:2062, 3167, 3752, 3973, 3974, 6622, 6624, 6996, 6997, 22032, 22092, 22700, 26591 and 26592); projected axes are easting/northing, so pyproj needs to_epsg(min_confidence=20) to name EPSG:3035 and EPSG:3031; a code outside the table (or another authority) is an identifier-only PROJJSON stub that GeoFrame reads back but pyproj rejects: pass the PROJJSON string as the CRS to write any definition (issue #50)
read_feather / to_featherโ€”read_feather/2, write_feather/3โœ…Feather v2 (Arrow IPC file), geoarrow.wkb + geo metadata like GeoPandas, optional native encoding; lz4 (default), zstd, uncompressed; record_batch_size: (rows per Arrow record batch, default 65 536 = the chunksize default of pyarrow's write_feather, which to_feather calls, so a 150 000-row file has the same 65 536 / 65 536 / 18 928 batches as GeoPandas'; a smaller size lets stream_file/2 read the file in bounded memory), also on to_arrow; reads GeoPandas files. Every geometry column is written (own CRS and geo entry) and read back as a secondary column, also through to_arrow/from_arrow (issue #93)
read_filenoread_file/2โœ…dispatch by extension or driver:: parquet, geojson, flatgeobuf, feather (.feather, .arrow), shapefile (.shp, .zip), gpkg; layer: and encoding: reach the format reader; rows: n | first..last as GeoPandas rows=int|slice (first..last is inclusive, so 5..14 is slice(5, 15)): the result equals read_file/2 then slice/3, read through the stream_file/2 readers (GeoParquet skips row groups and pages, FlatGeobuf skips features undecoded, Feather skips record batches, the others read past the rows in bounded chunks; GeoJSON still scans the file once to infer types); with bbox: the window counts the rows that pass; rows: 0 is an empty frame (pyogrio: no limit), and a negative value, a step other than 1 or a decreasing range raises ArgumentError (GeoPandas ValueError); a count beyond the file's rows gives the whole file; bbox: {minx, miny, maxx, maxy} for GeoParquet, FlatGeobuf, Shapefile, GeoPackage and GeoJSON: GeoParquet filters on the bounding box (covering column, as read_parquet), the GDAL formats keep the features whose geometry intersects the box, not just their envelope (checked against GeoPandas 1.2 / pyogrio 0.13 / GDAL 3.12: 480 random line and polygon cases over GeoPackage, GeoJSON, FlatGeobuf and Shapefile agree, plus a table of envelope-only cases); Shapefile, GeoPackage and GeoJSON are read through the stream_file/2 readers and concatenated, with rows: counting the rows that pass; Feather has no bbox: (GeoPandas read_feather has none and pyogrio has no Arrow driver); mask: is not supported; inverted bounds raise ArgumentError except for FlatGeobuf (empty result); formats that need GDAL are listed below
stream_fileno streaming API; pyogrio has read_arrow / open_arrow (Arrow batches, batch_size)stream_file/2 (batch_size:, columns:, bbox:, layer:, encoding:, geometry:, driver:)โœ… for GeoParquet, FlatGeobuf, Arrow IPC / Feather, Shapefile, GeoPackage and GeoJSONa lazy Stream of GeoDataFrame batches over a NIF reader resource (opened on first enumeration, next_batch on a dirty IO scheduler, closed when the stream ends, halts early or its consumer raises, and on garbage collection as a safety net); every batch has batch_size rows (the last fewer), regardless of the Parquet row group or Arrow record batch size, and the CRS, dtypes and geometry column name read_file/2 gives, so the batches concatenate to the whole read; bbox: has the read_parquet/2 (bounding box; covering column / native encoding prunes row groups, else filtered per batch) and read_flatgeobuf/2 (packed R-tree, error without; then the geometry is checked against the box) semantics, uses a GeoPackage layer's R-tree when there is one (the geometry is checked per row either way) and filters a Shapefile per record and a GeoJSON feature per feature (no index); every format but GeoParquet keeps the features whose geometry intersects the box, as GDAL's spatial filter and so read_file(bbox=...); columns: for GeoParquet, Feather and GeoPackage; Feather is read one Arrow record batch at a time (memory is bounded by the file's record batch size; GeoFrame writes batches of 65 536 rows unless write_feather(record_batch_size:) says otherwise, files written before 0.2.0 hold one batch); Shapefile reads the .shp record by record and the .dbf in matching chunks, skipping deleted records, and extracts a .zip to a scratch directory in the system temp dir that is removed when the stream closes; GeoPackage pages through the primary key (WHERE key > ? ORDER BY key LIMIT ?, O(n) in total) and settles column types that depend on the cells with a first pass over those columns; options are those of the format's reader plus batch_size:; GeoJSON (a FeatureCollection) is cut into features by a byte scanner and parsed one at a time, and because read_file/2 infers each property's type over all features the file is read twice (a first pass O(n) time and O(1) memory fixes the columns, their order and dtypes and whether every feature has an id, so a late feature that changes a type or adds a property is reflected in every batch; bbox: does not narrow it); a lone Feature or geometry is one row read whole; GeoJSONSeq is not supported by read_file/2 either, so it does not stream
to_filenowrite_file/3โœ…same formats; layer: and mode: for gpkg. GPKG, GeoJSON, FlatGeobuf and Shapefile (and to_postgis) raise ArgumentError for a frame with secondary geometry columns, as GeoPandas to_file raises ValueError: GeoDataFrame contains multiple geometry columns ... (issue #93)
GeoJSON read/writeroadmapread_geojson, write_geojsonโœ…Z is the third ordinate on both sides (RFC 7946); positions with 3 or more values read as Z and values past the third are ignored (GDAL does too), a two-value position inside a 3D geometry or collection member gets Z = 0, as GDAL reads it; M has no GeoJSON form and is dropped on write; a NaN Z is written as a two-value position (JSON has no NaN); GeoSeries.to_geojson carries Z too; see Z and M
FlatGeobuf read/writenoread_flatgeobuf (bbox), write_flatgeobufโœ…Z and M: the header has_z/has_m flags are set when any row has the ordinate and each feature carries one Z/M value per vertex; rows with fewer ordinates are promoted (Z = 0 for a missing Z, as GDAL writes it; NaN for a missing M; GDAL refuses mixed files on write and reads a promoted one); the reader fails with an error on a file whose header declares Z or M that a feature lacks (the crate would panic). A null row (or an empty point) is a feature without a geometry field, which is how GDAL writes and reads a null; the flatgeobuf crate always emits an empty geometry table, so the finished file is rewritten to drop it and, with an index, the leaf offsets are updated and the tree rebuilt (GDAL itself refuses to write a null row into an indexed file but reads one); see Z and M
read_file_info, list_layersnoGeoFrame.read_file_info/2, GeoFrame.list_layers/2โœ…list_layers returns a DataFrame name, geometry_type (pyogrio names; attribute tables have nil); read_file_info returns a map shaped after pyogrio read_info (driver, layer, crs, encoding, geometry_type, features, total_bounds, fields, dtypes). GPKG and Shapefile answer from metadata, every other format is read in full; verified against the GeoPandas-written fixtures. A GeoPackage layer declared with a curve type (CIRCULARSTRING, COMPOUNDCURVE, CURVE, CURVEPOLYGON, SURFACE, MULTICURVE, MULTISURFACE) reports the linear type of the rows it reads as, like pyogrio (LineString, Polygon, MultiLineString, MultiPolygon; Z and M suffixes kept); see Curved geometries
Shapefile (ESRI Shapefile)roadmap "GDAL vector files"read_shapefile/2, write_shapefile/3 (+ !), .zip bundlesโœ…pure Rust (shapefile 0.9 reads shapes; .shp/.shx/.dbf are written here: the crate cannot write null shapes and hides dBase decimals); .prj <-> EPSG (authority, ESRI/OGC names, UTM; other WKT kept verbatim, unknown codes write no .prj and warn), .cpg UTF-8/ASCII/ISO-8859-1/CP1252, GDAL field-name truncation (10 bytes, _1 suffixes), one geometry type per file (mixed frames raise ArgumentError), polygon rings oriented per spec, Z and M (PointZ/PolyLineZ/PolygonZ/MultiPointZ 11/13/15/18 when a column has Z, the M types 21/23/25/28 for M only, Z and M ranges in header and records; a Z file gets an M section only when a vertex has a measure, as GDAL writes; NaN measures are no data and read back as NaN; a 2D row in a Z file writes Z = 0, as GDAL; a shape with measures in a Z type reads as XYZM, per feature as GDAL); no memo fields, multipatch or .sbn/.qix indexes; see Z and M
GeoPackage (GPKG)roadmap "GDAL vector files"read_gpkg/2, write_gpkg/3 (+ !)โœ…rusqlite with bundled SQLite (C, the only C code compiled); OGC 1.3 tables, GP blob header + envelope, typed columns, rtree index and triggers (ST_* functions registered), layer:, mode: :w | :a, several layers per file, spatial_index:; no single-to-multi promotion (GDAL promotes), Z and M (WKB keeps both; gpkg_geometry_columns.z/.m are 0, 1 or 2 from the rows, where GDAL writes 1 for a layer that also holds 2D rows; appended rows of another dimension turn the flag into 2; blob envelopes carry the Z/M ranges with indicator 2, 3 or 4 as GDAL does for lines and polygons, and every point gets an envelope where GDAL writes none), no tiles/rasters/attribute-table writes/extensions other than rtree; verified both ways with GeoPandas 1.2 / GDAL 3.12
Other OGR drivers (GML, KML, GPX, DXF, MapInfo, FileGDB, ...)no-โ›”need GDAL (C++) or a parser per format; convert with ogr2ogr first
read_postgis / to_postgisroadmapGeoFrame.read_postgis/3, to_postgis/4โœ…see ยง12
GeoSeries to_arrow / from_arrowyesGeoSeries.to_arrow/2, from_arrow/2โœ…see ยง1

14. Tools

GeoPandasGeoPolars devGeoFrameStatusNotes
points_from_xypoint from columnsGeoFrame.points_from_xy/3โœ…alias of GeoSeries.from_xy/3
geocode, reverse_geocodeโ€”โ€”โ›”needs network geocoding service (geopy)
tools.collectโ€”collect/2โœ…one-row series; multi: option
tools.clipโ€”GeoFrame.clip/3โœ…see ยง5
tools.overlayโ€”GeoFrame.overlay/3โœ…see ยง5
tools.sjoin, sjoin_nearestโ€”โœ…โœ…
tools.make_gridโ€”GeoSeries.make_grid/3โœ…see ยง6
tools.geocodeโ€”โ€”โ›”

15. Plotting / interaction

GeoPandasGeoPolars devGeoFrameStatusNotes
plot (matplotlib)โ€”GeoFrame.Kino.map/2, Kino.Render (MapLibre)โ›”replaced by Livebook map; max_map_features and max_map_vertices caps (the Table tab is capped too: max_table_rows, max_table_vertices); GeometryCollections are drawn member by member
explore (folium)โ€”GeoFrame.Kino.deck/2 (deck.gl, binary buffers), GeoFrame.Kino.map/2 (MapLibre), Smart Cells "Read spatial file" and "Spatial join"๐ŸŸกdeck widget: hover tooltips, click popups (popup: true or a list of columns, anchored at the click, closable, values shown as plain text), color by column (viridis ramp or categorical) with a legend: card (gradient bar with ticks, or capped swatches), size/width by column, fit bounds, Carto basemap, metric and imperial scale bars (scale:); several frames as layers (deck([gdf1, {gdf2, name: "B", color: ...}]), each with its own style, legend, tooltip and popup, :max_features/:max_vertices summed over layers) with a checkbox layer control, like m = gdf1.explore(); gdf2.explore(m=m) plus folium.LayerControl(); not folium: tile-layer switching, draw/measure plugins
previewโ€”preview/1โœ…GeoFrame-only

16. Testing

GeoPandasGeoPolars devGeoFrameStatusNotes
testing.assert_geoseries_equalโ€”GeoFrame.Testing.assert_geoseries_equal/3โœ…topological by default, check_less_precise uses exact with 1e-6; check_crs, check_geom_type, normalize
testing.assert_geodataframe_equalโ€”GeoFrame.Testing.assert_geodataframe_equal/3โœ…adds check_dtype; column order must match; secondary geometry columns are compared with their CRS (issue #93)

17. GeoPolars-only members not covered elsewhere

GeoPandasGeoPolars devGeoFrameStatusNotes
โ€”area_geodesicarea_geodesic/1โœ…see ยง2
โ€”wrap_longitudewrap_longitude/1โœ…x into [-180, 180); geographic or no CRS; geometries are not split at the antimeridian
โ€”skew, skew_about_centroidskew/4 (origin: :centroid)โœ…see ยง7
โ€”null_out_invalidnull_out_invalid/1โœ…see ยง3
โ€”count_coordinatescount_coordinates/1โœ…
โ€”is_ccwis_ccw/1โœ…see ยง3
โ€”mean_coordinatemean_coordinate/1โœ…see ยง2
โ€”affine_transformaffine_transform/2โœ…see ยง7
โ€”rotate_about_centroid, scale_about_centroidrotate/scale with origin: :centroidโœ…
โ€”is_geographicis_geographic/1โœ…see ยง2
โ€”rings_overlap, self_intersectsself_intersects/1๐ŸŸกsee ยง2; rings_overlap โ›” out of scope (undocumented semantics, no GEOS/Shapely source in the snapshot)
โ€”with_covering (GeoParquet bbox covering)write_parquet(write_covering_bbox: true)โœ…see ยง13
โ€”geoparquet_metadataGeoFrame.geoparquet_metadata/1, geoparquet_metadata!/1โœ…the geo footer key as a decoded map (string keys), exactly as stored; reads only the Parquet footer
โ€”is_close (internal)โ€”โ›”internal helper

Gap summary and proposed batches

Status counts: see bottom of this file (computed by script).

Verified geo 0.33.1 traits (in ~/.cargo/registry/src/*/geo-0.33.1/src/algorithm/): ConcaveHull, Voronoi, TriangulateDelaunay/TriangulateDelaunayUnconstrained/TriangulateSpade/TriangulateEarcut, HausdorffDistance, FrechetDistance (line_measures), LineInterpolatePoint, LineLocatePoint, MinimumRotatedRect, ChaikinSmoothing, Densify (line_measures), RemoveRepeatedPoints, InteriorPoint, Orient, Validation, MakeValid (repair_polygon), KMeans, SimplifyVw*, GeodesicArea, Geodesic metric space (line_measures/metric_spaces/geodesic.rs, with Length/Distance), Skew, AffineOps/AffineTransform, Haversine/Rhumb/Vincenty*, Stitch. NOT in geo: line_merge, polygonize, offset_curve, snap, minimum_bounding_circle, shortest_line (compose from ClosestPoint), simplify_coverage (implemented here in batch I3), normalize (implemented here in batch I1).

Ordered by user value; each batch roughly one PR (400-800 authored lines).

Batch A - Constructors and extraction (high value, easy)

  • Members: from_xy / points_from_xy (+ z), GDF from_features, get_coordinates, count_geometries, count_interior_rings, get_geometry, interiors, extract_unique_points, collect, mean_coordinate, isna/notna/fillna, is_closed, is_ring, is_valid_reason, null_out_invalid, to_wkb(hex: true).
  • Crates/traits: geo-types constructors, CoordsIter, Validation (reasons), existing Native.unary plumbing.
  • Difficulty: low. Mostly Elixir plus small NIFs; unblocks real-world data entry (lat/lon columns).

Batch B - Overlay-family: explode, clip, overlay, intersection_all (done)

  • Members: explode (Series+GDF, index_parts), clip, clip_by_rect, intersection_all, overlay (how: intersection/union/identity/symmetric_difference/difference), fix set-op lower-dimension and mixed-dimension gaps (๐ŸŸก in ยง5).
  • Crates: geo::BooleanOps (i_overlay), MultiPolygon conversion, existing sindex, Intersects.
  • Difficulty: medium-high (attribute assembly in Elixir, same pattern as sjoin; lower-dim results need i_overlay options or custom handling).

Batch C - Linear referencing and linestring ops (medium-high value, easy-medium)

  • Members: interpolate, project, segmentize, remove_repeated_points, reverse, orient_polygons, is_ccw, line_merge, shortest_line, hausdorff_distance, frechet_distance.
  • Crates: LineInterpolatePoint, LineLocatePoint, Densify, RemoveRepeatedPoints, Orient, HausdorffDistance, FrechetDistance, ClosestPoint; line_merge own implementation (endpoint adjacency graph).
  • Difficulty: low except line_merge and shortest_line (medium).
  • Status: done (issue #38). Deviations: hausdorff_distance follows GEOS (vertex to whole geometry) instead of geo's vertex-to-vertex trait; remove_repeated_points with a tolerance and interpolate for multi-part lines are own code; frechet_distance takes every geometry type since 0.2.0.

Batch D - Affine completeness and per-row parameters (medium value, easy)

  • Members: skew, affine_transform, per-row (column) offsets/angles/origins for translate/scale/rotate/skew, wrap_longitude, is_geographic.
  • Crates: geo::Skew, AffineOps/AffineTransform, proj4rs.
  • Difficulty: low.

Batch E - Constructive geometry (done)

  • Members: concave_hull, minimum_rotated_rectangle, minimum_bounding_circle, minimum_bounding_radius, maximum_inscribed_circle, make_grid, delaunay_triangles, constrained_delaunay_triangles, voronoi_polygons, sample_points.
  • Crates: ConcaveHull, MinimumRotatedRect, Voronoi/TriangulateDelaunay/TriangulateSpade (spade), polylabel (check geo feature flag) for inscribed circle, rand for sampling; bounding circle via own Welzl.
  • Difficulty: medium (Voronoi/Delaunay are collection-valued: decide on output shape).
  • Status: done (issue #46). make_grid is a GeoPandas 1.2 member (square and hexagon) and was added to the batch. Own code instead of the planned crates: the concave hull is a port of the GEOS/JTS algorithm (geo's ConcaveHull takes a concavity, not Shapely's ratio, and has no holes), the bounding circle is Welzl, the inscribed circle is the JTS cell search (geo has no polylabel), Voronoi cells are half-plane clipped from the spade triangulation, and sampling uses SplitMix64 (no rand dependency). Like GeoPandas, delaunay_triangles and voronoi_polygons treat the whole series as one point cloud and return one row per triangle, cell or edge. Deviations: see the Batch E item under Reference testing.

Batch F - Geodesic measurement (medium value, medium)

  • Members: area_geodesic, geodesic length, geodesic distance (a method: option), GeoSeries.dwithin geodesic variant optional.
  • Crates: geo::GeodesicArea, Geodesic metric space with Length/Distance (geographiclib-rs already in the registry), or Haversine.
  • Difficulty: medium (CRS gating: require geographic CRS; reproject projected inputs first).
  • Status: done (issue #40). Deviations: WGS 84 only (other geographic datums are measured on WGS 84); nil CRS raises, projected CRS is reprojected to lon/lat; geo's unsigned area returns the ellipsoid complement for clockwise rings, so polygons are oriented first; geodesic distance for non-point pairs is an approximation (planar nearest points in lon/lat, then geodesic distance between them).

Batch G - I/O breadth (high value for adoption, hard)

  • Issue #61 status: done. GeoParquet files with several geometry columns used to crash the reader (the NIF panicked on the second geometry extension type; the issue had described silent binary columns). Decision: GeoPandas model, one active geometry plus secondary GeoSeries columns held by the GeoDataFrame (secondary_geometries), not a map of equals and not WKB blobs in data, so row verbs keep them aligned and each has its own CRS. Fixtures: test/reference/fixtures/io/multi/ (GeoPandas 1.2, WKB, native, covering), 3 files in scripts/crosscheck_io.sh. Follow-up done in issue #93 (next entry).
  • Issue #93 status: done. Verified in GeoPandas 1.2 before coding: sjoin/sjoin_nearest keep both frames' other geometry columns as ordinary columns (suffixed _left/_right on a clash, null for unmatched rows, own CRS), overlay keeps both (_1/_2) and difference only df1's, clip keeps them unclipped, dissolve aggregates them (first/last skip nulls, count gives an integer, sum/min/max/mean raise TypeError; by a geometry column works in pandas but raises here), to_feather/to_arrow keep all, to_file (GPKG, GeoJSON, FlatGeobuf, Shapefile, GeoJSONSeq) raises ValueError: GeoDataFrame contains multiple geometry columns but GeoDataFrame.to_file supports only a single geometry column, to_json raises TypeError, assert_geodataframe_equal compares every geometry column including its CRS. GeoFrame matches all of it: 25 verb cases (fixtures/multi_verbs.json, generate_multi_verbs.py), GeoPandas-written Feather/Arrow files (fixtures/io/multi/), GeoFrame-written ones read in GeoPandas (scripts/crosscheck_io.sh, 100 files). Deviations: the secondary columns come after the active geometry (GeoPandas leaves each at its original position); dissolve by a geometry column raises; to_postgis refuses such frames (GeoPandas fails inside the driver). A side fix: the join index column is named index_<rsuffix> (index_<lsuffix> for a right join), as in GeoPandas.
  • G1 status: done (issue #48). Arrow/Feather IO, GeoParquet write options and bbox: reads. Design and deviations: the geometry stays in Rust and tables move as Arrow IPC bytes (no C Data Interface on the BEAM); native geoarrow encoding needs one geometry kind like GeoPandas (single/multi mix is promoted to multi by this crate, because geoarrow-array 0.9 mishandles validity when a single geometry is pushed into a multi builder); the geoparquet 0.9 reader asserts one geometry type for native columns, so the type list is normalised from the encoding before reading (GeoPandas lists ["Polygon", "MultiPolygon"]); a read panic is returned as an error. EPSG:3857, EPSG:4269 and WGS 84 UTM zones are written as complete PROJJSON, because pyproj rejects identifier-only stubs; since issue #88 every other EPSG code in the bundled table is too (a projected CRS written as a stub made geopandas.read_parquet fail with Missing "type" key). Not done: index/partition_cols, Feather schema_version, geometry column order (still last).
  • G2 status: done (issue #51). read_postgis/to_postgis, EWKB in GeoSeries.from_wkb/to_wkb(srid:) (Rust: SRID and Z/M flags are rewritten to and from ISO WKB). postgrex is an optional dependency; GeoFrame.Postgrex.Extension (registered by the predefined types module GeoFrame.Postgrex.Types) decode a geometry column to its raw EWKB binary (text transfer format, because the binary geometry_send drops the SRID); bytea and hex text are detected without the extension. Writes are one transaction, EWKB bind parameters via ST_GeomFromEWKB, quoted identifiers, if_exists fail/replace/append, optional GiST index (spatial_index: true, off like GeoPandas). Deviations: mixed geometry types map to geometry(Geometry, srid) (single/multi are not promoted); index: must be false (no index); EWKB Z/M flags are parsed on read, but Z/M behaviour beyond that (and writing Z geometries to a 2D-typed column) is untested and belongs to batch I; geography columns are not handled; chunksize defaults to 1000 rows. Tests tagged :postgis run when GEOFRAME_POSTGIS_URL is set (CI service container); scripts/crosscheck_postgis.sh (dev-only) round-trips tables with GeoPandas 1.2 in both directions.
  • G2 follow-up (issues #55 and #56, batch B3): numeric reads as an exact {:decimal, precision, scale} series sized to the data (GeoPandas/pandas reads it as float64 and loses digits above 2^53, e.g. a u64 written as numeric(20, 0); a u64 column therefore comes back as decimal(20, 0), not u64). Fallbacks: a column with NaN/Infinity is float64, a column needing more than 38 digits (the Polars limit) is exact text. Empty and all-NULL columns take their dtype from the Postgres type OID (pandas gives object). Intervals (ISO 8601 text, P1Y2M3DT4H5M6S; pandas gives an approximate timedelta), ranges, inet, macaddr and geometric types are text; uuid is hyphenated text. Duplicate result column names are an error (pandas keeps both). A value that cannot be rendered (for example a bytea[]) is an {:error, message} naming the column. to_postgis(dtype:) accepts only a type name (optionally schema-qualified, multi-word types like double precision / timestamp(3) without time zone, (n, m) modifiers, []), never constraints such as PRIMARY KEY; a frame with more than 1600 columns raises ArgumentError (the PostgreSQL table limit).
  • G3 status: done (issue #53). read_shapefile/write_shapefile (+ zip), read_gpkg/write_gpkg, list_layers, read_file_info, and .shp/.zip/.gpkg in read_file/write_file. Design and deviations: shapes are read with the shapefile crate but .shp/.shx/.dbf are written by GeoFrame (the crate cannot write null shapes, and its dBase layer hides the decimal count and widens integers through f64); the CRS is mapped through the crs-definitions EPSG table plus a table of ESRI names, .prj files are written as OGC WKT1 (GDAL writes the ESRI flavour; both read back in GDAL); dBase field names are truncated like GDAL (checked against pyogrio); GeoPackage uses rusqlite with bundled SQLite, a C dependency that cc compiles into the NIF (no system SQLite or GDAL; the only C code in GeoFrame), and registers ST_MinX/ST_MaxX/ST_MinY/ST_MaxY/ST_IsEmpty so the rtree triggers work for appends to files from other tools; no CRS is stored as GDAL's "Undefined SRS" (99999) so GDAL reads it back as none; mode: :w replaces only the named layer (as pyogrio does); several layers need layer: on read (GeoPandas warns and takes the first); single and multi geometries are not promoted to multi on write. Not done: Z/M, memo and non-text dBase types, datetime types in Shapefile (stored as text), GeoPackage tiles/rasters/non-rtree extensions, fid_as_index, where/bbox filters on read, columns/rows selection. scripts/crosscheck_io.sh reads 23 more GeoFrame-written files in GeoPandas 1.2 / pyogrio (Shapefile, zip, GeoPackage incl. a rtree-backed bbox read), and 8 GeoPandas-written datasets (test/reference/fixtures/io/vector/: 5 Shapefiles incl. a zip, 2 GeoPackages with 3 layers) are read in CI.
  • Members: read_feather/to_feather, from_arrow/to_arrow, GeoParquet write options (compression, with_covering; geoparquet_metadata since batch I1), read_postgis/to_postgis, Shapefile and GeoPackage via read_file/write_file, list_layers, read_file_info, string to_json.
  • Crates: geoarrow-array, arrow-ipc, geoparquet, postgrex (Elixir side) or sqlx, pure-Rust shapefile, geozero (with-shp / with-gpkg features) or GDAL binding. Used in G3: shapefile 0.9 (reads), rusqlite 0.40 bundled, zip.
  • Difficulty: high. Split into G1 (Arrow/Feather + parquet opts), G2 (PostGIS), G3 (Shapefile/GPKG).

Batch H - Parity of comparison and testing (low-medium value, easy)

  • Members: geom_equals_exact, geom_equals_identical, contains_properly, relate_pattern, sindex.intersection, valid_query_predicates, cx/bbox filter, GeoFrame.Testing.assert_geoseries_equal / assert_geodataframe_equal, GDF concat.
  • Crates: geo::Relate, ContainsProperly (verify trait export), rstar.
  • Difficulty: low. Testing helpers are valuable for downstream users.

Batch I - Hard / low value (defer)

  • I1 status: done. Cheap members implemented natively and reference-tested: GeoSeries.to_file/from_file, to_json (series and frame), to_geo_interface, GeoFrame.geoparquet_metadata, is_simple/self_intersects, normalize, get_precision/set_precision, constructors from vertices; minimum_bounding_radius had landed with batch E (its row was stale). Deviations: set_precision modes valid_output/keep_collapsed do not node lines and merge overlapping parts of an invalid multipolygon (GEOS keeps, merges or raises on them by edge contact after snapping), the grid size is kept on the GeoSeries struct and only reported by the result of set_precision/3; to_json is compact JSON; na: :keep is rejected. Left open: rings_overlap (no definition available), the GeoPolars self_intersects semantics are inferred.
  • I2 status: done. offset_curve, snap, shared_paths, minimum_clearance/minimum_clearance_line, polygonize and build_area are implemented in pure Rust (no GEOS, no new crate) and reference-tested (1 858 new cases, 58 documented, none unexplained; see Reference testing). Hardening: offset_curve rejects quad_segs over 10,000 and any call whose estimated raw vertices exceed 10,000,000, offset_curve/polygonize cap their segment-pair work at 50,000,000 and snap its vertex x snap-point steps at 50,000,000 (see Resource limits); non-finite input gives null. Deviations: see Batch I2 above. Row fixes: get_geometry parts are covered by get_geometry/2 and explode/2; the chaikin-style smoothing row is โ›” (not in GeoPandas).
  • I3 status: done. is_valid_coverage, invalid_coverage_edges and simplify_coverage are implemented in pure Rust (no GEOS, no new crate; coverage.rs validates, coverage_simplify.rs simplifies) and reference-tested (805 new cases, 3 documented, none unexplained; see Reference testing). Hardening: the validator caps its segment pairs and point-in-polygon steps at 50,000,000 (an error), simplify_coverage accepts at most 10,000,000 vertices and 50,000,000 vertex-in-triangle checks (an error), rows with non-finite coordinates are null, a non-finite gap_width or tolerance is an error, geo panics are caught. Left open: z/m (done in Z1, see Z and M).
  • Members: simplify_coverage, snap, build_area/polygonize, shared_paths, offset_curve, minimum_clearance(_line), normalize, set_precision/get_precision, is_valid_coverage, invalid_coverage_edges, z/m dimension support (also has_z, has_m, force_3d).
  • Crates: mostly none in geo; would need GEOS (C dependency) or custom algorithms; geo-buf for offset_curve.
  • Difficulty: high. Z/M support turned out not to need a storage change (the GeoArrow union already held every dimension); it was done in Z1-Z5, see Z and M.

Empty member points

A MULTIPOINT or GEOMETRYCOLLECTION may hold an empty point (Shapely writes MULTIPOINT (EMPTY, (1 1)) to WKB with a NaN point, which is also how GeoArrow stores it). GEOS 3.14 gives such a member no part in a computation and keeps it as a member. Since 0.3.2 (geo_convert.rs) GeoFrame does the same; before, geo could not represent the row, so it was treated as missing (is_empty true, every measure and predicate null, count_geometries 0).

  • Computations leave the member out: is_empty (true only when every member is empty), count_coordinates, area, length, bounds, centroid, is_valid, is_simple, predicates, distance, convex_hull, buffer and every other geo-based function.
  • Structure keeps it: count_geometries, get_geometry, explode (the member comes back as POINT EMPTY, POINT Z EMPTY in a Z multipoint), the affine functions and force_2d / force_3d (the member stays empty), WKB, WKT (EMPTY) and every file format that can hold it (GeoParquet, Feather, Arrow, GeoPackage; Shapefile, FlatGeobuf and GeoJSON have no empty point and drop it).
  • Checked against Shapely 2.2 on 1 200 random multipoints and collections with empty members (is_empty, count_geometries, count_coordinates, area, length, bounds, centroid, is_valid, distance, intersects, convex hull and buffer areas, get_geometry(0), get_geometry(-1), explode): every value agrees except where every member is empty, where centroid and convex_hull are null (the null/empty class) instead of POINT EMPTY and an empty collection.
  • Deviation: the functions that rebuild a geometry through geo (normalize, simplify, segmentize, set_precision, ...) return it without the empty member. GEOS keeps it in normalize (as the last member) and drops it in set_precision; the geometry is the same.
  • A one-member collection is stored as its member (deviation 2 of Z and M), so GEOMETRYCOLLECTION (POINT EMPTY) is a top-level empty point, which geo cannot hold.

Z and M

  • Z1 status: done (issue #74). Storage already held XYZ, XYM and XYZM (the GeoArrow geometry union is dimension-aware); Z1 adds the API on top: has_z, has_m, z/get_z, m/get_m, force_2d, force_3d (Rust zm.rs: the dimension is read from the stored scalars, and forcing rewrites each geometry's ISO WKB, so every other ordinate is kept bit for bit). 360 reference cases (zm.json: points, lines, polygons with a hole, multi geometries, collections, empties of every dimension; 327 agree, 33 are the documented deviations below) compare with GeoPandas 1.2 / Shapely 2.2.
  • Round trips that keep Z and M (tested in zm_tests.rs and zm_test.exs; Z4 adds every file format, see below): WKB (ISO), WKT (POINT Z, POINT M, POINT ZM), EWKB (PostGIS flags), GeoParquet (WKB), Arrow IPC (WKB and native point encodings), GeoPackage, take, concat, fill_null.
  • WKT without a dimension tag (0.3.1, wkt_read.rs): an untagged geometry takes its dimension from its first coordinate, as GEOS 3.12+ does: three ordinates make POINT (1 2 3) a POINT Z, four make it ZM (never M). Every other coordinate of that geometry, in every ring and part, must have the same count, and a coordinate has at most four ordinates; anything else is an error, as GEOS raises ParseException. A collection member infers its own dimension, so GEOMETRYCOLLECTION Z (POINT (1 2 3)) is valid and GEOMETRYCOLLECTION M (POINT (1 2 3)) raises "cannot mix dimensionality", as in GEOS; an untagged collection follows deviation (1). Text that the wkt crate reads is never reinterpreted: the inference only runs when the first parse fails. 12 000 random WKT texts (untagged and tagged, 2 to 5 ordinates, consistent and mismatched counts, every type and collections of them) agree with Shapely 2.2 on which are accepted, and on has_z, has_m and every coordinate, except deviation (17). Deviation (17): the unparenthesized MULTIPOINT form with four untagged ordinates (MULTIPOINT (1 2 3 4, 5 6 7 8)) is ZM here, like its parenthesized form, where GEOS builds the points without M (MULTIPOINT Z ((1 2 3), (5 6 7)); inside a collection tagged ZM it even drops the collection's M). GDAL is not the reference for WKT text: it never infers M and fills a short coordinate with 0. Ordinates are read as GEOS reads them with strtod (0.3.1): NaN, inf and Infinity in any case and with or without a sign are numbers, and a literal beyond the double range is infinite, so the NaN that to_wkt writes for a promoted collection member (deviation 1) reads back; nan(1), 1.#INF and hexadecimal literals are errors (GEOS reads 0x10 as 16). 8 000 more random texts with NaN and infinite Z and M ordinates agree with Shapely in the same way, apart from deviation (17), which there includes GEOS taking the unparenthesized form's dimension from its values (MULTIPOINT M (0 0 NaN, 1 1 NaN) is 2D in GEOS). Deviation (18): POINT (NaN NaN) is POINT EMPTY here, the GeoArrow encoding of an empty point, where GEOS keeps a non-empty point (GEOS reads its own WKB of that point back as POINT EMPTY too). Empty members (0.3.2, wkt_read.rs and wkt_write.rs): a MULTIPOINT member written EMPTY (MULTIPOINT (EMPTY, (1 2)), only in the parenthesized form, as GEOS) is read as the empty point GeoArrow stores as a NaN point, which is also how GEOS writes it to WKB; to_wkt writes that member, an empty member line of a MULTILINESTRING and an empty ring of a POLYGON as EMPTY, as GEOS does, where the wkt crate panicked on the first and wrote an unreadable () for the others. On 8 885 accepted random texts (with empty members, non-finite ordinates and every type), Shapely reads every to_wkt output back as the geometry it read from the input, apart from deviations (1) and (17). A MULTIPOLYGON with an empty member polygon is still rejected: the GeoArrow builder cannot store it.
  • Deviations: (1) a GEOMETRYCOLLECTION whose members have different dimensions: GEOS keeps each member's own dimension, while a GeoArrow collection holds one, so every member is promoted to the collection's dimension with NaN for the ordinates it lacks (0.3.0 B10d; until then it was an error). The collection's dimension follows GEOS: Z when any member has Z, M when any has M, whatever the WKB header says; an empty point, line or polygon member counts with its own dimension, an empty multi geometry adds none. has_z, has_m, z, m, get_coordinates (NaN, as Shapely reports it) and force_2d agree; to_wkt / to_wkb print the promoted member with Z NaN (GEOMETRYCOLLECTION Z (POINT Z (1 2 NaN), POINT Z (3 4 5)) where Shapely prints POINT (1 2)), operations keep that NaN Z, and force_3d keeps it where Shapely fills the 2D member. In WKT, a member of another dimension inside a collection tagged Z, M or ZM (GEOMETRYCOLLECTION Z (POINT Z (1 2 3), POINT (3 4))) is an error, as GEOS raises "Cannot mix dimensionality in a geometry". GDAL fills a missing Z with 0 when it writes a file, so GDAL-written files hold no mixed collection; a GeoPackage blob written by another tool is read here by the GEOS rule (GDAL gives Z = 0 when the collection header says Z, keeps the members otherwise, and drops M unless the layer is measured). Nested collections remain unsupported (GeoArrow); (2) a one-member collection is stored as its member (existing behaviour), so z, force_*, to_wkb and to_wkt describe the member; (3) force_3d of an XYZM geometry keeps the Z and drops M, where Shapely 2.2 drops M and overwrites Z with the fill value; (4) an empty multi geometry or collection keeps its declared dimension (MULTIPOINT Z EMPTY), where Shapely discards it (part of the null/empty class).
  • Z2 status: done. The geo bridge now has a Z/M-carrying path (zm_bridge.rs). Vertex maps rewrite the ISO WKB of a row in place, so (x, y) is transformed and Z and M pass through or are transformed: the affine family and to_crs. Restoring runs the 2D algorithm and gives every surviving vertex the Z (and M) of the input vertex with exactly the same XY (first occurrence; NaN when none): simplify, normalize, boundary, exterior, get_geometry, explode, set_precision, snap. reverse reverses the WKB coordinate sequences. 2D columns do not pay for any of this. 1 154 reference cases in zm_ops.json (898 agree, 256 are documented; since B10d the fixture runs as one column, so the empty GEOMETRYCOLLECTION Z row keeps its Z as deviation 4 says) compare the result with GeoPandas as full WKT.
  • Policy per operation (observed in Shapely 2.2 / GEOS 3.14): Z kept and M dropped by translate (zoff), scale (zfact, about z = 0), rotate, skew, affine_transform (the 12-number form transforms Z; a 2D geometry only uses a b d e xoff yoff), to_crs (Z unchanged between non-geocentric CRSs, as PROJ; transformed to or from a geocentric CRS), simplify, set_precision(mode: :pointwise) and snap (the snapped vertex takes the reference vertex's Z, NaN when the reference has none; a vertex that coincides with a reference vertex takes its Z too). Z and M kept by reverse, normalize, boundary, exterior, interiors, get_geometry, explode and set_precision in the :valid_output and :keep_collapsed modes. Every other operation (envelope, centroid, buffer, offset_curve, minimum_rotated_rectangle, shortest_line, ...) returns 2D, where GEOS drops Z too. Z3 below covers interpolation, vertex-copying constructors and overlay.
  • Z2 deviations: (5) an XYZM geometry through the affine functions or to_crs: Shapely 2.2 returns NaN in both Z and M (a GEOS/Shapely quirk), GeoFrame keeps and transforms Z and drops M; (6) simplify(preserve_topology: false) on a polygon whose hole collapses was a deviation (geo kept the hole); fixed in #89, now it agrees; (7) snap of an M line with a Z reference gives Z in Shapely and 2D here, and set_precision of an M polygon leaves a NaN M on the closing vertex in GEOS where GeoFrame keeps M; (8) empty results follow the null/empty class (POINT Z EMPTY is not storable, an empty multi geometry keeps its declared dimension); (9) exterior is a LineString (no LinearRing type).
  • Z3 status: done (zm_overlay.rs, 19 unit tests in zm_overlay_tests.rs, 784 reference cases in zm_overlay.json: 744 agree, 40 are the documented deviations below). The 2D result is computed by geo as before and every vertex then gets its ordinates from a model of GEOS' OverlayNG built from the input rows: (1) a vertex that equals an input vertex takes its Z (and M); (2) a vertex on an input segment interpolates along it, and a crossing averages the interpolation on the two segments (a NaN end hands back the other end, as LineIntersector::zInterpolate); (3) Z that is still NaN is filled from the GEOS ElevationModel (the inputs' extent cut in 3x3 cells holding the mean Z of their vertices, an empty cell taking the mean of the others); M is interpolated the same way but never filled. Vertices geo moved by its output grid (about 1e-9 of the extent) are matched to the nearest input vertex within 1e-7 of the extent. Rows without Z and M take the old path, so 2D columns pay nothing.
  • Z3 policy found (Shapely 2.2 / GEOS 3.14): Z interpolated, M dropped by segmentize (a new vertex interpolates between the two input vertices it was inserted between, also where segments cross), interpolate and clip_by_rect (a row inside the rectangle comes back unchanged, M included; an empty result is 2D; corners GEOS adds inside a polygon take the elevation-model value). Z kept, M dropped by convex_hull, concave_hull, extract_unique_points, line_merge, delaunay_triangles, polygonize, build_area and representative_point of a line (a polygon or point gives a new 2D point). Z and M kept by remove_repeated_points and orient_polygons; make_valid keeps both for a valid geometry and Z only (with the averaged Z at new nodes) for a repaired one. Set operations, union_all, intersection_all, overlay, clip and dissolve follow OverlayNG: the result has Z and M when either input has them (M interpolated, NaN where an input has none). Points are not noded: they keep their own Z or take the elevation-model value (a point on a Z line is not interpolated). Inputs with disjoint extents are copied: a union leaves a 2D input NaN, a difference fills it. An empty result has Z when either input has a third ordinate after overlaying and only when both have one for disjoint extents, never M. 2D in GEOS and here: project/line_locate_point (a distance), centroid, envelope, buffer, offset_curve, minimum_rotated_rectangle, minimum_bounding_circle, minimum_clearance_line, shortest_line, voronoi_polygons.
  • Z3 deviations: (10) two inputs with a vertex at the same XY and different ordinates (a shared edge or corner, identical rings, a line vertex on a polygon vertex): GEOS' pick depends on its noding order and cannot be reproduced in general (over random inputs it keeps the first input's value for an intersection and the second's otherwise, which is what is implemented; the start vertex of an input ring even loses its M); 39 listed cases. (11) clip_by_rect of a polygon whose edge leaves and re-enters the rectangle: GEOS assigns Z to the vertices it adds on the rectangle boundary by its own walk along it (about 40 % of random polygons differ; lines and points agree, as do polygons whose edges cross once). (12) A vertex of a 2D polygon lying on an edge of a Z polygon is interpolated here where GEOS fills it from the elevation model (seen with a touching square; not in the corpus). (13) GEOS stores a collection whose members have different dimensions (a 2D polygon and a Z polygon in a union, a 2D point and a Z polygon) that GeoFrame cannot: every member gets Z, NaN where the input had none, the same promotion the readers apply since 0.3.0 B10d (deviation 1). (14) segmentize of an invalid polygon: GEOS repairs it first; a NaN Z vertex makes GEOS return 2D, here the NaN is kept. (15) shared_paths stays 2D and voronoi_polygons follows GEOS (2D). (16) The 2D differences already documented (line x line noding, polygon boundaries not noded by a line, empty point results as MULTIPOINT) are unchanged.
  • Still 2D: the operations GEOS also returns in 2D (shared_paths, voronoi_polygons).
  • Z4 status: done (zm_io.rs, 45 unit tests in zm_io_tests.rs, test/geo_frame/zm_io_test.exs, 23 fixtures in test/reference/fixtures/io/zm/, 35 more GeoFrame-written files in scripts/crosscheck_io.sh). Every file format keeps Z and M except GeoJSON (Z only, RFC 7946). The per-format rules are in the I/O table (section 13); in short: GeoJSON third ordinate; FlatGeobuf has_z/has_m and one Z/M value per vertex; Shapefile Z types 11/13/15/18 and M types 21/23/25/28 with Z and M ranges in the header and records; GeoPackage gpkg_geometry_columns.z/.m 0/1/2 and envelope indicators 2/3/4; GeoParquet and Arrow geometry_types with Z/M/ZM (the geoparquet crate already wrote them, tests pin it) and native GeoArrow columns with Z/M, where single and multi geometries are now promoted together by wrapping the WKB (the old XY-only limit is gone); the bbox in the geo metadata and the covering column stay 2D, like GeoPandas.
  • Z4 policy for mixed dimensions: rows of a column may differ in dimension everywhere a format can say so per row (GeoJSON, GeoPackage, GeoParquet/Arrow WKB). Formats with one dimension per file promote to the widest (FlatGeobuf: Z, M or both; a missing Z is written as 0, as GDAL writes a 2D row of a Z Shapefile, and a missing M is NaN). Native GeoArrow needs one dimension (an error otherwise, as before: GeoPandas cannot mix either). GeoJSON positions with two values inside a 3D geometry and the members of a collection with different dimensions are promoted to the widest, a missing Z being 0 as GDAL reads it (a NaN Z that is stored stays NaN). A collection built from WKT/WKB/EWKB (and GeoParquet / Arrow WKB, GeoPackage, PostGIS) whose members differ in dimension follows GEOS since 0.3.0 B10d: members are promoted with NaN, as Shapely reports their missing ordinates (deviation 1).
  • Z4 fixtures: Z files are written by GeoPandas 1.2 / pyogrio (GDAL 3.12); pyogrio cannot write M, so the M and ZM shapefiles and GeoPackage are built from the ESRI and GeoPackage specifications in generate_io.py and checked through GDAL (pyogrio.read_arrow exports ISO WKB with M) before they are committed. No M FlatGeobuf fixture exists; GDAL reads the M and ZM FlatGeobuf files GeoFrame writes (crosscheck_io.sh), and the reader is covered by unit tests. GDAL reports a layer whose first geometry has Z as EPSG:4979 for EPSG:4326 (3D CRS), and pyogrio cannot list a GeoPackage or FlatGeobuf whose type is "Unknown with Z", so the cross-check samples use one geometry type per layer.
  • Z4 deviations: (17) was a 2D row in a Z Shapefile or FlatGeobuf file and a two-value position in a 3D GeoJSON geometry giving NaN Z where GDAL gives 0; fixed: a missing Z is 0 (a stored NaN Z stays NaN), checked against GDAL 3.12 with lines_z_mixed.shp, z_positions.geojson and z_mixed.shp/z_mixed.fgb in crosscheck_io.sh (GDAL itself refuses to write a mixed FlatGeobuf layer, so only its read of the promoted file is compared); (18) a GeoPackage written here marks a layer with 2D and Z rows z = 2 (optional), GDAL writes z = 1; points get an envelope, GDAL writes none; (19) GeoJSON positions past the third value are ignored like GDAL (a fourth value is not M); (20) was a FlatGeobuf file with null geometries that GDAL could not parse ("Fatal error parsing feature"; the encoder wrote an empty geometry for a null row); fixed in issue #78: a null row is written as a feature without a geometry, like GDAL does, and GDAL reads those files (also with an index and a bbox filter).
  • Z5 status: done (zm_coords_test.exs, zm_tests.rs, kino_test.exs, fixture zm_coords.json). from_xy(z:) builds POINT Z (points_from_xy(x, y, z); implemented as force_3d on the 2D points, so a nil/NaN z is a NaN ordinate and a row with a missing x or y stays a null geometry, where GeoPandas keeps POINT Z (NaN 2 8)). get_coordinates(include_z:, include_m:) (GeoPandas 1.2 has both) appends z/m columns with NaN for absent ordinates, in get_coordinates_zm (zm.rs, a geo_traits walk that reads the stored dimension). The Kino map draws the 2D projection (Z and M are removed before the GeoJSON is built); inspect, the Table tab and to_explorer(encoding: :wkt) show Z/M in the WKT.
  • Z5 deviations: (21) was: the vertex constructors (line_strings_from_vertices, polygons_from_rings, ...) took {x, y} vertices only; fixed: they take {x, y, z} (or [x, y, z]) too and build Z geometries as Shapely 2.2 does (zm_coords.json, vertices: 19 rows over the five constructors and 2 rejected rows; a ring closed in XY but not in Z is closed again with its first vertex; the 2D rings, lines or polygons next to a Z one get NaN Z). Like Shapely, a vertex list that mixes two and three values, or has a fourth value (Shapely has no M here), is an error. (22) A NaN x or y with a z is a null row, as in 2D (GeoPandas keeps the point). (23) m columns of get_coordinates exist only for geometries with M, as in Shapely.

Curved geometries

GeoArrow, the wkb crate and Shapely 2.2 have no curve types, and GDAL linearizes curves when it reads them. GeoFrame does the same (B10c, 0.3.0): CircularString, CompoundCurve, CurvePolygon, MultiCurve and MultiSurface (WKB types 8-12, ISO Z / M / ZM and PostGIS EWKB flavours, either byte order) become LineString, LineString, Polygon, MultiLineString and MultiPolygon; curves inside a GeometryCollection are linearized too. Before this, one curve row aborted the whole read ("invalid WKB at row i").

  • Where: curves.rs, called from the EWKB-to-ISO rewrite (ewkb.rs) that every WKB reader runs, so GeoPackage (read_file, stream_file, read_file_info), PostGIS (read_postgis), GeoSeries.from_wkb, and the WKB columns of GeoParquet and Feather all benefit. Not WKT: the wkt crate has no CIRCULARSTRING keyword, so from_wkt of a curve is still an error (tested; GDAL reads curve WKT, but curves occur in practice as WKB).
  • Algorithm: a port of GDAL 3.12's OGRGeometryFactory::curveToLineString, GetCurveParameters and OGRGeometryFactoryStrokeArc (ogr/ogrgeometryfactory.cpp), OGRCircularString::CurveToLine, OGRCompoundCurve::CurveToLineInternal and OGRCurvePolygon::CurvePolyToPoly. Vertices are inscribed at equal angles, step OGR_ARC_STEPSIZE (4 degrees by default; the environment variable is honoured, read once per process, clamped to 0.01-180 as GDAL does); GDAL's default "stealth" mode (odd step count of at least 7, intermediate-point angle hidden in the low mantissa bits) is reproduced, so a half circle has 46 vertices. Collinear control points stay a straight segment, a closed arc is a full circle, an arc is stroked from its larger (x, y) end so a reversed arc gives the reversed vertices, Z is interpolated along the arc, a compound curve drops the first vertex of every member after the first, an arc with fewer than three points is an empty line. OGR_ARC_MAX_GAP only applies to approximateArcAngles (ellipses), not to reads.
  • Reference: 30 hand-built cases (test/reference/fixtures/curves/curves.gpkg, curves.json, generated by test/reference/generate_curves.py and read back with pyogrio 0.13 / GDAL 3.12) agree vertex for vertex, bit for bit; test/geo_frame/curves_test.exs reads the GeoPackage and compares each row with what geopandas.read_file returns. A 26 000-case fuzz run (curve_fuzz_against_gdal: random arcs of every sweep, near-collinear, Z, clockwise, UTM and geographic scale, multi-arc strings, compound members, curve polygons, multi geometries) agrees on every vertex count and every coordinate (23 956 bit for bit, the rest within a relative 3e-12).
  • Deviations: (1) GDAL (through pyogrio) leaves curves inside a GeometryCollection unlinearized; GeoFrame cannot store them, so they are linearized (the result is what getLinearGeometry of the collection gives). (2) GDAL 3.12 returns Z = 0 for the rings of a CurvePolygon inside a MultiSurface Z (a GDAL defect: also with a straight ring); GeoFrame keeps the interpolated Z. (3) GDAL drops M when it strokes an arc; GeoFrame interpolates M like Z (a LineString member keeps its M in both). (4) Writing curves is not supported and never needed, since GeoFrame produces no curve geometry; a layer written back holds the linear rows. (5) A curve with a member of the wrong family (a LineString in a MultiSurface, a polygon in a compound curve) is an error.

Resource limits

Inputs that would abort the whole VM (stack overflow or a huge allocation) are rejected with an error ({:error, message} or ArgumentError) instead. The caps:

AreaLimit
WKT textparenthesis nesting depth 64
WKB / EWKBcollection nesting depth 64 (the wkb reader itself stops at 128)
FlatGeobuf readevery feature must fit in the file; bbox: reads need index node size 16; a header that declares Z or M requires one value per vertex in every feature
Shapefile read (Z/M)the part and point counts of a Z or M record must fit the record, so a crafted count is an error, not an allocation
make_grid10,000,000 cells (square and hexagon)
sample_points10,000,000 samples in total per call (a scalar size counts once per row)
maximum_inscribed_circleseed cells are enlarged until at most 5,000,000 fit; refinement is also capped at 5,000,000 cells
segmentize10,000,000 estimated output vertices
hausdorff_distance / frechet_distance densify:fraction at least 1.0e-4 (10,000 pieces per segment) and 10,000,000 densified vertices in total
union_groupsn_groups at most the number of ids; ids below n_groups
offset_curvequad_segs at most 10,000; an estimated 10,000,000 raw vertices (vertices times 2 * quad_segs) is an error; a geometry whose cutting needs over 50,000,000 segment pairs is nil; non-finite distance or coordinates give nil
snapvertices times snap points at most 50,000,000 per geometry pair (a row over it is nil)
polygonize / build_areathe noding examines at most 50,000,000 candidate segment pairs (an error beyond that)
is_valid_coverage / invalid_coverage_edgescandidate segment pairs plus point-in-polygon steps at most 50,000,000 per call (an error beyond that); gap_width must be finite; rows with non-finite coordinates are nil
simplify_coverageat most 10,000,000 vertices and 50,000,000 vertex-in-triangle checks (an error beyond that); tolerance must be finite; rows with non-finite coordinates are nil

Writers (GeoParquet, Feather, GeoJSON, FlatGeobuf) write to <path>.tmp-<id> beside the destination and rename it over path on success; a failure never removes an existing file. CRS labels that differ only by case, or OGC:CRS84 against EPSG:4326, are compatible for binary operations, joins, overlay and concat.

to_crs / set_crs take any EPSG geographic, geocentric, projected or compound CRS (the crs-definitions table plus a 51 KB supplementary table generated from the PROJ database), or a PROJJSON or WKT (WKT1, WKT2) definition without a code, as pyproj.CRS.from_user_input does. A definition is converted for the common projection methods; any other method is an error that names it. See CRS definitions and codes outside the table.

Shapefile and zip input/output:

  • Zip archives (zipped Shapefiles): a member may decompress to at most 2 GiB (MAX_ZIP_MEMBER_BYTES); larger members are an error.
  • dBase tables (.dbf): a table may expand to at most 2^28 cells (records times fields), and its header must be consistent (record length covers the fields, header length covers the descriptors); inconsistent or amplifying headers are an error.
  • Shapefile sidecars are named after the path: a path ending in .shp swaps that suffix, any other path gets the extension appended to its full name (out.v1 writes out.v1.shp, out.v1.dbf, ...). Shapefile and zip writes go through temporary files and renames, so a failed write leaves existing files as they were.

Not planned (โ›”)

plot (use Kino map), geocode/reverse_geocode, pandas index alignment (align=), iterfeatures, Shapely object constructors, persistent sindex object, arbitrary-callback transform, deprecated unary_union.


Row status counts (sections 1-17, counted by the status column, incl. a few cross-reference rows): {'โœ…': 157, '๐ŸŸก': 31, 'โŒ': 0, 'โ›”': 15}