Dfs2 to dfs0 (zonal statistics) #410
Unanswered
nielsriegels
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @nielsriegels take a look at this notebook https://github.com/DHI/mikeio/blob/zonal_stats_notebook/notebooks/Dfs2%20-%20Zonal%20statistics.ipynb which is a work in progress. Is this in line with what you are asking for? This is of course an idealized example, but it seems feasible to adapt it multiple named polygons from a Shapefile. One caveat might be that with a high-resolution raster, it might be a bit slow to perform the check which points are in each polygon. But first step is to create something that works, and then optimize. P.S. Contributions to the code or example data, or comments to the discussion is always welcome! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Has anyone developed a script to convert a dfs2 (or dfsu) files to one or more dfs0 files based on a polygon shapefile? I would like to be able to create dfs0 files with values equal to the weighted average of grid values in each polygon in the shapefile. MIKE OPERATIONS has a tool like this.
Beta Was this translation helpful? Give feedback.
All reactions