TiTiler Image.
Source Code: https://github.com/developmentseed/titiler-image
TiTiler.image
is a titiler extension to work with non-geo images.
To install from PyPI and run:
# Make sure to have pip up to date
python -m pip install -U pip
python -m pip install titiler.image
To install from sources and run for development:
python -m pip install -e .
python -m pip install uvicorn
python -m uvicorn titiler.image.main:app --reload
git clone https://github.com/developmentseed/titiler-image.git
cd titiler-pgstac
docker-compose up --build tiler
It runs titiler.image
using Gunicorn web server. To run Uvicorn based version:
docker-compose up --build tiler-uvicorn
titiler-image
provide multiple endpoint Factories (see https://developmentseed.org/titiler/advanced/tiler_factories/)
/info?url={...}
/metadata?url={...}
from fastapi import FastAPI
from titiler.image.factory import MetadataFactory
app = FastAPI()
meta = MetadataFactory()
app.include_router(meta.router)
Specification: https://iiif.io/api/image/3.0/
/{identifier}/info.json
: IIIF Image Information Request
/{identifier}/{region}/{size}/{rotation}/{quality}.{format}
: IIIF Image Request
/{identifier}
: Redirect do the Image Information Request endpoint or return a simple IIIF viewer (based on headers Accept
value)
from fastapi import FastAPI
from titiler.image.factory import IIIFFactory
app = FastAPI()
iiif = IIIFFactory()
app.include_router(iiif.router)
/tilejson.json?url={...}
: TileJSON document
/tiles/{z}/{x}/{y}[@{scale}x.{format}]?url={...}
: Tiles endpoint
/viewer?url={...}
: Simple local tiles viewer
from fastapi import FastAPI
from titiler.image.factory import LocalTilerFactory
app = FastAPI()
local_tiles = LocalTilerFactory()
app.include_router(local_tiles.router)
This is a lightweight version of titiler.core.factory.TilerFactory
.
[/TileMatrixSetId]/tilejson.json?url={...}
: TileJSON document
/tiles[/TileMatrixSetId]/{z}/{x}/{y}[@{scale}x.{format}]?url={...}
: Tiles endpoint
[/{TileMatrixSetId}]/map?url={...}
: Simple dataset viewer
from fastapi import FastAPI
from titiler.image.factory import GeoTilerFactory
app = FastAPI()
geo = GeoTilerFactory()
app.include_router(geo.router)
app = FastAPI()
meta = MetadataFactory()
app.include_router(meta.router, tags=["Metadata"])
iiif = IIIFFactory(router_prefix="/iiif")
app.include_router(iiif.router, tags=["IIIF"], prefix="/iiif")
image_tiles = LocalTilerFactory(router_prefix="/image")
app.include_router(image_tiles.router, tags=["Local Tiles"], prefix="/image")
geo_tiles = GeoTilerFactory(
reader=GCPSReader, reader_dependency=GCPSParams, router_prefix="/geo"
)
app.include_router(geo_tiles.router, tags=["Geo Tiles"], prefix="/geo")
See CONTRIBUTING.md
See LICENSE
See contributors for a listing of individual contributors.
See CHANGES.md.