Repository navigation
Conversation
First implementation pull request for the geospatial proposal (`proposal-geospatial-10.asciidoc`). It adds `Geometry` as a value type in `gremlin-core`. Changes: - `structure.geo`: the seven SQL/MM kinds under abstract `Curve`, `Surface`, `MultiCurve` and `MultiSurface` levels, and `Model` (`CARTESIAN`, `GEOGRAPHIC`, `OTHER`). Values are immutable. - WKT, EWKT and ISO WKB reading and writing. Malformed input is an `IllegalArgumentException`. - Exact equality, with `-0.0` equal to `0.0`. - A total order in `GremlinValueComparator`, between `UUID` and `Vertex`, consistent with `equals`. - `GType` entries for `GEOMETRY`, each kind, and `CARTESIAN` and `GEOGRAPHIC`. `CoreImports` entries. - `gremlin-semantics.asciidoc`: the type, its equality and order, and the Hilbert key. Assisted-by: Kiro:claude-opus-5.5
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3754 +/- ##
============================================
+ Coverage 76.35% 77.83% +1.47%
- Complexity 13424 15526 +2102
============================================
Files 1012 1071 +59
Lines 60341 68350 +8009
Branches 7075 8266 +1191
============================================
+ Hits 46076 53198 +7122
- Misses 11548 11878 +330
- Partials 2717 3274 +557 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| * The key is a 32-bit value. Compare it as unsigned: keys above 2^31 are negative as an int. | ||
| * The grid and curve are specified in gremlin-semantics.asciidoc. | ||
| */ | ||
| final class HilbertKey { |
There was a problem hiding this comment.
There are some implementations in this PR like this class that should be available in the third party library we use to implement the predicates and steps. I'm assuming this is just a temporary class to ensure that the tests work?
There was a problem hiding this comment.
JTS will be added in the PR that implements the predicates. Only encode() will be removed, the rest will remain as it implements the grid specs that we need.
Assisted-by: Kiro:claude-opus-5.5
| DURATION(Duration.class), | ||
| EDGE(Edge.class), | ||
| FLOAT(Float.class), | ||
| GEOGRAPHIC(Geometry.class, Model.GEOGRAPHIC), |
There was a problem hiding this comment.
CARTESIAN and GEOGRAPHIC exist in both Model and GType. CoreImports statically imports every GType value, so in the console a bare GEOGRAPHIC means GType.GEOGRAPHIC. The proposal's examples use a bare GEOGRAPHIC to mean the model. How is this meant to be resolved in the console?
|
|
||
| // A further ordinate without a Z tag is malformed | ||
| if (startsNumber(peek())) { | ||
| throw new IllegalArgumentException("Coordinate has 3 ordinates but no Z tag"); |
There was a problem hiding this comment.
SRID=4326;POINT(1 2 3) fails with "3 ordinates but no Z tag". The proposal says EWKT support exists so PostGIS output can be pasted in, but PostGIS writes 3D EWKT without a Z tag. Is this intentional?
https://issues.apache.org/jira/browse/TINKERPOP-2558
First implementation pull request for the geospatial proposal (
proposal-geospatial-10.asciidoc, #3743). It addsGeometryas a value type ingremlin-core.Changes
structure.geo: the seven SQL/MM kinds under abstractCurve,Surface,MultiCurveandMultiSurfacelevels, and
Model(CARTESIAN,GEOGRAPHIC,OTHER). Values are immutable.IllegalArgumentException.-0.0equal to0.0.GremlinValueComparator, betweenUUIDandVertex, consistent withequals.GTypeentries forGEOMETRY, each kind, andCARTESIANandGEOGRAPHIC.CoreImportsentries.gremlin-semantics.asciidoc: the type, its equality and order, and the Hilbert key. One changelog line.Testing
GeometryTest,WktTest,WkbTest,GeometryOrderTestandHilbertKeyTest, plus new rows inOrderTest,CompareTestandPTest.