melowntech / workshop

Workshop of Melown 3D stack
10 stars 3 forks source link

add --overwrite option #2

Closed fnicollet closed 6 years ago

fnicollet commented 6 years ago

Otherwise you get an error like


vts@BG-test-soft-3D-FN:~/mapproxy/datasets/srtm$ generatevrtwo N50E014.tif /var/vts/mapproxy/datasets/srtm --resampling dem --tileSize 1024x1024
2017-07-24 15:34:01 I3 [2411(main)]: [generageVrtWo] Config:
        input = "/var/vts/mapproxy/datasets/srtm/N50E014.tif"
        output = "/var/vts/mapproxy/datasets/srtm"
        tileSize = 1024x1024
        resampling = dem
        minOvrSize = 256x256
        wrapx = false
        background = none
        co =
 {main.cpp:configure():318}
2017-07-24 15:34:01 FF [2411(main)]: Destination directory already exits. Use --overwrite to force rewrite. {main.cpp:run():1147}
2017-07-24 15:34:01 E4 [2411(main)]: [generageVrtWo] Terminated with error 1. {cmdline.cpp:operator()():60}
ladislavhorky commented 6 years ago

Hi, if everything is right, the commands should run without --overwrite without errors for the first time. If they did not run successfully, the problem is somewhere else.

Generally --overwrite option is not a good default. The user should add it only if he/she deems it is appropriate (e.g. he/she messed up last command which failed but created the directories).