File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 77* add ` /validate ` endpoint via ` ValidateExtension ` extension
88* add ` Latitude ` and ` Longitude ` as compatible spatial dimensions (@abarciauskas-bgse , https://github.com/developmentseed/titiler/pull/1268 )
99
10+ ### titiler.mosaic
11+
12+ * remove usage of ` mosaic_def.center ` and calculate from bounds
13+
1014## 0.25.0 (2025-11-07)
1115
1216### Misc
Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ def test_tilejson(app):
8282 assert body ["minzoom" ] == mosaicjson ["minzoom" ]
8383 assert body ["maxzoom" ] == mosaicjson ["maxzoom" ]
8484 assert body ["bounds" ] == mosaicjson ["bounds" ]
85- assert body ["center" ] == mosaicjson ["center" ]
8685
8786
8887def test_point (app ):
Original file line number Diff line number Diff line change @@ -696,15 +696,19 @@ def tilejson(
696696 reader_options = reader_params .as_dict (),
697697 ** backend_params .as_dict (),
698698 ) as src_dst :
699- center = list (src_dst .mosaic_def .center )
700- if minzoom is not None :
701- center [- 1 ] = minzoom
702-
699+ bounds = src_dst .get_geographic_bounds (tms .rasterio_geographic_crs )
700+ minzoom = minzoom if minzoom is not None else src_dst .minzoom
701+ maxzoom = maxzoom if maxzoom is not None else src_dst .maxzoom
702+ center = (
703+ (bounds [0 ] + bounds [2 ]) / 2 ,
704+ (bounds [1 ] + bounds [3 ]) / 2 ,
705+ minzoom ,
706+ )
703707 return {
704- "bounds" : src_dst . bounds ,
708+ "bounds" : bounds ,
705709 "center" : tuple (center ),
706- "minzoom" : minzoom if minzoom is not None else src_dst . minzoom ,
707- "maxzoom" : maxzoom if maxzoom is not None else src_dst . maxzoom ,
710+ "minzoom" : minzoom ,
711+ "maxzoom" : maxzoom ,
708712 "tiles" : [tiles_url ],
709713 "attribution" : os .environ .get ("TITILER_DEFAULT_ATTRIBUTION" ),
710714 }
You can’t perform that action at this time.
0 commit comments