Repository navigation
Conversation
Add governed CRS84 Polygon and MultiPolygon fields, PostGIS validation and bbox reads, reviewed spatial migrations, native client support, and authored acceptance coverage. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Keep the existing local value type exception pointers on their schema branches and verify that polygons are accepted directly but refused as reusable scalar aliases. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
This was referenced Nov 11, 2026
…ct change costs Record the polygon feature and the client geometry type change in the BReg changelog, with migration steps for Rust, TypeScript and Python. Say in the spatial queries guide that changing a geometry field's precision, bbox or maximumPositions is a field type change that needs a reviewed migration, and what happens when a retained value violates a tightened contract. Drop a Point validator assertion that pinned a precision-9 refusal of a valid coordinate; issue #2645 tracks the validator. BREAKING CHANGE: the geometry of a GeoJSON Feature in the Rust, Node.js and Python clients is a union of Point, Polygon and MultiPolygon. In Rust, match BRegGeoJsonGeometry::Point(point) before reading coordinates. In TypeScript, narrow on geometry.type === "Point". In Python, type checkers see the union. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
This branch has not been deployed
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.
BReg can store points but cannot validate, index, query, or export plot and site boundaries. Add
crs84-polygonfields that accept GeoJSON Polygon and MultiPolygon, retain the submitted coordinate and ring order, and use a generated PostGIS projection for topology validation and indexed bbox intersection.Closes #2643.
Behavior
precision(0–9) andmaximumPositions(4–10,000), with an optional CRS84 bbox. Validate closed 2D rings, coordinate bounds, precision, size, and topology. Reject invalid geometry and antimeridian-crossing edges without repairing submitted values.Verification
Security review
Malformed geometry is bounded before PostGIS evaluation, and the generated structural validator is immutable, strict, SECURITY INVOKER, and uses a fixed search path. Topology checks use the flags overload to suppress coordinate-bearing PostGIS notices. The patch preserves existing read authorization and explicit bbox grants; negative tests cover denied fields and row boundaries. Reviewed migrations reject retained values that violate the candidate polygon contract before activation.
Area derivation and cross-record spatial rules remain outside this field type. Cross-kind migrations use a new polygon field and reviewed backfill. Related #1827 tracks the separate Compose-template PostGIS detection.