sgrieve / gdbm

MIT License
0 stars 0 forks source link

Clip out lakes #2

Closed sgrieve closed 4 years ago

sgrieve commented 4 years ago

It seems that the Global Lakes and Wetlands Database is the best way to go here: https://www.worldwildlife.org/pages/global-lakes-and-wetlands-database

paper: https://www.sciencedirect.com/science/article/pii/S0022169404001404

I want to use the polygon data, so I will need to download and merge the level 2 and level 1 datasets.

To do:

Note It may be better to run the clipping prior to the splitting into sub zones. This could be combined with attempts to increase the size of the climate zone tiles.

sgrieve commented 4 years ago

After reviewing the level 1 and 2 datasets, it has become clear that using the level 2 data will not be appropriate. For example, the Florida panhandle, with only the level 1 lakes, and then with the levels 1 and 2 lakes:

Screenshot 2020-06-22 at 15 14 14 Screenshot 2020-06-22 at 15 14 22

Using the level 2 data we will wind up with far too many small holes in the climate zones below the scales that we are interested in.

sgrieve commented 4 years ago

Starting to work on the clipping code has revealed a potential issue: as we remove lakes, we may create non connected sub climate polygons. These will either need to be split away form the main polygon into their own file, or if they are too small, removed from the dataset altogether.

Screenshot 2020-06-23 at 15 38 33

Another issue is the need to remove interior islands from within lakes - this is done by only extracting the exterior geometry of each lake.

sgrieve commented 4 years ago

Commit 66d7333 adds a wip script to do the clipping. It contains a function that punches out all lakes that intersect a given zone. Depending on speed, this can just be looped over on my macbook or can be run in parallel on Apocrita.

sgrieve commented 4 years ago

The code in 66d7333 also removes any small new polygons that make up less than 1/5 of the total area of the original input climate polygon.

sgrieve commented 4 years ago

First pass running the code on all of the lakes has found 2 small zone that are entirely within lakes. Zone deleted in a199483 and 916d0d4.

sgrieve commented 4 years ago

GLWD_ID 168 is actually two topologically disconnected bodies of water, this screws up our processing, so I have split these 2 bodies of water into two separate polygons, with ID 168 and 3722. Due to file sizes I am not commiting these data to the repo at present.

sgrieve commented 4 years ago

This work is now done, and the new clipped tiles have been committed in d405cef.