Repository navigation
ldproxy extent handling - #511
Merged
Merged
Conversation
3 tasks done
azahnen
requested changes
May 22, 2026
azahnen
left a comment
Collaborator
There was a problem hiding this comment.
- TemporalExtent
- should be UTC ISO datetime (
YYYY-MM-DDTHH:mm:ss.sssZ) - use
DateTimeFormatter.ISO_INSTANT.parseto validate - add methods for start and end (
@Value.Derived,@JsonIgnore) that returnInstant(Instant.from(DateTimeFormatter.ISO_INSTANT.parse))
- should be UTC ISO datetime (
- SpatialExtent
toBoundingBoxshould be moved here withnativeCrsas parameter
- FeatureProvider*
- it seems there is a lot of duplicated code, move to
AbstractFeatureProviderwhere appropiate
- it seems there is a lot of duplicated code, move to
Contributor
Author
|
Thanks, should be taken care of now. |
azahnen
force-pushed
the
ldp-94-ldproxy-extent-handling
branch
3 times, most recently
from
October 31, 2026 19:20
219a7ce to
deab143
Compare
cportele
previously approved these changes
Nov 10, 2026
cportele
left a comment
Contributor
There was a problem hiding this comment.
See review in the ldproxy PR for details
azahnen
force-pushed
the
ldp-94-ldproxy-extent-handling
branch
from
November 17, 2026 17:14
8ca8e9e to
cd37970
Compare
FeatureTypeConfiguration is implemented by the collection configuration of OGC APIs, so the type extent added to it replaced the type of the existing collection option `extent`. Collection extents of earlier versions were then read as provider extents: the CRS was ignored and temporal values in milliseconds failed to load. The type extent stays in FeatureSchema, where the provider types declare it.
Queries for multiple features are restricted to a fixed extent of the type, but the feature count was computed for all features. The count query now applies the same extent filters, so the number of features of a collection matches numberMatched.
…roviders Tileset extents in tilesetDefaults and tilesets of the FEATURES, HTTP and MBTILES tile providers now have the same form as the extent of feature providers and their types: `extent.spatial`, in CRS84. A temporal extent is rejected for tiles. Before, a flat `extent` was expected and `extent.spatial` was ignored without an error. The extent type is renamed from FeatureTypeExtent to Extent, since it is used for providers, types and tilesets alike.
The bounding boxes from the capabilities are stored under the ids derived from the prefixed feature type name (prefix_localname, localname), but were looked up with the prefixed name, so no type got an extent. With a native CRS84, the bounding box was also dropped for lack of a transformer. The bounding box is now returned in CRS84 as given in the capabilities; it was transformed to the native CRS and back before, which enlarged it.
For data with a start and an end, the computed temporal extent used the earliest start and the latest end that are set, so a collection with features that have no end, e.g. current versions, got the end of the latest closed interval. A missing start or end now makes that side of the extent unbounded. An empty table still has no temporal extent. Temporal extents cached by an earlier version are used until the features of the type or the provider configuration change; clear the cache to recompute them.
A type with only PRIMARY_INTERVAL_START or only PRIMARY_INTERVAL_END had no computed temporal extent, so its collection always showed an open interval. The extent is now computed from the bound that is there, with the other side unbounded.
When several features were written in one call (e.g. a wfs:Insert with many features), the spatial and temporal extent of the result only covered the last one. The extents now cover all written features. For data with a start and an end, a feature without a start or end now makes that side of the extent unbounded, also next to features that have one. Values that the write sets itself, such as the start and the open end of a new version, are taken into account. A partial update that does not change the start or the end leaves that side as it is.
An empty `spatial` or `temporal` object stopped the inheritance of a fixed extent from the parent level, exactly like `computed: true`, but read as if nothing was set. It is now rejected; to compute the extent instead of inheriting a fixed one, set `computed: true`.
… end A partial update that cleared the end without touching the start, or the start without touching the end, gave no temporal extent, so the extent did not become unbounded on that side. The unknown side now gets a value that never widens an extent. An unparsable value no longer makes a side unbounded either.
The id of a type was tried first and may be the local name of another WFS feature type. It is now tried after prefix_localname and localname.
azahnen
force-pushed
the
ldp-94-ldproxy-extent-handling
branch
from
November 17, 2026 17:58
cd37970 to
cf73ff9
Compare
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.
Implements the xtraplatform-spatial part of ldproxy/ldproxy#1171: spatial and temporal extents can be configured in the providers instead of only at the API level.
Configuration
Feature providers
extent.spatialandextent.temporalon the provider and on each type. A configured extent is never computed. Each part of a type extent replaces the same part of the provider extent.yyyy-MM-dd, UTC, end inclusive) or date-times with offset; a missing bound is open.computed: trueon a type discards an inherited fixed extent.computed: falseis rejected, andcomputedmust not be combined with coordinates or bounds.Tile providers (
tilesetDefaultsandtilesets, coordinates always in CRS84)boundsfrom the MBTiles metadata is used.Query restriction (SQL providers only,
queryGeneration)restrictToSpatialExtentandrestrictToTemporalExtent(both defaulttrue) addS_INTERSECTS/T_INTERSECTSpredicates for fixed extents to all queries for multiple features. Queries for a single feature by id are not restricted.Behavior changes
containsKeycheck madegetSpatialExtent(andgetFeatureCountfor GraphQL) always return nothing; they now return computed values.Notes
FeatureTypeConfiguration.getExtent()conflicts withgetExtent()in ldproxy'sFeatureTypeConfigurationOgcApi; this is resolved in the related ldproxy PR.@since v4.9.SpatialExtentSpec,TemporalExtentSpec,FeatureTypeExtentSpec,ExtentFiltersSpec,TileProviderHttpExtentSpecand extent cases inFilterEncoderSqlSpec(SQL text for PostGIS only).