Skip to content

Commit 23b35b4

Browse files
authored
Change TiTiler demo endpoint (#2303)
1 parent ac05b69 commit 23b35b4

File tree

6 files changed

+31
-31
lines changed

6 files changed

+31
-31
lines changed

docs/notebooks/44_cog_stac.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"metadata": {},
6161
"outputs": [],
6262
"source": [
63-
"os.environ[\"TITILER_ENDPOINT\"] = \"https://titiler.xyz\""
63+
"os.environ[\"TITILER_ENDPOINT\"] = \"https://giswqs-titiler-endpoint.hf.space\""
6464
]
6565
},
6666
{

geemap/common.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,14 +1463,14 @@ class TitilerEndpoint:
14631463

14641464
def __init__(
14651465
self,
1466-
endpoint="https://titiler.xyz",
1466+
endpoint="https://giswqs-titiler-endpoint.hf.space",
14671467
name="stac",
14681468
TileMatrixSetId="WebMercatorQuad",
14691469
):
14701470
"""Initialize the TitilerEndpoint object.
14711471

14721472
Args:
1473-
endpoint (str, optional): The endpoint of the titiler server. Defaults to "https://titiler.xyz".
1473+
endpoint (str, optional): The endpoint of the titiler server. Defaults to "https://giswqs-titiler-endpoint.hf.space".
14741474
name (str, optional): The name to be used in the file path. Defaults to "stac".
14751475
TileMatrixSetId (str, optional): The TileMatrixSetId to be used in the file path. Defaults to "WebMercatorQuad".
14761476
"""
@@ -1573,7 +1573,7 @@ def check_titiler_endpoint(titiler_endpoint=None):
15731573
if titiler_endpoint == "planetary-computer":
15741574
titiler_endpoint = PlanetaryComputerEndpoint()
15751575
else:
1576-
titiler_endpoint = "https://titiler.xyz"
1576+
titiler_endpoint = "https://giswqs-titiler-endpoint.hf.space"
15771577
elif titiler_endpoint in ["planetary-computer", "pc"]:
15781578
titiler_endpoint = PlanetaryComputerEndpoint()
15791579

@@ -5288,7 +5288,7 @@ def cog_tile(
52885288

52895289
Args:
52905290
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5291-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5291+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
52925292
timeout (int, optional): Timeout in seconds. Defaults to 300.
52935293
proxies (dict, optional): Proxies to use. Defaults to None.
52945294

@@ -5355,7 +5355,7 @@ def cog_mosaic(
53555355

53565356
Args:
53575357
links (list): A list containing COG HTTP URLs.
5358-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5358+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
53595359
username (str, optional): User name for the titiler endpoint. Defaults to "anonymous".
53605360
layername ([type], optional): Layer name to use. Defaults to None.
53615361
overwrite (bool, optional): Whether to overwrite the layer name if existing. Defaults to False.
@@ -5424,7 +5424,7 @@ def cog_mosaic_from_file(
54245424
Args:
54255425
filepath (str): Local path or HTTP URL to the csv/txt file containing COG URLs.
54265426
skip_rows (int, optional): The number of rows to skip in the file. Defaults to 0.
5427-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5427+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
54285428
username (str, optional): User name for the titiler endpoint. Defaults to "anonymous".
54295429
layername ([type], optional): Layer name to use. Defaults to None.
54305430
overwrite (bool, optional): Whether to overwrite the layer name if existing. Defaults to False.
@@ -5459,7 +5459,7 @@ def cog_bounds(url, titiler_endpoint=None, timeout=300):
54595459

54605460
Args:
54615461
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5462-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5462+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
54635463
timeout (int, optional): Timeout in seconds. Defaults to 300.
54645464

54655465
Returns:
@@ -5485,7 +5485,7 @@ def cog_center(url, titiler_endpoint=None):
54855485

54865486
Args:
54875487
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5488-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5488+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
54895489

54905490
Returns:
54915491
tuple: A tuple representing (longitude, latitude)
@@ -5503,7 +5503,7 @@ def cog_bands(url, titiler_endpoint=None, timeout=300):
55035503

55045504
Args:
55055505
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5506-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5506+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
55075507
timeout (int, optional): Timeout in seconds. Defaults to 300.
55085508

55095509
Returns:
@@ -5529,7 +5529,7 @@ def cog_stats(url, titiler_endpoint=None, timeout=300):
55295529

55305530
Args:
55315531
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5532-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5532+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
55335533
timeout (int, optional): Timeout in seconds. Defaults to 300.
55345534

55355535
Returns:
@@ -5554,7 +5554,7 @@ def cog_info(url, titiler_endpoint=None, return_geojson=False, timeout=300):
55545554

55555555
Args:
55565556
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
5557-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
5557+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
55585558
timeout (int, optional): Timeout in seconds. Defaults to 300.
55595559

55605560
Returns:
@@ -5594,7 +5594,7 @@ def cog_pixel_value(
55945594
lat (float): Latitude of the pixel.
55955595
url (str): HTTP URL to a COG, e.g., 'https://github.com/opengeos/data/releases/download/raster/Libya-2023-07-01.tif'
55965596
bidx (str, optional): Dataset band indexes (e.g bidx=1, bidx=1&bidx=2&bidx=3). Defaults to None.
5597-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5597+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
55985598
timeout (int, optional): Timeout in seconds. Defaults to 300.
55995599

56005600
Returns:
@@ -5646,7 +5646,7 @@ def stac_tile(
56465646
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
56475647
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
56485648
bands (list): A list of band names, e.g., ["SR_B7", "SR_B5", "SR_B4"]
5649-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "https://planetarycomputer.microsoft.com/api/data/v1", "planetary-computer", "pc". Defaults to None.
5649+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "https://planetarycomputer.microsoft.com/api/data/v1", "planetary-computer", "pc". Defaults to None.
56505650
timeout (int, optional): Timeout in seconds. Defaults to 300.
56515651

56525652
Returns:
@@ -5789,7 +5789,7 @@ def stac_bounds(
57895789
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
57905790
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
57915791
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
5792-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5792+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
57935793
timeout (int, optional): Timeout in seconds. Defaults to 300.
57945794

57955795
Returns:
@@ -5831,7 +5831,7 @@ def stac_center(url=None, collection=None, item=None, titiler_endpoint=None, **k
58315831
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
58325832
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
58335833
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
5834-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5834+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
58355835

58365836
Returns:
58375837
tuple: A tuple representing (longitude, latitude)
@@ -5856,7 +5856,7 @@ def stac_bands(
58565856
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
58575857
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
58585858
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
5859-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5859+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
58605860
timeout (int, optional): Timeout in seconds. Defaults to 300.
58615861

58625862
Returns:
@@ -5906,7 +5906,7 @@ def stac_stats(
59065906
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
59075907
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
59085908
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
5909-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5909+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
59105910
timeout (int, optional): Timeout in seconds. Defaults to 300.
59115911

59125912
Returns:
@@ -5958,7 +5958,7 @@ def stac_info(
59585958
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
59595959
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
59605960
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
5961-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
5961+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
59625962
timeout (int, optional): Timeout in seconds. Defaults to 300.
59635963

59645964
Returns:
@@ -6010,7 +6010,7 @@ def stac_info_geojson(
60106010
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
60116011
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
60126012
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
6013-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
6013+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
60146014
timeout (int, optional): Timeout in seconds. Defaults to 300.
60156015

60166016
Returns:
@@ -6055,7 +6055,7 @@ def stac_assets(
60556055
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
60566056
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
60576057
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
6058-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
6058+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
60596059
timeout (int, optional): Timeout in seconds. Defaults to 300.
60606060

60616061
Returns:
@@ -6110,7 +6110,7 @@ def stac_pixel_value(
61106110
collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l2.
61116111
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
61126112
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
6113-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
6113+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
61146114
verbose (bool, optional): Print out the error message. Defaults to True.
61156115
timeout (int, optional): Timeout in seconds. Defaults to 300.
61166116

@@ -6178,7 +6178,7 @@ def local_tile_pixel_value(
61786178
lat (float): Latitude of the pixel.
61796179
url (str): HTTP URL to a COG, e.g., 'https://github.com/opengeos/data/releases/download/raster/Libya-2023-07-01.tif'
61806180
bidx (str, optional): Dataset band indexes (e.g bidx=1, bidx=1&bidx=2&bidx=3). Defaults to None.
6181-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
6181+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
61826182
verbose (bool, optional): Print status messages. Defaults to True.
61836183

61846184
Returns:

geemap/foliumap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def add_cog_layer(
546546
opacity (float, optional): The opacity of the layer. Defaults to 1.
547547
shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
548548
bands (list, optional): A list of bands to use. Defaults to None.
549-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
549+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
550550
"""
551551
tile_url = cog_tile(url, bands, titiler_endpoint, **kwargs)
552552
bounds = cog_bounds(url, titiler_endpoint)
@@ -586,7 +586,7 @@ def add_stac_layer(
586586
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
587587
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
588588
bands (list): A list of band names, e.g., ["SR_B7", "SR_B5", "SR_B4"]
589-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "planetary-computer", "pc". Defaults to None.
589+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "planetary-computer", "pc". Defaults to None.
590590
name (str, optional): The layer name to use for the layer. Defaults to 'STAC Layer'.
591591
attribution (str, optional): The attribution to use. Defaults to ''.
592592
opacity (float, optional): The opacity of the layer. Defaults to 1.

geemap/geemap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def add_cog_layer(
13081308
opacity (float, optional): The opacity of the layer. Defaults to 1.
13091309
shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
13101310
bands (list, optional): A list of bands to use for the layer. Defaults to None.
1311-
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
1311+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://giswqs-titiler-endpoint.hf.space".
13121312
**kwargs: Arbitrary keyword arguments, including bidx, expression, nodata, unscale, resampling, rescale, color_formula, colormap, colormap_name, return_mask. See https://developmentseed.org/titiler/endpoints/cog/ and https://cogeotiff.github.io/rio-tiler/colormap/. To select a certain bands, use bidx=[1, 2, 3]
13131313
"""
13141314

@@ -1355,7 +1355,7 @@ def add_stac_layer(
13551355
item (str): The Microsoft Planetary Computer STAC item ID, e.g., LC08_L2SP_047027_20201204_02_T1.
13561356
assets (str | list): The Microsoft Planetary Computer STAC asset ID, e.g., ["SR_B7", "SR_B5", "SR_B4"].
13571357
bands (list): A list of band names, e.g., ["SR_B7", "SR_B5", "SR_B4"]
1358-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz", "https://planetarycomputer.microsoft.com/api/data/v1", "planetary-computer", "pc". Defaults to None.
1358+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space", "https://planetarycomputer.microsoft.com/api/data/v1", "planetary-computer", "pc". Defaults to None.
13591359
name (str, optional): The layer name to use for the layer. Defaults to 'STAC Layer'.
13601360
attribution (str, optional): The attribution to use. Defaults to ''.
13611361
opacity (float, optional): The opacity of the layer. Defaults to 1.

geemap/maplibregl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ def add_cog_layer(
10311031
Defaults to None.
10321032
nodata (float, optional): The nodata value to use for the layer.
10331033
titiler_endpoint (str, optional): The endpoint of the titiler service.
1034-
Defaults to "https://titiler.xyz".
1034+
Defaults to "https://giswqs-titiler-endpoint.hf.space".
10351035
fit_bounds (bool, optional): Whether to adjust the viewport of
10361036
the map to fit the bounds of the layer. Defaults to True.
10371037
**kwargs: Arbitrary keyword arguments, including bidx, expression,
@@ -1093,7 +1093,7 @@ def add_stac_layer(
10931093
bands (list, optional): A list of band names, e.g.,
10941094
["SR_B7", "SR_B5", "SR_B4"]. Defaults to None.
10951095
no_data (int | float, optional): The nodata value to use for the layer.
1096-
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://titiler.xyz",
1096+
titiler_endpoint (str, optional): Titiler endpoint, e.g., "https://giswqs-titiler-endpoint.hf.space",
10971097
"https://planetarycomputer.microsoft.com/api/data/v1",
10981098
"planetary-computer", "pc". Defaults to None.
10991099
name (str, optional): The layer name to use for the layer. Defaults to 'STAC Layer'.

0 commit comments

Comments
 (0)