pysal / tobler

Spatial interpolation, Dasymetric Mapping, & Change of Support
https://pysal.org/tobler
BSD 3-Clause "New" or "Revised" License
144 stars 30 forks source link

Example of masked areal interpolation #197

Open martinfleis opened 7 months ago

martinfleis commented 7 months ago

Do we have an example notebook for masked area interpolation? The one using raster. I thought I have seen it before and wanted to share it with a student but can't find anything now. @knaaptime do you have it in some research code available somewhere, at least?

knaaptime commented 7 months ago

dang. the logic is here, but that's all been wrapped into the function now and it doesnt look like i ever pushed up an updated example. Lame on my part. Let me find something for you

knaaptime commented 7 months ago

https://github.com/pysal/tobler/blob/main/notebooks/binary_dasymetric.ipynb (wong link earlier)

martinfleis commented 7 months ago

I've seen that one but was hoping to find a direct application of masked_area_interpolate

knaaptime commented 7 months ago

yeah i'll grab you one

knaaptime commented 7 months ago

not much explanation here (and it works a lot better with the interactive map), but here's a barebones example https://gist.github.com/knaaptime/7067008cac2837aa131793f0f3f1faca

martinfleis commented 7 months ago

You're the best! Thanks!

knaaptime commented 6 months ago

@martinfleis unrelated, but whats up with shapely sending those invalid value encountered in intersection warnings?

martinfleis commented 6 months ago

GEOS issue that in fact does not affect the outcome. Some of it was fixed in GEOS 3.12 but I'm not sure if all.