feat(bindings): tgeography parity — full surface, mirrors tgeometry#91
Closed
estebanzimanyi wants to merge 1 commit intocumulative-tgeometryfrom
Closed
feat(bindings): tgeography parity — full surface, mirrors tgeometry#91estebanzimanyi wants to merge 1 commit intocumulative-tgeometryfrom
estebanzimanyi wants to merge 1 commit intocumulative-tgeometryfrom
Conversation
Adds the geographic-coordinate-system temporal type tgeography. The MEOS
C functions backing this surface are subtype-agnostic, so the bulk of
this commit is a mechanical mirror of the tgeometry registrations:
search-and-replace TGeometryTypes -> TGeographyTypes, TGEOMETRY()
-> TGEOGRAPHY(), tgeometry_* -> tgeography_*, plus a small number of
case-by-case fixes for the tgeometry <-> tgeography coercions
(tgeogpoint coercions are deferred until tgeogpoint is registered).
Files added:
src/include/geo/tgeography.hpp
src/include/geo/tgeography_ops.hpp
src/geo/tgeography.cpp — type registration, constructors,
foundational accessors, time/value
restrict, modifiers, comparison
src/geo/tgeography_in_out.cpp — text I/O (asText, asEWKT) and
string casts
src/geo/tgeography_ops.cpp — cross-type predicates (boxops,
posops, spatial-rels, temporal-
spatial-rels), distance,
spatial functions, tile / box
emitters, analytics
test/sql/parity/041_tgeography_parity.test — 19 assertions
Aggregate wiring extended in span_aggregates.cpp /
temporal_aggregates.cpp to register tgeography overloads alongside
tgeometry / tgeompoint for extent / TcountAgg / MergeAgg /
AppendInstantAgg / AppendSequenceAgg.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 1, 2026
Closed
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the geographic-coordinate-system temporal type
tgeography, mirroring the comprehensivetgeometryPR (#90) almost line-for-line. The MEOS C functions backing this surface are subtype-agnostic, so this is largely a mechanical search-and-replace — `TGeometryTypes` → `TGeographyTypes`, `TGEOMETRY()` → `TGEOGRAPHY()`, `tgeometry_` → `tgeography_`, plus a few case-by-case fixes for coercions.What's included
src/geo/tgeography.cpp+tgeography_in_out.cpptgeographytype,tgeographyInst/tgeographySeqconstructors,asText/asEWKTsrc/geo/tgeography.cppsrc/geo/tgeography_ops.cppsrc/geo/tgeography_ops.cppSRID,setSRID,transform,stbox,tgeometry(tgeography)/tgeography(tgeometry)coercions,centroid,convexHull,traversedAreasrc/temporal/span_aggregates.cpp,src/temporal/temporal_aggregates.cppextent(tgeography)→ stbox;TcountAgg(tgeography)→ tint;MergeAgg(tgeography);AppendInstantAgg(tgeography);AppendSequenceAgg(tgeography)src/geo/tgeography_ops.cppspaceBoxes,spaceTimeBoxes, the four*SimplifyregistrationsStacked on top of #90
This PR is targeted to merge into
cumulative-tgeometry(PR #90). It depends on the tgeometry surface and the prerequisite work (#85 / #86 / #87 / #88) bundled there.Defaults / quirks
tgeographydefaults to SRID 4326 (WGS84) — geometry payloads in test outputs all start with0101000020E6100000….extent(tgeography)emitsSRID=4326;GEODSTBOXrather thanSTBOXto mark the geographic coordinate system.tgeogpointcoercions are not registered —tgeogpointis not yet a registered DuckDB type in MobilityDuck. Thetgeometry ↔ tgeographycoercion is registered.Out of scope
tgeogpoint— separate type registration; deferred (npoint/cbuffer/pose/rgeofamily scoping rule).asEWKB/asHexEWKB/asMFJSON/ parsers) — depends on PR feat(bindings): tgeompoint round-trip I/O — Binary/EWKB/HexWKB/HexEWKB/MFJSON #83 landing first.spaceSplit/spaceTimeSplitTableFunctions — depends on PR feat(bindings): geo/058 tpoint tile — tiles/boxes/getters + spaceSplit/spaceTimeSplit TableFunctions #79 landing first.Test plan
test/sql/parity/041_tgeography_parity.test— 19 assertions covering accessors, time-domain restrict, modifiers, comparison, box predicates, position predicates, spatial functions (including SRID + coercions), and aggregate wiring.🤖 Generated with Claude Code