@@ -20,15 +20,14 @@ from pyproj import CRS
2020EPSG6933 = TileMatrixSet.custom(
2121 (- 17357881.81713629 , - 7324184.56362408 , 17357881.81713629 , 7324184.56362408 ),
2222 CRS .from_epsg(6933 ),
23- identifier = " EPSG6933" ,
23+ id = " EPSG6933" ,
2424 matrix_scale = [1 , 1 ],
2525)
26-
2726# 2. Register TMS
28- tms = tms.register([ EPSG6933 ] )
27+ tms = tms.register({ EPSG6933 .id: EPSG6933 } )
2928
30- tms = TMSFactory(supported_tms = tms)
31- cog = TilerFactory(supported_tms = tms)
29+ tms_factory = TMSFactory(supported_tms = tms)
30+ cog_factory = TilerFactory(supported_tms = tms)
3231```
3332
34332 - Create app and register our custom endpoints
@@ -44,11 +43,11 @@ from titiler.core.errors import DEFAULT_STATUS_CODES, add_exception_handlers
4443
4544from fastapi import FastAPI
4645
47- from .routes import cog, tms
46+ from .routes import cog_factory, tms_factory
4847
4948app = FastAPI(title = " My simple app with custom TMS" )
5049
51- app.include_router(cog .router, tags = [" Cloud Optimized GeoTIFF" ])
52- app.include_router(tms .router, tags = [" Tiling Schemes" ])
50+ app.include_router(cog_factory .router, tags = [" Cloud Optimized GeoTIFF" ])
51+ app.include_router(tms_factory .router, tags = [" Tiling Schemes" ])
5352add_exception_handlers(app, DEFAULT_STATUS_CODES )
5453```
0 commit comments