You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This WIP tracks how to update the temporal extent and collection summaries for collections of items that use start/end datetimes. This provides guidance for manually updating collections and includes some notes about what is currently automated across the board--some implementations may already correct this, but here are methods for manually fixing a single collection.
Currently the functions built in to the veda-stac-ingestor might use the nominal datetime instant which does not capture items that represent a date range. The latest pgstac versions will update collection extents when a trigger is enabled but we need to confirm that the full datetime range is included.
Collection Temporal Extent
For now, a function that generates the temporal extent using the max end_datetime
-- make a re-usable function for the collection max temporal extentCREATE OR REPLACEFUNCTIONpgstac.collection_max_temporal_extent(id text)
RETURNS jsonb
LANGUAGE sql
IMMUTABLE PARALLEL SAFE
SET search_path TO 'pgstac', 'public'SET timezone to 'UTC'AS $function$
SELECT to_jsonb(
array[array[
to_char(min(items.datetime) at time zone 'Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"'),
to_char(max(items.end_datetime) at time zone 'Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"')
]]
)
FROM items WHERE collection=$1;;
$function$;
Now the above function can be used to set a collections temporal extent
We have already corrected the collection summaries here.
This function will eventually be updated to remove the cog_default raster logic, but today it works as designed for datetimes.
For dashboard:is_periodic collections the method is currently designed to return the full range of dates covered by the collection. For non-periodic collections every distinct nominal datetime instant will be returned. The purpose is to provide the minimum amount of information needed for a time selector in a dashboard explore view.
Update the summaries for a single collection
SELECT update_collection_default_summaries(collections.id)
FROM collections
WHEREcollections.id= :_collection_id;
The text was updated successfully, but these errors were encountered:
What
This WIP tracks how to update the temporal extent and collection summaries for collections of items that use start/end datetimes. This provides guidance for manually updating collections and includes some notes about what is currently automated across the board--some implementations may already correct this, but here are methods for manually fixing a single collection.
Currently the functions built in to the veda-stac-ingestor might use the nominal datetime instant which does not capture items that represent a date range. The latest pgstac versions will update collection extents when a trigger is enabled but we need to confirm that the full datetime range is included.
Collection Temporal Extent
For now, a function that generates the temporal extent using the max end_datetime
Now the above function can be used to set a collections temporal extent
Collection datetime summaries
We have already corrected the collection summaries here.
This function will eventually be updated to remove the cog_default raster logic, but today it works as designed for datetimes.
For
dashboard:is_periodic
collections the method is currently designed to return the full range of dates covered by the collection. For non-periodic collections every distinct nominal datetime instant will be returned. The purpose is to provide the minimum amount of information needed for a time selector in a dashboard explore view.Update the summaries for a single collection
The text was updated successfully, but these errors were encountered: