Opening, Editing and Saving Package Files?

Roger EdrinnRoger Edrinn Global Mapper UserPosts: 721Trusted User
edited May 2011 in Vector Data
Afraid I'm missing a basic GM concept.

I'm trying to open, edit and save the changes to package files, its not happening.

Some basics: I started with 10-meter DEMs, created contours which were saved in a multi-cell package, the contours had defects which I need to manually edit and delete. Two problems:
1] If I open the whole package and edit/delete, as I traverse the files close behind me and the deletions disappear. Huh?!?
2] If I open individual cells of the package and attempt to save them, GM wants to save as a workspace when I opened a package.

So, someone please explain how this is handled in Global Mapper?

Thanks

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    Roger,

    Are you talking about Global Mapper Package (GMP) files or map catalog files? If you are using map catalogs, there is a limitation with vector features in that any edits to vector features are lost as soon as that file from the catalog is unloaded unless you have exported it out to a new file. I eventually plan to address this, but it is not a simple fix so I've put it off so far.

    All saves to a new data file in Global Mapper should be done by a File->Export menu command. The File->Save Workspace menu command (and the save button on the toolbar) are just for saving workspace files.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited December 2007
    Mike
    Are you talking about Global Mapper Package (GMP) files or map catalog files?
    The files have the extension .gmp, so that is a package file to me. Apparently, the group of several package files is a catalog file, .gmc. So I opened the catalog of package files, traversed cell to cell and GM did warn me it was deleting my changes.

    Can I export to a package file? Also, best to open catalog or single package files?

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    Actually a catalog file (.gmc) is a file containing a group of any type of files, including package files. It is used to automatically manage the loaded and unloading of files as you zoom in and out to allow huge collections of data to be loaded without running out of memory. Of course, the automatic unloading of the data is what causes the problems with the edits being lost from map catalog data.

    You can export to a package file using the File->Export Global Mapper Package file menu command.

    If you are going to be editing, do NOT open the catalog file as you can easily lose edits. Just load the package files that you are going to be editing. Only use the catalog files for browsing large collections of data.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited December 2007
    Thanks Mike . . . that helped a lot. :)
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited December 2007
    Unexpected results, exporting to a Package File.

    I have 200+ shapefiles covering a 3 x 7 degree area contained in a workspace, which on disk are 32MB. I exported that to a Package File and it grew to 260MB, AND it still imports the original shapefiles when opening. What did I accomplish?

    My goal was to have the 3 x 7 deg area open as needed for my 1 x 1 deg extents of gridded output, much like the contour package files.

    I would have used a catalog file, but I can't nest catalog files in a catalog file and the 200+ shapefiles are but one "layer" of many layer types I need for my final output.

    Suggestions?

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    Were the 200+ shapefiles that you exported to the package file only 32MB on disk? Did that include the size of both the SHP and DBF files (the DBF files contain the attribute information)? I would not expect a Global Mapper Package file to be significantly larger than a collection of Shapefiles that it was created from, and in most cases I would expect it to be smaller.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited December 2007
    Were the 200+ shapefiles that you exported to the package file only 32MB on disk?
    Yes. But remember that is in the context of a GM workspace file. Clearly it opens each individual shapefile and attaches? the attributes, I spent 2-months on, during open. At least that is my understanding watching the 5-minute workspace open.

    Did that include the size of both the SHP and DBF files (the DBF files contain the attribute information)? I would not expect a Global Mapper Package file to be significantly larger than a collection of Shapefiles that it was created from, and in most cases I would expect it to be smaller.
    That you would know better than I. I simply read the size from Windows Explorer. Does the package suck in the source shapefiles? Whereas the workspace does not. That could easily account for the size difference.

    I considered making three new shapefiles (Area, Flowline,and Waterbody) covering the entire 3 x 7 deg area, but I concluded that while that would reduce the file count from 200+ to 3, it would not aid the output gridding.

    I'm looking for a "best practices" solution, I'm open to suggestions.

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    Workspace files just reference source files to load and also contain any changes that you've made. A package file actually contains all of the original data and changes in a single new GMP file. Once you have a package file there is no need to load the original data anymore.

    You should be able grid from the package file (or any collection of files) without any problems. The package file will show up in the Overlay Control Center as a separate layer for each layer that was exported into the package file. This makes it easy to turn individual layers on and off while still maintaining the simplicity of having everything in a single file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited April 2009
    Actually a catalog file (.gmc) is a file containing a group of any type of files, including package files. It is used to automatically manage the loaded and unloading of files as you zoom in and out to allow huge collections of data to be loaded without running out of memory. Of course, the automatic unloading of the data is what causes the problems with the edits being lost from map catalog data.

    You can export to a package file using the File->Export Global Mapper Package file menu command.

    If you are going to be editing, do NOT open the catalog file as you can easily lose edits. Just load the package files that you are going to be editing. Only use the catalog files for browsing large collections of data.
    Still having a bit of a problem with saving package files.

    If I've loaded say 10 package files, edited them, and saved the entire edited group to a workspace. All is well, when I open the workspace, its macro will apply all the edits.

    I want to overwrite each individual package file so when I open each later in a catalog file, the edits will appear. How do I best do this?

    Can I simply use the layer manager, turn off all but one layer and export the single layer to it's source? Then repeat for each package? Another more elegant way?
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited April 2009
    Can I simply use the layer manager, turn off all but one layer and export the single layer to it's source? Then repeat for each package? Another more elegant way?
    This worked, so unless theirs a more elegant way, I have the answer.

    BTW: I must remember to turn off the grid, else I'll embed it in my package file, correct?
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2009
    The way you described of turning off all layers but the ones that you want to export, then repeating for other layers is currently the best way to do this.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited April 2009
    That is correct, you will need to remember to turn off the grid line display otherwise that will be in your package files as well.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited April 2009
    Thanks Mike.

    Too bad I can't remember year-to-year all these nuances, but I do search before posting. So next year I'll only have to read this thread.
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2011
    2 years later, same problem, I need to open dozens of package files and edit each and re-save. Now that I'm at GM v12.02 has anything changed? Can I save a package file or must I export to save?

    Thanks

    BTW The reason for the edit is that the NED had defects which only become apparent when the contours are produced.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2011
    Saving would create a workspace file which references your original package file and then whatever changes that you made to it. You would have to export to update the original package file with the change and not just have them stored in the workspace. Also the same issue exists with losing edits if editing vector layers from a map catalog, so if you need to edit from a map catalog you will either need to re-export immediately or load the GMP files directly and not from a map catalog.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2011
    Mike, Thanks for the expanded reply. You anticipated issues far better than I articulated them in my question.

    I'll have ~800 package files in a catalog and I certainly do not want any workspace files involved. So I'll edit out the defects and re-export the few dozen package files that are affected.

    Thanks
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2011
    Mike,

    I'm hoping you have a suggestion, I'm a bit stumped.

    I've loaded the ~800 package files, since my defects are always along cardinal 7.5' lines, easy to find. I can use the ID tool to determine the package associated with the defect. Is there a way to now save just that one package within the context of the 800?

    Do I need to open another instance of GM and edit one package at a time and then export?

    Any suggestions would be most appreciated.

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2011
    You can right-click on the editing package layer and select to save a workspace from that, then load that workspace in a new instance and export. It should keep your edits.

    The other option is to zoom so just the one package is on-screen, then right-click on the Control Center and select to hide offscreen layers, which should hide all but the one package layer. You can then export that, then turn everything else back on.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2011
    Unexpected package file export results. The file sizes are being cut in half by the simple act of opening and exporting. Why?

    Here's a 500KB Test Package File for you to open and re-export. I attempted to store it on the forum, "Invalid File Type" ???

    I checked one of the contour lines, same number of vertices in both files.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2011
    I'm guessing your original file used double-precision coordinates and when you saved it you didn't check the option to save with double-precision coordinates, so you got single precision coordinates that take half the space. I would actually recommend this as you really only need double-precision coordinates for centimeter-level accuracy or better, so you can save a lot of space by not checking the double-precision option and not lose anything noticeable.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2011
    That makes sense, however I would have never knowingly set double-precision. OTOH the Contour dialog has many switches, could have missed one. I'm suspicious that GM is doing DP on its own, only a test will tell.

    I'll be doing a massive contour project in a few months, I'll test then and provide feedback.

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2011
    The double-precision option is on the package export dialog. Everything is in double-precision when in memory in Global Mapper, but you can choose to just save as single-precision in a package file to save disk space. By default that option is not checked.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.