-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CQL2: Basic Spatial Operators issues #733
Comments
Meeting 2022-07-22:
|
On the last point, leaving aside disagreement on MultiPolygon X MultiPolygon vs. MultiPolygon X BBOX complexity, the number of cases on which to support intersection testing (as well as support for geometry literals) in the implementation matrix is currently:
My suggestion here was to simplify this matrix for Basic Spatial Operators to:
Feedback from other implementors about whether this would be a better division line would be very valuable. |
this addresses the second item of #733
Meeting 2022-08-01: We are considering to reduce the requirements class "Basic Spatial Operator" to reduce the second operand to a point or a bbox to make it simpler for APIs that have no need for more complex geometries. We look for feedback on this and plan to make a decision in the next meeting on August 15. |
Meeting 2022-08-15: There was no feedback, but we really need feedback to make such a decision at this stage. We will leave this issue open for a few more weeks (likely until after the Code Sprint September 14-16) and then make a decision. |
Meeting 2022-11-21: We think having an "entry level" for spatial filtering is a good idea. Since there were no comments against the change we will implement it. |
In 7.5.2 where a link to the WKT standard is provided, it would be very insightful to specifically refer to Section 7 (mention it in the link) of Simple Feature Access - Part 1: Common Architecture, which is where WKT is defined within that huge standard -- It wasn't clear to me at first that this was the right document where WKT is defined, since the title of the link differs significantly from the title of the standard (it would also be good to mention "Simple Features Access" as the OGC standard defining WKT in the reference). (at least 10,000 people are wondering where WKT is defined).
In A.5.1 Conformance Test 22,
ENVELOPE
is used with this syntax:ENVELOPE(-180,-90,180,90)
. In Simple Features Access, Envelope() is defined as a method to retrieve the envelop of the geometry. It is also a property of annotated text. It is not defined for the WKT encoding. This spatial4j issue mentions theENVELOPE
syntax being introduced in Catalogue Service CommonQL this way:ENVELOPE(
minX, maxX, maxY, minY
)
(with hatred for this order mentioned). The current Abstract Test is inconsistent with that order, but I later discovered^ in the Annex B BNF that the order has been changed to match the Features BBOX. No requirement introducesENVELOPE
specifically, it is not defined in the referenced Simple Features Access WKT, andENVELOPE
is also missing from the list of spatial data types for spatialLiteral in 7.5.1. To avoid order confusion with the original Catalogue Service CommonQLENVELOPE
(which has a different order), as well as with Envelope() being a method rather than a geometry type in Simple Features Access, couldENVELOPE
perhaps be renamed toBBOX()
in CQL2 (that can take 4 or 6 parameters, consistent with Features)? It would also be good to clarify thatBBOX
(orENVELOPE
) is a spatial literal that CQL2 introduces that is not defined in WKT / Simple Features Access.<Envelope Text> := EMPTY | <left paren> <WestBoundLongitude><comma> <EastBoundLongitude><comma> <NorthBoundLatitude><comma> <SouthBoundLatitude> <right paren>
Because implementing support for MultiPoints, Polygons (complete with holes), MultiPolygons, LineString, MultiLineString, GeometryCollection, and intersections for all these with all geometry types used on the server, from scratch still requires a great deal of effort, I would suggest to move these to the (full) Spatial Operators conformance class, and only keep
POINT
and the proposedBBOX
(orENVELOPE
otherwise) along withS_INTERSECTS()
in Basic Spatial Operators conformance class. This would also be consistent with the approach taken for the more complexINTERVAL
temporal geometry literals and Temporal Operators vs. Basic CQL2.POINT
andBBOX
literals against all geometry types available on the server is the 80%+ use case that is very easy to implement.bbox=
query parameter for filtering based on bounding box or point, that did not consider the fact that:bbox=
query parameter is anAND
at the very end of the "WHERE" clause, and it does not support scenarios where intersections are needed as part of more complex logical expressions. (actually, this was considered)The text was updated successfully, but these errors were encountered: