Open nagyrobir opened 11 months ago
I think this one is because to_geopandas()
doesn't currently handle a pyarrow.Table
. It perhaps should (or at least should do a better job erroring), but in the meantime I think you can do:
# ...
df = dataset.to_table().to_pandas()
df.geometry = df.geometry.geoarrow.to_geopandas()
# ...I forget exactly how to get a pandas.DataFrame into a geopandas.GeoDataFrame
I saw that the type( dataset.to_table()) returns a pyarrow.lib.Table.I guess getting it into geopandas from pandas works well then so i can stick to that, i thought i was doing something wrong. I think you guys are doing a wonderful job! and thank you again. I'll hang around to see what new things you push to the repo!
(re-opening, because we should make this work)
Hi!
This is sort of a continuation of #16. When i try to convert the original dataset with the "to_geopandas" method i get the error bellow. Is there anything i am doing improperly?
import geopandas as gpd import pyarrow.parquet as pa from pyarrow.parquet import read_table import shapely import geoarrow.pyarrow as ga
tb = read_table(r"/home/parquet/buildings.parquet") dataset = ga.dataset(tb,geometry_columns=["geometry"])
gp=ga.to_geopandas(dataset.to_table())