Score:0

Copy and paste zip files based on name

cn flag

I have DEM zip files that include decimal degrees in the name of the files (ex: TDM1_DEM_30_N01E007.zip). I need to reorganize all the zip files into new folders based on UTM zone. All the zips are currently organized in folders based on northing then further into easting/westing. Any help would be great.

Edit: I need a script to help me move these files into new directories on my computer. Doing this manually will take hours. For example, UTM zone 32N is within the boundaries of N00°-N08° and E00°-E06°. If I have a zip file of a tiff with the name "TDM1_DEM_30_N01E005", then that means the tiff image is located at N01° E005°. How can I write a script to move this zip file into the 32N folder, as well as all other zip files into their respective folders. I have a shapefile of the UTM zone boundaries. I hope this makes more sense.

Bodo avatar
pt flag
This question doesn't seem to be specifically related to Ubuntu, and it is not even clear what exactly you need help with. That's why it is difficult to suggest a better site for this question. Please [edit] it and add more information: Show an example of a few files and the expected result. Do you want to find an algorithm to detect the time zone from the coordinates specification? Do you want to find a data source / table for this relation? Do you need help writing a script to implement this, assuming you already have a data source required for this transformation?
cn flag
Don't exclude libreoffice calc for this as a method: put files in a text file, open in calc and create "mv" stmts based on these files. Change new name with a search+replace. Save in text file and execute it.
pLumo avatar
in flag
Check https://gis.stackexchange.com/questions/360024/converting-latitude-and-longitude-to-multiple-utm-zones and https://gis.stackexchange.com/questions/263239/lat-lon-to-utm-conversion-across-multiple-zones
pLumo avatar
in flag
You can use: `python` -> `import math; math.floor(((int(longitude) + 180) / 6) % 60) + 1` to find UTM zone with longitude being "007" in your first example. However, I agree this is not about Ubuntu, you should ask at https://gis.stackexchange.com/ or check the questions I linked.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.