-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Review org.opengis.filter package in light of OGC 09-026 #32
Comments
Some experiments show that the way OGC filter and expression interfaces are currently defined in our Java profile leads to unsafe casts in implementations. We should consider being more specific on the expected input and output types. Example for a
|
Another change to consider: keep base types like Reducing the number of types would also simplify the API and make easier for implementors to use |
We should also delete |
…mentations. Also try to perform a more elaborated analysis of types during arithmetic operations. This work is not final; we still need to do a deeper review of filter interfaces: opengeospatial/geoapi#32
It could be useful to reword some vocable. For example, property and geometric equality operators are very close to each other, and that can be mileading. To get a property equality operator, one must call equal function. for geometric equality, one must call equals . Maybe an ST (Spatio-temporal, inspired by SQLMM) prefix would help see the difference. |
A proposal is taking shape in the Using those code lists also resolve the problem mentioned by @alexismanin. There is no longer confusion between the various |
- Remove the visitor pattern. - Remove non-standard subtypes (`IncludeFilter`, `ExcludeFilter`, `NilExpression`, etc.) - Retrofit `Filter` as a subtype of `java.util.function.Predicate`. - Retrofit `Expression` as a subtype of `java.util.function.Function`. - Add exceptions defined in ISO 19143. #32
During the upgrade to ISO 19143, we noticed the following issues with the OGC/ISO specification. But I did not found a working group for OGC Filter encoding where to report those issues. ISO 19143 / OGC 09-028 issuesPropertyIsLike operator (§7.7.3.4)The UML and the XSD said that this operator has 2 expressions, but does not said which one is the pattern. Common practice seems to use the second expression as the pattern. Temporal operators (§7.9)The Logical operators (§7.10)The Object identifiers (§7.11)
Filter capabilities (§7.13)
Temporal capabilities (§7.14.6)In the following sentence (emphasis is mine):
"Spatial" should be "temporal". In the above-cited list of operators and in the UML at figure 15, "Ends" and "AnyInteracts" are missing. Functions (§7.14.7)The XSD defines 2 types:
Sorting (§8)The UML is missing in OGC specification, but is present in ISO specification. I guess it is due to a broken link in AsciiDoc. Annex E. Abstract modelSection E.2 should probably have a Feature API draft standardIn OGC API - Features - Part 3: Filtering and the Common Query Language (CQL), requirement 18G said:
But in Annex C: JSON schemas for CQL (Normative) subsection C1 and C2, the schema declares a dot instead of underscore character:
(Edit April 30th): Above issue about the |
- Remove the visitor pattern. - Remove non-standard subtypes (`IncludeFilter`, `ExcludeFilter`, `NilExpression`, etc.) - Retrofit `Filter` as a subtype of `java.util.function.Predicate`. - Retrofit `Expression` as a subtype of `java.util.function.Function`. - Add exceptions defined in ISO 19143. #32
- Provide a way to specify the expected type of value computed by expressions. - Add explicit method in `BinaryComparisonOperator` for getting operands. - Revision of `FilterFactory` interface. It stay in "pending" section because parameterized types may need to be revisited. #32
Add an entry for "covariant type" in definition of terms. Add a note below UML saying that it shows type covariance. #32
- `FilterVisitor` and `ExpressionVisitor` removed - `IncludeFilter` and `ExcludeFilter` removed from public API - `NilExpression` removed - `Filter` as a sub-type of `java.util.Predicate` - `Expression` as a sub-type of `java.util.Function` Implementation changes; - Moved JTSMapping method to a `Wrapper.toGeometryType(…)` method. - Remove some classes and methods no longer used. - Refactor SQLMM test in a more implementation neutral (JTS versus ESRI) way. - Initial `Optimization` support. opengeospatial/geoapi#32
Branch |
Review the
org.opengis.filter
package for conformance with OGC 09-026 specification. Additional changes to consider:Expression
type with input and output types ofevaluate
method.evaluate(Object, Class)
after above-cited parametrization.java.util.function
package (new since Java 8).FilterFactory2
intoFilterFactory
(after simplification).minx, maxx, miny, maxy
arguments byEnvelope
.String srs
arguments byCoordinateReferenceSystem
.String units
arguments byUnit
.double distance, String units
arguments byLength
.Note that the filter package is in the "pending" part of GeoAPI and was not part of GeoAPI 3.0 standard. This leave us more freedom to modify it.
The text was updated successfully, but these errors were encountered: