Digger - Batch Mode
  • May be missing something obvious - so apologies if I am.

     

    We have been using Digger, very successfully, to load different datasets into navigator - but always via the GUI.  We now find that some of the datasets are changing more often than we anticipated and that they need to be regenerated at least twice a month.  Is there a batch mode we can invoke to process then imports automatically?  We have tried what we think are the likely command line options - but no luck.

     

    Thanks

     

    Andrew

  • 17 Comments sorted by
  • You need "diggerConsole" (try this keyword to search this forum), which will do only the 5th step (run). You can use it if the configuration is the same all the time.
    regards
       Martin
  • Only link I found came back "not found".......

     

     

  • It seems to be asking for a digger_config.xml - do not seem to have one?
  • Seems to work if you first of all point it towards the ???.mca - this creates a directory of the same name. remove this new directory and then rerun pointing at the the xml file . This will regereate the MCA file but deletes the directory that contains the digger_config.xml.

     

    Is this correct?

     

    Andrew

  • That is the correct behaviour. (I think.) That's like it happens to me, when I'm creating new .mca-files.

    It is like using the GUI-Tool diggerQt.exe for generating .mca's. At the last step (in the GUI) you decide if you want to "Compress imported data" or even not. If you don't compress data, you have your folders and files to browse. If you compress them, you get the mca.

    For automated generation I wrote myself a shell-script, a simple java-programm and a sample-config.xml file, which I use to generate new .mca's. So, I do not need to open and repack a mca-file.

  • If you just modify the source (say some mypoi.csv file) you can use "digger_config.xml", which is already stored in your MCA file. If it is not working this way than it is a bug. If you have to specify the path to "digger_config.xml", you can do it like "mypoi.mca\digger_config.xml", i.e. the same way as if MCA file is directory of the same name.
  • Hi and I almost got it working. Looks like the output is creating a file with the same name as the temp folder, and fails:

    O:\>DiggerConsole.exe Import\LiveTraffic.mca\digger_config.xml
    Qt: Untested Windows version 6.2 detected!
    Import started, output path is 'Import\LiveTraffic.mca'
    [Step 1] : test 231 source objects...
    ..........................................................................100%
    231 map objects loaded.
    [Step 2] : sort plot indices...
    ..........................................................................100%
    [Step 3] : write graphic entity files...
    ..........................................................................100%
    [Step 4] : write database files...
    ..........................................................................100%
    3 icons copied.

    Error: mapFactor exception: can't open file 'Import\LiveTraffic.mca'


     Directory of O:\Import

    18.02.2014  20:16    <DIR>          .
    18.02.2014  20:16    <DIR>          ..
    18.02.2014  20:14    <DIR>          LiveTraffic
    18.02.2014  20:14    <DIR>          LiveTraffic.mca

    Bug in diggerconsole or operator?

    JJ


    PS: Forum software does not work with Internet Explorer 11 on Windows 8.1 ("Body is required" error message)

  • Hi Johnjore

    I've just gone through the same process and initially with the same result. If you look in the 'import' folder you will find a folder called LiveTraffic.mca. You cannot have a file with the same name as this folder so trying save a file called LiveTraffic.mca will fail - as you discovered. I found that by deleting this folder and re-running the console command it worked just fine
  • Hi and I retried with import folder empty.

    Still fails with the same error(s). Even tried running it on Windows XP and with UAC disabled on 8.1. Import folder remains empty.

    C:\Data\Navigator\diger_console_12_2_2>DiggerConsole.exe LiveTraffic.mca\digger_config.xml
    Qt: Untested Windows version 6.2 detected!
    Import started, output path is '.\LiveTraffic.mca'
    [Step 1] : test 231 source objects...
    ..........................................................................100%
    231 map objects loaded.
    [Step 2] : sort plot indices...
    ..........................................................................100%
    [Step 3] : write graphic entity files...
    ..........................................................................100%
    [Step 4] : write database files...
    ..........................................................................100%
    3 icons copied.

    Error: mapFactor exception: can't open file '.\LiveTraffic.mca'

    C:\Data\Navigator\diger_console_12_2_2>type digger.log
    DMP 2014/03/03 20:56:50 import started
    ERR 2014/03/03 20:56:55 Exception thrown: .\src\filedriver\win32\FilePlatform.cpp(63)
    ERR 2014/03/03 20:56:55 Exception std::exception& ex caught: .\src\Importer.cpp(150) message:'mapFactor exception: can't open file '.\LiveTraffic.mca''
    DMP 2014/03/03 20:56:55 import finished

     Directory of C:\Data\Navigator\diger_console_12_2_2\LiveTraffic
    03.03.2014  20:56               741 digger_config.dcb
    03.03.2014  20:56             2 505 digger_config.xml
    03.03.2014  20:56               329 id.tm6
    03.03.2014  20:56             1 729 import.mef
    03.03.2014  20:56            78 654 import.ttr
    03.03.2014  20:56             1 478 tie_2_d2m.tth
    03.03.2014  20:56             1 244 tie_2_m2d.tth

     Directory of C:\Data\Navigator\diger_console_12_2_2\LiveTraffic.mca
    10.01.2014  19:07             9 915 default.png.new
    28.01.2014  09:59            18 281 NoURL.png.new
    10.01.2014  19:07             9 915 Ok.png.new

    ?!?

    JJ
  • Only way I could get this to work is to NOT call the XML from within the existing MCA file, but extract it, put it in a folder named what the MCA will be called, and then run diggerconsole foldername\xmlfilename.xml

    foldername.mca is generated with no issues.

    Keep a 2nd copy of the XML as folder and contents will be removed when Diggerconsole creates the MCA file.

    JJ
  • Sorry for bringing up this old thread, but I would like to use digger console as well. The link is not working though. It mentions "diger_console...." but also when changing it to "digger_console..." it does not work.

    Next to that: it says it is version 12.2. I can only find digger 12.1.5.
    Can someone give me a hand here?
  • *** Bump ***

    Anyone on this? For "my" wikipedia/wikivoyage "project" I would really like to use it.

    I simply wrote a script, running a few python scripts, to extract the data from wikipedia, but that's for 43 countries currently. I don't want to run DiggerQT 43 times (of 86 if I do both wikipedia and wikivoyage) if I can run it from the command line in the same script.
  • Thanks. I will check it.

    I just started in a new job last week and I'm currently extremely busy making very long hours. That's also why I don't react promptly.
    I try to make some progress this week (lonely in the hotel) or possibly next weekend.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion