urbangrammarai / gee_pipeline

Pipeline for retrieving imagery from Google Earth Engine
MIT License
1 stars 0 forks source link

Map Great Britain with Polygons #6

Closed crangelsmith closed 2 years ago

crangelsmith commented 2 years ago

Functionality to consistently and efficiently map Great Britain and create a list of polygons.

Code in here can help:

andrewphilipsmith commented 2 years ago

Also, create an array for storing output results aligned with the same grid.

andrewphilipsmith commented 2 years ago

Three key vector datasets in operation in the pipeline.

The country boundary: We can check with Dani if he has a preferred source for this. But I suspect that this can be quite a simplified geometry - it just has to be detailed enough to decide if a chip is inside or outside. In the absence of another source, this one will suffice: https://github.com/wmgeolab/geoBoundaries/blob/main/releaseData/gbOpen/GBR/ADM0/geoBoundaries-GBR-ADM0_simplified.geojson It would be mildly preferable to convert and store this in BNG, but it is fairly trivial to reproject on demand.

The grid of chips

We will have two sister data structures representing this grid:

  1. A xarray.DataArray (stored as a COG with rioxarray) --> Frame for all predictions and uncertainty score on the inference stage
  2. A geopandas.GeoDataFrame (stored as GeoParquet) with the structure: --> Maps directly on to chip objects to pass through inference
| ID | geometry | ... |

Importantly, 1. and 2. will be fully synchronised in terms of the coordinates. To get this, it might be worth to build 1. and, from there, construct 2. using the to_series feature in DataArray objects

The grid of regions / download images This is the grid of images as they requested from GEE. My understanding is that pyveg represents this as a centre-point and width in degrees (the region_size parameter).

Does this make sense? I would find it helpful to agree on names for these. I’m going to suggest “chips_grid” and “images_grid” - but I’m open to better suggestions ;-)