Skip to content

Commit

Permalink
Fix GeoDataFrame append error (#1031)
Browse files Browse the repository at this point in the history
* Fix GeoDataFrame append error

* Fix localtileserver colormap issue

* Pin localtileserver version
  • Loading branch information
giswqs authored Jan 20, 2025
1 parent fc1ebef commit 0859f89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions leafmap/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0859f89

Please sign in to comment.