Comments (4)
Do you have a reproducible example? Or can you show the stacktrace if you turn the warning into an error?
I don't see anything with this simple example (using master of all):
import geopandas
import dask.dataframe as dd
df = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres")).to_crs("EPSG:3857")
ddf = dask_geopandas.from_geopandas(df, npartitions=4)
ddf['area'] = ddf.geometry.area
from dask-geopandas.
I missed one important line, sorry. It happens with renamed geometry column.
import geopandas
import dask_geopandas
df = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres")).to_crs("EPSG:3857")
df = df.rename_geometry('geom')
ddf = dask_geopandas.from_geopandas(df, npartitions=4)
ddf['area'] = ddf.geometry.area
Thinking about it now, we may have to fix that in GeoPandas, because you can reproduce it without dask as
df = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres"))
df = df.rename_geometry('geom')
geopandas.GeoDataFrame(df, crs=4326)
With geometry column geometry
this is either silent if you pass the same CRS or warns about CRS mismatch if you pass different one. With a different name, it does not see existing geometry in the first place. Even geopandas.GeoDataFrame(df).geometry
breaks if you rename the column before.
from dask-geopandas.
Ah, yes, that seems indeed something to solve in geopandas (or at least the pure geopandas snippet should also not warn I think?)
from dask-geopandas.
Yeah, in the creation of GeoDataFrame from another GeoDataFrame we should capture that and pass metadata (geometry column, maybe crs for now) to a new one. I'll move this issue to geopandas repo.
from dask-geopandas.
Related Issues (20)
- Drop distributed as a required dependency? HOT 2
- Question regarding parallelism over many seperate GeoSeries HOT 2
- dask geopandas to parquet does not seem to persist spatial paritions HOT 1
- Can someone answer why the number and x columns of '201105. shp' in the output of this code also become 0? HOT 1
- msgpack - ValueError: 2369781118 exceeds max_bin_len(2147483647 HOT 1
- Remove dask anti-pattern example on README and docs HOT 1
- DeprecationWarning: underlying geometries through the `.data` attribute is deprecated HOT 1
- Error when reading geoparquet file HOT 3
- Support latest dask.dataframe with query planning (dask-expr) HOT 3
- ddf._meta_nonempty doesnt instantiate correctly when calling `from_dask_dataframe` HOT 1
- BUG: `to_parquet()` failing with `dask=2024.4.1` HOT 2
- Uninformative AttributeError for aggregation methods
- AttributeError: 'DataFrame' object has no attribute 'within' HOT 9
- Can `GeoDataFrame.crs` set `None`? HOT 5
- spatial_shuffle fails when loading from a shapefile HOT 9
- `ValueError: 'left_df' should be GeoDataFrame, got <class 'tuple'>` using sjoin after `spatial_shuffle` HOT 7
- dissolve does not accept multiple columns to groupBy
- ValueError: 'left_df' should be GeoDataFrame, got <class 'tuple'> HOT 2
- spatial_shuffle fails when loading from a geopackage HOT 1
- Error when importing dask_geopandas.expr on Python 3.10 when Dask query planning is disabled HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dask-geopandas.