Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GeoDataFrame append error #1031

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading