Global Mapper 16
Results 1 to 10 of 10
  1. #1
    Global Mapper User
    Join Date
    May 2012
    Posts
    30

    Default Trouble importing archives of DNCs

    Hi guys,

    I am new to this and have been having a bit of trouble getting my script to work and was hoping you might be able to help.

    Currently I am trying to import DNCs from multiple archives without prompting for coverage information. Now I know my IMPORT_ARCHIVE command is wrong but after a lot of attempts, it was the most progress that I was able to make. The main problem I am having is being unable to reference each library in the archive so that LOAD_FLAGS will work which is why I tried putting a wildcard in there but it doesn't look like the LOAD_FLAGS accepts wildcards. I also wasn't sure about the FILENAME command but decided to try to recreate the pattern I saw in the workspace file.

    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    UNLOAD_ALL

    DIR_LOOP_START DIRECTORY="C:\test\" FILENAME_MASKS="*.ZIP"

    IMPORT_ARCHIVE ARCHIVE_FILENAME="%FNAME_W_DIR%" FILENAME="*\DHT" LOAD_FLAGS="*?COVERAGES=*"

    DIR_LOOP_END

    Any help would be greatly appreciated.

  2. #2
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    I think you just want to use the IMPORT command rather than IMPORT_ARCHIVE. That will recognize it is a .zip and find and load the 'dht' file in it automatically. The IMPORT_ARCHIVE command is only if you just want to load a particular file from the .zip and not just everything in the .zip.

    So something like IMPORT FILENAME="%FNAME_W_DIR%" LOAD_FLAGS="*?COVERAGES=*"

    inside your loop.

    Thanks,

    Mike

  3. #3
    Global Mapper User
    Join Date
    May 2012
    Posts
    30

    Default

    Mike,

    Thanks for the quick reply. However, your answer didn't seem to work. I have just one archive to try and test this out right now named louisiana.zip with five individual libraries inside and the results of running the script are as follows:

    Removed all loaded overlays.
    Starting loop over all files in directory...
    Importing file C:\test\louisiana.zip...
    WARNING: Unable to load overlay louisiana.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    WARNING: Unable to load overlay louisiana.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    WARNING: Unable to load overlay louisiana.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    WARNING: Unable to load overlay louisiana.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    WARNING: Unable to load overlay louisiana.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    WARNING: No overlays could be loaded from file <C:\test\louisiana.zip>.
    Loop over files in directory completed.
    Script processing COMPLETED.

  4. #4
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    What does your IMPORT command look like? Make sure NOT to add the TYPE parameter and let the file be recognized as a .zip and loaded appropriately. If you specify the type it will not auto-detect that it's an archive file.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  5. #5
    Global Mapper User
    Join Date
    May 2012
    Posts
    30

    Default

    I used the IMPORT command that you posted previously. So it would be:

    IMPORT FILENAME="%FNAME_W_DIR%" LOAD_FLAGS="*?COVERAGES=*"

    Is it because the files inside the root archive are also .zip? Although I don't understand why that would be the problem when importing this archive manually and clicking OK on the coverage prompts works fine.

    Thanks again.

  6. #6
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    Oh do you have zip files within the .zip files you are trying to load? That is a special case. There is actually now support for wildcards in the FILENAME parameter of an IMPORT_ARCHIVE command, so if you have the latest release of Global Mapper the following might work:

    IMPORT_ARCHIVE ARCHIVE_FILENAME="%FNAME_W_DIR%" FILENAME="*.zip" LOAD_FLAGS="*?COVERAGES=*"

    That should import any .zip files within the main archive .zip and pass in those load flags.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  7. #7
    Global Mapper User
    Join Date
    May 2012
    Posts
    30

    Default

    It looks like it is getting closer. It has started recognizing the filenames of the archived DNCs inside the main archive. However, it is still giving me problems. Here is the output trimmed a little bit because the errors are all the same:

    Removed all loaded overlays.
    Starting loop over all files in directory...
    Importing file *.zip from archive C:\test\louisiana.zip...
    WARNING: Unable to load overlay A1508800.zip
    VPFOverlay.cpp - 1332
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    ...
    WARNING: No overlays could be loaded from file <*.zip>.
    Loop over files in directory completed.
    Script processing COMPLETED.

    This is still using the same script as before but with the IMPORT_ARCHIVE command modified to the one is your previous post.

    Also, I am not sure if this is the same problem or not but while testing this out I changed the COVERAGES=* to COVERAGES=''HYDROGRAPHY'' (with two single quotes) to see what would happen and got a slightly different error:

    Removed all loaded overlays.
    Starting loop over all files in directory...
    Importing file *.zip from archive C:\test\louisiana.zip...
    WARNING: Error loading VPF library data.
    No library with the name * found.
    VPFOverlay.cpp - 318
    Version: v13.1.3 (32-bit)
    Build Time: Mar 28 2012 20:16:10
    Use Ctrl+V to Paste Error
    ...

    Could the problem be with the *? at the beginning of the LOAD_FLAGS command?

    Thanks for all of the quick responses and being patient with me. I have spent the last day and a half trying to get this to work properly...

  8. #8
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    Try just using LOAD_FLAGS="COVERAGES=*". This should just load all of the coverages without a prompt I believe.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  9. #9
    Administrator
    Join Date
    Jun 2007
    Posts
    16,451

    Default

    Actually sorry, try LOAD_FLAGS="COVERAGES=''*''", where what is around the * is the double single quotes.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com

  10. #10
    Global Mapper User
    Join Date
    May 2012
    Posts
    30

    Default

    THANK YOU!! I know I tried the COVERAGES=* before and it didn't work but it works perfectly with the double single quotes! You have saved me from a lot more frustration.

 

 

Similar Threads

  1. Trouble importing NAIP imagery data
    By Vik in forum Technical Support
    Replies: 4
    Last Post: 04-18-2012, 05:57 PM
  2. VPF - Script Convert DNCs to Shapefiles
    By agenteh2o in forum Vector Data
    Replies: 9
    Last Post: 04-01-2012, 12:02 AM
  3. Having trouble importing jpg with .ers
    By ai3d in forum Raster Data
    Replies: 7
    Last Post: 04-14-2011, 04:26 AM
  4. Trouble with importing wilderness.net map data
    By DaveGoodrich in forum Technical Support
    Replies: 1
    Last Post: 11-16-2010, 05:25 PM
  5. Trouble importing .map files
    By planing28 in forum Downloading Imagery
    Replies: 2
    Last Post: 06-26-2009, 12:05 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.1
Copyright 2008-2012 Globalmapperforum.com
All times are GMT. The time now is 12:19 AM.
vBulletin 4.0 skin by CompleteVB