From 2e3de21dc5e1118a57eecd4cd373911b051ccf7d Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sun, 19 Jan 2025 19:39:31 -0500 Subject: [PATCH 1/3] Fix GeoDataFrame append error --- leafmap/stac.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/leafmap/stac.py b/leafmap/stac.py index 0574033d3e..9d33025594 100644 --- a/leafmap/stac.py +++ b/leafmap/stac.py @@ -2,7 +2,7 @@ import pystac import requests from typing import Optional, Dict, List, Callable, Tuple, Union -from pandas import DataFrame +import pandas as pd class TitilerEndpoint: @@ -1509,7 +1509,7 @@ def stac_search_to_gdf(search, **kwargs): return gdf -def stac_search_to_df(search, **kwargs) -> DataFrame: +def stac_search_to_df(search, **kwargs) -> pd.DataFrame: """Convert STAC search result to a DataFrame. Args: @@ -1883,7 +1883,7 @@ def maxar_all_items( if child_id == child_ids[0]: gdf = items else: - gdf = gdf.append(items) + gdf = pd.concat([gdf, items], ignore_index=True) else: if child_id == child_ids[0]: items_all = items @@ -2175,7 +2175,6 @@ def oam_search( GeoDataFrame | list: If return_gdf is True, return a GeoDataFrame. Otherwise, return a list. """ - import pandas as pd from shapely.geometry import Polygon import geopandas as gpd From 1277dccfd841c1f425fe56e24e6e06b7178728e3 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sun, 19 Jan 2025 21:03:29 -0500 Subject: [PATCH 2/3] Fix localtileserver colormap issue --- leafmap/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/leafmap/common.py b/leafmap/common.py index 11ef636459..054dce9d91 100644 --- a/leafmap/common.py +++ b/leafmap/common.py @@ -2962,6 +2962,9 @@ def get_local_tile_layer( if isinstance(nodata, str): nodata = float(nodata) + if isinstance(colormap, str): + colormap = colormap.lower() + if quiet: output = widgets.Output() with output: From 4927a6586414462315ef8095901223d6918ef274 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sun, 19 Jan 2025 21:07:16 -0500 Subject: [PATCH 3/3] Pin localtileserver version --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index ca6fe92278..cf1d6099da 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -17,7 +17,7 @@ h5py jupyterlab>=3.0.0 keplergl laspy -localtileserver>=0.10.1 +localtileserver>=0.10.6 lonboard mapclassify>=2.4.0 maplibre