Doodleverse/seg2map

Organize downloaded tifs by year

Closed this issue · 4 comments

graph TD
    A[Download Imagery]
    A2[concurrently download multiband & single band ]
    B[save single band tifs in tile directories]
    C[Save all multiband imagery in single multiband directory]
    D[Organize .tif files by year into year directories]
    F[Make a merged_multispectral tif for each year]
    A -->  A2 --> B & C
    B & C -->|make directory for each year| D  --> |For all year directories except under singleband directories| F

Loading

Users will want to load merged multispectral .tif files for each year they downloaded imagery for. Add new functions that sort the downloaded .tif files by year and move them to the corresponding year directories. Do this for all tifs in the multiband directory and all the tile directories containing the single band imagery. Only create merged multispectral .tif files for each year for the multiband imagery. Perform this function for each ROI directory.

The filenames for .tif files are organized like so P_DOQQ_m_4012407_se_10_060_ <year><month><day>.N.tif and here are some examples:

# example single band tif
P_DOQQ_m_4012407_se_10_060_20200714.N.tif
# example single band tif for 2010 06 12 AKA 2010 June the 12th
tile0_USDA_NAIP_DOQQ_m_4012407_se_10_1_20100612.tif
# example multiband tif
multiband0_USDA_NAIP_DOQQ_m_4012415_ne_10_1_20100629.tif

I wonder if this is all we actually need ...

graph TD
    A[Download Imagery]
    A2[download multiband ]
    C[Save all multiband imagery into a multiband directory]
    D[Organize .tif files by year into year directories]
    F[Make a merged_multispectral tif for each year]
    A -->  A2 --> C
    C -->|make directory for each year| D  --> |For all year multiband directories| F

Loading

(the models I am making are only for RGB multiband imagery)

Oh good to know! Should we still provide the user to download single band imagery?
Maybe there is a box where they can choose if they want to download:

  1. Multiband imagery only
  2. Single band imagery only
  3. Both single and multiband imagery

This would make Seg2map similar to coastsat where you choose the type of imagery being downloaded and would make Seg2map open to more use cases down the road potentially. What do you think?

Yes, it would be a good idea to retain the ability to download single bands. For now, we could simply 'hide' those codes, or yes you could make a box that would download either multiband OR singleband (but never both). For now, we'll only provide models for multiband

Sounds good I'll work on getting everything working for multiband first then plug in the single band functionality

  • Modify functions to allow whether multiband, single bands , or both will be downloaded