- disable tests for pre-0.9 pgstac versions
- address several instances of validation failures returning 500 instead of 4xx HTTP responses
-
change environment variable names for Postgres database connection breaking change
- POSTGRES_USER -> PGUSER
- POSTGRES_PASS -> PGPASSWORD
- POSTGRES_HOST -> PGHOST
- POSTGRES_PORT -> PGPORT
- POSTGRES_DBNAME -> PGDATABASE
-
remove
cql-textsupport for PgSTACSearchfilter -
add
filterandfilter-langfor CollectionIdParams dependency -
changed container image to use non-root
user -
switch to uv for development
-
switch to hatch for python package build-system
-
bump minimum python version to 3.11
-
update titiler requirement to
>=1.1,<1.2 -
switch to rio-tiler mosaic backend
-
change Response model for
/pointendpoint breaking change# before class Point(BaseModel): coordinates: List[float] values: List[Tuple[str, List[Optional[float]], List[str]]] # now class AssetPoint(BaseModel): name: str values: list[float | None] band_names: list[str] band_descriptions: list[str] | None = None class Point(BaseModel): coordinates: list[float] assets: list[AssetPoint]
-
/searches/listendpoint is deprecated and replaced with/searches/ -
update
WMTSCapabilities.xmlendpoint with latest from titiler- remove
{tileMatrixSetId}prefix - include all available TMS in layers
- move endpoint to an extension
- remove
-
update titiler requirement to
>=0.24,<0.25- add OpenTelemetry instrumentation to the tiler factory classes
- fix layer's bounds for non-wgs84 CRS in WMTS document
- refactor HTML templating
- remove python 3.9 support
-
switch from bitnami to official python:3.12 docker image
- update titiler requirement to
>=0.22,<0.23 - add
/conformanceendpoint - use HTML templates for landing page from
titiler.core - add
queryandsortbyoptions to/collections - update input types for
dependencies.get_collection_idfunction breaking changeids:List[str]->strbbox:List[float]->str
- fix Landing page links when app is behind proxy
- remove
PostgresSettingsinitialization frommain.py
-
update titiler requirement to
>=0.21,<0.22 -
use
URNstyle CRS notation in WMTS document -
Unify Docker images (deprecate
uvicorn-*tags)# Uvicorn # before docker run \ --platform=linux/amd64 \ -p 8000:8000 \ --env PORT=8000 \ --env DATABASE_URL=postgresql://username:[email protected]:5439/postgis \ --rm -it ghcr.io/stac-utils/titiler-pgstac:uvicorn-latest # now docker run \ --platform=linux/amd64 \ -p 8000:8000 \ --env DATABASE_URL=postgresql://username:[email protected]:5439/postgis \ --rm -it ghcr.io/stac-utils/titiler-pgstac:latest \ uvicorn titiler.pgstac.main:app --host 0.0.0.0 --port 8000 --workers 1 # Gunicorn # before docker run \ --platform=linux/amd64 \ -p 8000:8000 \ --env PORT=8000 \ --env DATABASE_URL=postgresql://username:[email protected]:5439/postgis \ --rm -it ghcr.io/stac-utils/titiler-pgstac:latest # now docker run \ --platform=linux/amd64 \ -p 8000:8000 \ --env DATABASE_URL=postgresql://username:[email protected]:5439/postgis \ --rm -it ghcr.io/stac-utils/titiler-pgstac:latest \ gunicorn -k uvicorn.workers.UvicornWorker titiler.pgstac.main:app --bind 0.0.0.0:8000 --workers 1
-
remove
rescale_dependencyandcolor_formula_dependencyattributes in TilerFactory class breaking change -
add
render_func: Callable[..., Tuple[bytes, str]] = render_imageattribute in TilerFactory class -
update
/healthzendpoint to return dependencies versions (titiler, rasterio, gdal, ...) -
migrate
templates/index.htmlto bootstrap5, remove unused css, reuse bs classes -
Updated WMTS endpoint to return layer bounds in coordinate ordering matching CRS order if WGS84 is not used
-
Update package build backend from
pdm-pep517topdm-backend(https://backend.pdm-project.org/#migrate-from-pdm-pep517) -
Update namespace package from using
.to-as separator to comply with PEP-625 (https://peps.python.org/pep-0625/) -
Remove
python3.8support -
Add
python3.13support
-
update titiler requirement to
>=0.19.0,<0.20 -
Use
@attrs.defineinstead of dataclass for factories breaking change -
Remove default
WebMercatorQuadtile matrix set in/tiles,/tilesjson.json,/mapand/WMTSCapabilities.xmlendpoints breaking change# Before /tiles/{z}/{x}/{y} /tilejson.json /map /WMTSCapabilities.xml # Now /tiles/WebMercatorQuad/{z}/{x}/{y} /WebMercatorQuad/tilejson.json /WebMercatorQuad/map /WebMercatorQuad/WMTSCapabilities.xml -
Use
.as_dict()method when passing option to rio-tiler Reader's methods to avoid parameter conflicts when using custom Readers. -
add OGC Tiles
/tilesand/tiles/{tileMatrixSet}endpoints -
add
/pointprefix to/{lon},{lat}/assetsendpoint breaking change -
rename
readerattribute tobackendinMosaicTilerFactorybreaking change -
rename
titiler/pgstac/mosaic.py → titiler/pgstac/backend.pybreaking change -
rename
titiler.pgstac.mosaic.CustomSTACReader → titiler.pgstac.reader.SimpleSTACReaderbreaking change -
rename factory's method to match the one from
titiler.core/titiler.mosaicbreaking change -
split
_assets_routesintoassets_tileandassets_pointbreaking change
- add
/collections/{collection_id}/items/{item_id}/assets/{asset_id}optional endpoints (TITILER_PGSTAC_API_ENABLE_ASSETS_ENDPOINTS=TRUE|FALSE) - add
/externaloptional endpoints (TITILER_PGSTAC_API_ENABLE_EXTERNAL_DATASET_ENDPOINTS=TRUE|FALSE) - add
cachecontrol_exclude_pathsattribute inApiSettingsto let users decide if some path should not have cache-control headers (defaults is to exclude/list) - add
PgstacSettingssuch that the user can provide their own default settings for PgSTAC search - add check for pgstac
read-onlymode and raiseReadOnlyPgSTACErrorerror when trying to write to the pgstac instance - add
/pgstacendpoint in the application (whenTITILER_PGSTAC_API_DEBUG=TRUE) - add
ids,bboxanddatetimeoptions to the/collections/{collection_id}endpoints
- update models to avoid pydantic deprecation
- update
searchesmodel for pgstac>=9.1 - update psycopg error catching when
searchdoesn't exist
-
update titiler requirement to
>=0.18.0,<0.19 -
Add
/colorMapsendpoints to the application -
Deprecation remove default
WebMercatorQuadtile matrix set in/tiles,/tilesjson.json,/map,/WMTSCapabilities.xmland/assetsendpoints# Before /tiles/{z}/{x}/{y} /tilejson.json /map /WMTSCapabilities.xml # Now /tiles/WebMercatorQuad/{z}/{x}/{y} /WebMercatorQuad/tilejson.json /WebMercatorQuad/map /WebMercatorQuad/WMTSCapabilities.xml -
update
titiler.pgstac.model.Linkto match the OGC specification -
use
{tileMatrixSetId}in templated URL links -
add support for
renderanditem-assetsSTAC Collection extensions for theSTAC Collectionsinfo and wmts endpoints -
add
/infoendpoint to theSTAC Collectionsendpoints -
add
/collectionsand/collections/{collection_id}endpoints whenTITILER_PGSTAC_API_DEBUG=TRUE -
Expect the
Metadata.defaultsconfigurations to follow the STACrenderextension (https://github.com/stac-extensions/render)// before "blue": { "rescale": ["0,100"], "assets": "b1", } // now "blue": { "rescale": [[0, 100]], "assets": ["b1"], }
- add python 3.12 support
- Add
extra="ignore"optionCacheSettingsto fix pydantic issue when using.envfile
- enable passing
ConnectionPoolkwargs option intitiler.pgstac.db.connect_to_dbfunction (author @smohiudd, #155)
- fix invalid url parsing in HTML responses
- update titiler requirement to
>=0.17.0,<0.18 - use new
align_bounds_with_dataset=Truerio-tiler option in GeoJSON statistics methods for more precise calculation
- update titiler requirement to
>=0.16.0,<0.17 - use morecantile
TileMatrixSet.cellSizeproperty instead of deprecated/privateTileMatrixSet._resolutionmethod (author @hrodmn, #148) - add
/point/{lon},{lat}endpoint inMosaicTilerFactory(co-author @hrodmn, #150)
- no change since
1.0.0a4
- add
algorithmoptions for/statistics [POST]endpoints (back-ported from 0.8.1)
- remove
reverseoption inPGSTACBackendmosaic backend. Reverse item order should be achieved with STAC search sortby.
- update titiler's dependency to
>=0.15.2,<0.16 - rename
dependencies.TileParamstodependencies.TmsTileParams
- rename
dependencies.ItemPathParamstoItemIdParamsbreaking change
-
add
pgstac_dependencyattribute inMosaicTilerFactory(defaults todependencies.PgSTACParams) -
add database's
poolcheck in startup event -
add metadata layers links in mosaic's
/inforesponse for TileJSON, map and wmts endpoint links -
add
CollectionIdParamsdependency to retrieve a SearchId for a CollectionId -
add
/collections/{collection_id}virtual mosaic endpoints -
update endpoints Tags (
STAC Search,STAC Collection,STAC Item)
-
move PgSTAC Search Virtual Mosaic's endpoints from
/mosaicto/searches -
in
model.RegisterResponse(model used in/registerendpoint) renamesearchidbyid# before resp = httpx.post("/mosaic/register", body={"collections": ["my-collection"], "filter-lang": "cql-json"}) assert resp.json()["searchid"] # now resp = httpx.post("/searches/register", body={"collections": ["my-collection"], "filter-lang": "cql-json"}) assert resp.json()["id"]
-
rename
dependencies.PathParamstodependencies.SearchIdParams -
rename
searchidpath parameter tosearch_idinSearchIdParams -
move
check_query_paramsmethods outsideMosaicTilerFactoryclass -
make
path_dependencya required input toMosaicTilerFactoryclass# before app = FastAPI() mosaic = MosaicTilerFactory(...) app.include_router(mosaic.router) # now app = FastAPI() mosaic = MosaicTilerFactory( ..., path_dependency=lambda: "aaaaaaaaaaaaaa" ) app.include_router(mosaic.router)
-
remove
/{search_id}prefix inMosaicTilerFactoryroutes. Now use parameter injection from global prefix# Before app = FastAPI() mosaic = MosaicTilerFactory( ..., router_prefix="/mosaics" ) app.include_router(mosaic.router, prefix="/mosaics") # Now app = FastAPI() mosaic = MosaicTilerFactory( ... router_prefix="/mosaics/{search_id}" ) app.include_router(mosaic.router, prefix="/mosaics/{search_id}")
-
move
/infoendpoint outside theMosaicTilerFactoryto its own extension (titiler.pgstac.extension.searchInfoExtension)# Before app = FastAPI() mosaic = MosaicTilerFactory(...) app.include_router(mosaic.router) # Now app = FastAPI() mosaic = MosaicTilerFactory( ... extensions=[ searchInfoExtension(), ] ) app.include_router(mosaic.router)
-
move
/registerand/listendpoint creation outside theMosaicTilerFactoryclass# before from titiler.pgstac.factory import MosaicTilerFactory mosaic = MosaicTilerFactory( ..., router_prefix="/{search_id}", ) app.include_router(mosaic.router, prefix="/{search_id}") # Now from titiler.pgstac.factory import ( MosaicTilerFactory, add_search_register_route, add_mosaic_register_route, ) mosaic = MosaicTilerFactory( ..., router_prefix="/{search_id}", ) app.include_router(mosaic.router, prefix="/{search_id}") # add /register endpoint add_search_register_route( app, # any dependency we want to validate # when creating the tilejson/map links tile_dependencies=[ mosaic.layer_dependency, mosaic.dataset_dependency, mosaic.pixel_selection_dependency, mosaic.process_dependency, mosaic.rescale_dependency, mosaic.colormap_dependency, mosaic.render_dependency, mosaic.pgstac_dependency, mosaic.reader_dependency, mosaic.backend_dependency, ], ) # add /list endpoint add_search_list_route(app)
- enable passing
ConnectionPoolkwargs option intitiler.pgstac.db.connect_to_dbfunction (author @smohiudd, #155) [backported from 1.2.2]
- update rio-tiler version to
>6.3.0(defined intitiler>=0.17) - use new
align_bounds_with_dataset=Truerio-tiler option in GeoJSON statistics methods for more precise calculation [backported from 1.2.0] - use morecantile
TileMatrixSet.cellSizeproperty instead of deprecated/private TileMatrixSet._resolution method [backported from 1.1.0]
- add
algorithmoptions for/statistics [POST]endpoints
- update titiler requirement to
>=0.15.0,<0.16 - remove
max_sizedefault for mosaic's/statistics [POST]endpoint breaking change - add
/bboxand/feature [POST]optional endpoints - add
img_part_dependencyattribute inMosaicTilerFactory(defaults totitiler.code.dependencies.PartFeatureParams)
-
update requirements to switch to pydantic~=2.0
- pydantic>=2.4,<3.0
- pydantic-settings~=2.0
- geojson-pydantic~=1.0
- cogeo-mosaic>=7.0,<8.0
-
update titiler requirement to
>=0.14.0,<0.15-
replace
-by_in query parameters- coord-crs -> coord_crs
- dst-crs -> dst_crs
-
- add
tilejsonURL links forlayersdefined in mosaic's metadata in/mosaic/registerand/mosaic/{mosaic_id}/inforesponse - support multiple
layersin/mosaic/{mosaic_id}/WMTSCapabilities.xmlendpoint created from mosaic's metadata
breaking change
-
In
/mosaic/WMTSCapabilities.xmlwe removed the query-parameters related to thetileendpoint (which are forwarded) so?assets=is no more required. The endpoint will still raise an error if there are nolayersin the mosaic metadata and no required tile's parameters are passed.# before response = httpx.get("/mosaic/{mosaic_id}/WMTSCapabilities.xml") assert response.status_code == 400 response = httpx.get("/mosaic/{mosaic_id}/WMTSCapabilities.xml?assets=cog") assert response.status_code == 200 # now # If the mosaic has `defaults` layers set in the metadata # we will construct a WMTS document with multiple layers, so no need for the user to pass any `assets=` response = httpx.get("/mosaic/{mosaic_id}/WMTSCapabilities.xml") assert response.status_code == 200 with rasterio.open(io.BytesIO(response.content)) as src: assert src.profile["driver"] == "WMTS" assert len(src.subdatasets) == 2 # If the user pass any valid `tile` parameters, an additional layer will be added to the one from the metadata response = httpx.get("/mosaic/{mosaic_id}/WMTSCapabilities.xml?assets=cog") assert response.status_code == 200 with rasterio.open(io.BytesIO(response.content)) as src: assert src.profile["driver"] == "WMTS" assert len(src.subdatasets) == 3
- add
python-dotenvrequirement
- update
titilerrequirement to>=0.12.0,<0.13 - use
AnnotatedType for Query/Path parameters - re-order endpoints in
MosaicTilerFactoryto avoid conflicts betweentilesandassetsendpoints - remove
stac-pydanticdependency - add optional
root_pathsetting to specify a url path prefix to use when running the app behind a reverse proxy - add landing page
/ - use
lifespanoption instead of deprecated@app.on_eventmethod to initiate/close DB connection
breaking changes
- remove deprecated
/{searchid}/{z}/{x}/{y}/assetsendpoints - use /api and /api.html for documentation (instead of /openapi.json and /docs)
- replace Enum's with
Literaltypes - replace variable
TileMatrixSetIdbytileMatrixSetId - add
pixel_selection_dependencyattribute to theMosaicTilerFactory
- update
titilerrequirement to>=0.11.7 - fix
/mapendpoint template name - rename
add_map_viewertoadd_vieweroption inMosaicTilerFactoryfor consistency withtitiler'soptions
- remove deprecated
/tiles/{searchid}/...endpoints (replaced with/{searchid}/tiles/...) - depreciate
/{searchid}/{z}/{x}/{y}/assetsendpoints and add/{searchid}/tiles/{z}/{x}/{y}/assets - update minimum titiler requirement to
>=0.11.6 - remove timing headers
- add
strict_zoomoption (controled withMOSAIC_STRICT_ZOOMenvironment variable) to raise (or not) error when fetching tile outside mosaic min/max zoom range
- update python packaging/build system to
pdm-pep517 - use
Rufffor lint - add retry mechanism on Database connection issues for
PGSTACBackend.get_assets()andget_stac_itemmethods (back ported from 0.2.4)
- update titiler requirement to
0.10.2 - fix maximum version of FastAPI to 0.92 (to avoid breaking change of starlette >0.25)
- update Type information for
dependencies.get_stac_item(back ported from 0.2.2)
breaking changes
-
Use
/collections/{collection_id}/items/{item_id}prefix for Item endpoint.# Before {endpoint}/stac/info?collection=collection1&item=item1 # Now {endpoint}/collections/collection1/items/item1/info -
Change tile url path parameter order from
/tiles/{searchid}/{TileMatrixSetId}/{z}/{x}/{y}to/{searchid}/tiles/{TileMatrixSetId}/{z}/{x}/{y}# Before {endpoint}/mosaic/tiles/20200307aC0853900w361030/0/0/0 # Now {endpoint}/mosaic/20200307aC0853900w361030/tiles/0/0/0
- add retry mechanism on Database connection issues for
PGSTACBackend.get_assets()andget_stac_itemmethods
- fix maximum version of FastAPI to 0.92 (to avoid breaking change of starlette >0.25)
- update Type information for
dependencies.get_stac_item
- update titiler requirement to
>=0.10.1,<0.11and fix/mapendpoint (to accept multiple TMS)
- add python 3.10 and 3.11 support
- update to rio-tiler 4.1
- add
/{searchid}/mapendpoint to theMosaicTilerFactory(added whenadd_map_vieweris set toTrue) - add
/{searchid}/WMTSCapabilities.xmlOGC WMTS endpoint to theMosaicTilerFactory - add
/listto theMosaicTilerFactoryto list available mosaics (added whenadd_mosaic_listis set toTrue)
breaking changes
- remove python 3.7 support
- update titiler requirement to
>=0.10.0 - replace
connection_stringbydatabase_urlinsettings.PostgresSettings. We can now directly setDATABASE_URLenvironment variable.
- remove
asset_expression(Mosaic and Item) - histogram band names are prefixed with
b(e.gb1) (Mosaic and Item) (ref: https://github.com/cogeotiff/rio-tiler/blob/main/docs/src/v4_migration.md#band-names) - expression for STAC have to be in form of
{asset}_b{band_name}(e.gred_b1/green_b1) (Mosaic and Item) (ref: https://github.com/cogeotiff/rio-tiler/blob/main/docs/src/v4_migration.md#multibasereader-expressions) - added
asset_as_bandoption to force expression to be in form of{asset}(e.gred/green) (Mosaic and Item) - expression's band should now be delimited with
;(previously,was accepted) (Mosaic and Item) - point output model to include band_names (Item)
- added
algorithmoptions
- update
titiler.coreandtitiler.mosaicrequirement to0.7 - add
MosaicTilerFactory._tilejson_routesmethod to registerTileJSONroutes - raise
cogeo_mosaic.errors.MosaicNotFoundErrorwhen SearchId is not found in pgstac.searches table
breaking changes
- move version definition in
titiler.pgstac.__version__ - remove unused
fetch_optionsintitiler.pgstac.reader.PgSTACReader
- update
titilerversion and addreader_dependencyandbackend_dependencyin endpoint factory.
- remove LRU cache on all settings classes to enable support for manually providing settings via keyword arguments and to minimize lines of code (author @alukach, #54)
- Insert mosaic metadata
min/max zoomandboundsin tilejson (#51) - allow users the ability to optionally provide
PostgresSettingstoconnect_to_db()function in the event that they want to customize how their DB credentials are populated (author @alukach, #53)
- add
feature()method toPGSTACBackendmosaic backend - add
/statisticsendpoint to return statistics given a GeoJSON feature or featureCollection - add
collectionin allowed returned fields - switch to
pgstac.searchto get the STAC Item intitiler.pgstac.dependencies.get_stac_item(#50)
- move dependencies to
titiler.pgstac.dependencies - add
/stacendpoints to work with PgSTAC items
breaking changes
- add
/mosaicprefix to the PgSTAC mosaic endpoints
- Add
search_dependencyto allow customization of the PgSTAC Search query (Author @drnextgis, #41) - Add PgSTAC Search entries model (#43)
- Add
Metadataspecification (#38)
breaking changes
- update
titiler.coreandtitiler.mosaicrequirement to>=0.5 - When registering a
searchto PgSTAC with the/registerendpoint, a default metadata{"type": "mosaic"}will be set. - Renamed
titiler.pgstac.modelstotitiler.pgstac.model - Renamed
titiler.pgstac.models.SearchQuerytotitiler.pgstac.model.PgSTACSearch(and removedmetadata) - output response for
/registerendpoint:
// before
{
"searchid": "...",
"metadata": "http://endpoint/.../info",
"tiles": "http://endpoint/.../tilejson.json",
}
// now
{
"searchid": "...",
"links": [
{
"rel": "info",
"href": "http://endpoint/.../info",
"type": "application/json",
},
{
"rel": "tilejson",
"href": "http://endpoint/.../tilejson.json",
"type": "application/json",
}
]
}- output response for
/infoendpoint:
// before
{
"hash": "...",
"search": {},
"_where": "...",
...
}
// now
{
"search": {
"hash": "...",
"search": {},
"_where": "...",
...
},
"links": [
{
"rel": "self",
"href": "http://endpoint/.../info",
"type": "application/json",
},
{
"rel": "tilejson",
"href": "http://endpoint/.../tilejson.json",
"type": "application/json",
}
]
}- add tile
bufferoption to match rio-tiler tile options (#31)
- Forward TMS to the STAC Reader (allow multiple TMS) (#28)
- Switch to psycopg3
- add
filter-langin Search model to support newer PgSTAC (with CQL-2) - add
metadatain Search model to allow forwarding metadata to the search query entry in PgSTAC
breaking changes
- Unify reader/writer db pools to
request.app.state.dbpool - rename
PostgresSettings.db_max_inactive_conn_lifetimetoPostgresSettings.max_idle - remove
PostgresSettings().reader_connection_stringandPostgresSettings().writer_connection_string. Replaced withPostgresSettings().connection_string - update titiler requirement (>= 0.4)
- Surface PgSTAC options (
scan_limit,items_limit,time_limit,exitwhenfullandskipcovered) in Tile endpoints
breaking changes
- remove
psycopg2requirements to avoid conflict withpsycopg2-binary(#15)
Initial release