NewGraphEnvironment / dff-2022

Building digital field forms and processing data collected using R, postgresql, QGIS and other tools
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

script to `create.dir`s and rename photos for reporting and submission to PSCIS #34

Closed NewGraphEnvironment closed 8 months ago

NewGraphEnvironment commented 1 year ago

might need to resize too since we did not switch the photos down to small untill recently.

This should be straight forward. We definitely want to append the name (ex. upstream, tag_extra1, etc.) to the end of the filename to keep all the original info stored in the filename (lots of clues about who did it, when, plus the sorting thing ;>)

NewGraphEnvironment commented 1 year ago

this works to make directories and rename the photos. assumes the size and format are fine. Does not yet assign the tags to the photo name for "extra" photos.

https://github.com/NewGraphEnvironment/fish_passage_moti_2022_reporting/blob/d517af09de62de50920d26b7e5ef39c803e1da64/scripts/functions.R#L30

if we needed to resize after we have dumped to directories and renamed (we shouldn't if we set the photo size to Low in the Mergin Maps tab of the Project Properties

# here we have a bit of a glitch bc our files were so big before.  We need to resize the Bittner photos
filestoconvert <- list.files(path = 'data/photos',
                             recursive = T,
                             full.names = T)

directory_names <- dirname(filestoconvert)

mapply(fpr::fpr_photo_resize_convert,
       photo =  filestoconvert,
       path = directory_names,
       size = "1296 x 972!")
NewGraphEnvironment commented 8 months ago

closing in favour of https://github.com/NewGraphEnvironment/dff-2022/issues/65