You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am again seeing some oddities with extract. Wondering if you have any ideas for problem solving it, just not sure where to start. I have a large vector dataset of 70k administrative units in Ethiopia, trying to get monthly precip means for each unit. Precip is from CHIRPs and is 0.05 dd res.
Example image, resampled to 0.01dd.
Open and extract code:
with gw.config.update(ref_bounds=bounds, ref_res=(0.01, 0.01)):
with gw.open(
f_list,
band_names=["ppt"],
time_names=dates,
nodata=-9999,
resampling="bilinear",
) as ds:
print(ds)
df = ds.gw.extract(
aoi=eas,
all_touched=True,
band_names=ds.band.values.tolist(),
time_names=ds.time.values.tolist(),
n_threads=4, # n_jobs creates memory error that is uncaught
verbose=2,
)
print(df.head)
ag = df.groupby(by=["id"]) # ive also tried aggregating by the administrative code, no change
.agg("mean")
)
1st issue, without resampling to a higher resolution say 0.01 dd, 30k+ administrative units return no data, even with 'all touched' as true.
2nd issue, if I do resample, my outputted admin units take on a really weird block pattern. I have also tried the groupby based on the unique code for the admin unit, although id seems to correspond to the index on the features. This is the same for resample = bilinear and nearest.
@jgrss I just shared the dropbox folders with you. Keep in mind also that I am implementing my fix to issue #75, which I am 95% sure is unrelated to this issue. Let me know if you want a more compact example to work with.
I tried to clip the shapefile that you sent by approximating the image bounds in your graphic above. When I did that I received a geopandas error. Are you able to clip the shapefile to a smaller bounding box by gpd.overlay or by:
I am again seeing some oddities with extract. Wondering if you have any ideas for problem solving it, just not sure where to start. I have a large vector dataset of 70k administrative units in Ethiopia, trying to get monthly precip means for each unit. Precip is from CHIRPs and is 0.05 dd res.
Example image, resampled to 0.01dd.
![resample](https://user-images.githubusercontent.com/5185364/135677226-886a1262-229b-452e-b4f0-39c370a68c8c.png)
Open and extract code:
1st issue, without resampling to a higher resolution say 0.01 dd, 30k+ administrative units return no data, even with 'all touched' as true.
2nd issue, if I do resample, my outputted admin units take on a really weird block pattern. I have also tried the groupby based on the unique code for the admin unit, although id seems to correspond to the index on the features. This is the same for resample = bilinear and nearest.
@jgrss
The text was updated successfully, but these errors were encountered: