Expand grid functionality and add demo notebook #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Made Changes to grid.py file, setup.py and added a notebook grid_functionality_demo.ipynb in /extras
Problem: The grid generation process in grid.py generates points but the footprints or grid polygons generated do not fully align with the raster outlines.
Therefore, functionality to create the Major-TOM raster tiles exact outlines for facilitating new dataset creations and computations has been added.
Below is a detailed comparison and documentation of the changes introduced in grid.py compared to old grid.py.
1. New Features and Functions Added
2. Changes to Existing Functions
From name to grid_cell.
From epsg to utm_crs.
Ensures the naming matches the columns already in the metadata parquet files
3. Some Tests Added in the Main Section
o Tested for New Functions
o generate_product_outlines_for_utm_zone: Verified with a UTM zone.
o generate_global_product_outlines_by_utm: Checked output folder creation and file generation.
o merge_utm_files_to_wgs84: Ensured correct merging and projection into WGS84.
4. grid_functionality_demo.ipynb:
o The notebook demonstrates the usage of the function and running the notebook generates the product outlines for the default S2 parameters which can be modified.
5. Setup.py:
o Added missing dependencies torchgeo and open_clip_torch to setup.py, which caused import errors.