Global Mapper v25.0

Change Export to Polish MP levels

Perry
Perry Global Mapper User
edited June 2009 in Suggestion Box
Hi Mike,

I would like to ask that the GM Export to Polish MP file be updated to use current MP statement words; particularly when exporting use: EndLevel= rather than Levels=.

From the cGPSmapper User Manual:

“What the EndLevel=n line says is that the coordinates in the highest numbered Datan=
line apply up to the specified EndLevel=n, starting with the level number in the Datan=
line. In our example, EndLevel=3, combined with Data0= means that the coordinates
apply for three consecutive levels commending with level 0 (i.e. levels 0, 1, 2 and 3).
Levels and Levels_Number are "old" equivalents of EndLevel.”

However, in my testing (on a Garmin 60Csx) cGPSmapper 98c does not compile a Levels=3 the same as Endlevel=3. The testing was done with Data0= coordinates. Levels=3 compiles (shows on the 60Csx) the same as Endlevel=2.

GPSmapedit is another program commonly used to work with MP files. The difficulty is that GPSmapedit reads the Levels= value (Levels=3) of map objects but any save done from GPSmapedit will write the same value, EndLevel=value (EndLevel=3). The result, of course, is objects displaying on different levels than expected on the GPS depending on whether the file was last save from GPSmapedit or GM.

Snippet of written by GM (with a MP_BIT_LEVEL attribute to rule out ‘default’ values):
[RGN40]
Marine=N
Type=0x18
Label=Stream
Levels=1
Data0=(47.30378,-122.59863),(47.30376,-122.59185)
[END]

File opened in GPSmapedit and saved:
[POLYLINE]
Type=0x18
Label=Stream
EndLevel=1
Data0=(47.30378,-122.59863),(47.30376,-122.59185)
Marine=N
[END]

Also, it would be nice to have GM Export using the [POI], [POLYGON],[POLYLINE] section names rather than [RGN10], [RGN80], etc. It’s a lot easier for a new person to understand.

In the GM User Manual it would be helpful to clarify that GM ignores any Levels or EndLevel attributes when exporting to Polish MP format.

Program versions: cGPSmapper 98c; GPSmapedit 1.0.57.0; Global Mapper v10.02.

Thanks,

Perry
«1

Comments

  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    Since Perry has started a MP wish list, I'd like to add a few more suggestions.

    I'd like a way to set the levels for [POI]/[Rng10] objects. In my experience, if I have 5 levels, one being blank, hence 4 effective levels, then GM with set points to 3 levels. Too many. So a setting in the dialog to control the number of point levels would be nice.

    Setting the LastImageID via the Registry is crude. Could a field be added to the export dialog to set this value?

    Some of the field values in the export dialog are blanked while other are not, I'd vote that all field values be retained between exports. Only blanking them if GM is closed.

    Since the latest compilers error on Type=literal, I'd like to see an error message or some other clever solution to prevent any Type=literal in the MP export code. Far easier to correct these few errors inside GM vs opening the MP text in an editor.

    Thanks for considering these.
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Perry,

    I am checking with Stan at cGPSMapper to get a clear explanation of the different between 'Levels' and 'EndLevel' to see what the correct behavior is and if I should change what Global Mapper uses. Note that if you are updating an existing MP file with either 'EndLevel' or 'Levels' values and you use that same MP file as a template, then the existing 'EndLevel' or 'Levels' values will be used.

    I am also checking with Stan to see if there is any reason why the newer [POLYLINE], [POLYGON], and [POI] section names shouldn't be used. I believe in the past the older names were used for backwards compatibility reasons with old cGPSMapper versions, but they've probably been supported long enough now by cGPSMapper that a switch would be ok.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Roger,

    For setting which levels you want certain feature types to show up at use the MP_BIT_LEVEL attribute. Here is the User's Manual section describing that attribute:

    Most built-in types already have a default zoom scale at which they will show up in built MP maps (this will translate to a Levels= value for the feature in the exported MP file based on the levels in the MP file header). For custom types and for types that you want to change the default zoom scale for, you can add a MP_BIT_LEVEL attribute to the feature itself or to the default attribute list for a feature type. The value of this attribute should specify the minimum MP zoom bit level that a feature should appear at. For example, if you use the maximum Map Detail setting with no template file, you will get a map with populated zoom levels at 24, 22, and 20 bits. If you wanted a feature to show up in just the lower 2 zoom levels of that map (the 24 and 22 bit resolution layers), you could add a MP_BIT_LEVEL attribute with a value of 22 to your feature or the default attribute list for that type, then that feature would get a Levels=2 value written to the exported MP file. If your map had less detail (say zoom levels of 21, 19, and 17 bits), the same feature would only show up in the most detailed 21 bit layer as features are always present in at least one layer of the map. If you want a feature to always show up at all zoom levels in your map regardless of what zoom levels are present, just add a MP_BIT_LEVEL attribute with a value of 1.

    I'll look into adding some sort of user interface way to set the image id to use for a map. Note of course that now you can also set it using a template file rather than resorting to the registry.

    It looks to me like the map name was the only think on the Polish MP dialog not being saved. I have made that be saved now as well. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.

    Regarding the Type=literal behavior, I have emailed Stan to see if he can restore the previous behavior of generating a warning rather than an error and then just either not including the feature or generating a feature of type 0. I think that behavior was better and would solve this issue without any changes in Global Mapper.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Perry,

    According to Stan @ cGPSMapper the 'Levels' and 'EndLevel' parameters are identical, so you should get identical behavior whichever is used. I have gone ahead and switched to use 'EndLevel' as it is what is in the latest documentation. According to Stan here is the code in cGPSMapper for handling those fields which shows they are identical:

    if((key == "LEVELS" || key == "ENDLEVEL") ) end_level = atoi(value.c_str());

    Based on his feedback I have also switched to use [POLYLINE] and [POLYGON]. I am not using [POI] yet as it also then requires the use of a CITY=Y or CITY=N flag to differentiate between [RGN10] or [RGN20], which I'd rather not add.

    I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the changes for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Roger,

    I just got a response from Stan @ cGPSMapper indicating that you should be getting warnings and not errors for Type=literal in your MP files. Are you using the latest cGPSMapper release? Here is his exact response:

    The way it works (there was no change - or shouldn't be - just did check latest version if is working correctly)


    You can use type translation (sample is in RGNtype.txt - format is simple - section defined by brackets, code - tab char - name)

    BUT when calling cgpsmapper - you have to use this type translation:

    cgpsmapper map.mp -r rgntype.txt

    If you wont' provide that - then you should get a warning:

    demo.mp(139) : Warning W024: Type of element should not be 0.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    Roger,

    For setting which levels you want certain feature types to show up at use the MP_BIT_LEVEL attribute. Here is the User's Manual section describing that attribute:

    Most built-in types already have a default zoom scale at which they will show up in built MP maps (this will translate to a Levels= value for the feature in the exported MP file based on the levels in the MP file header). For custom types and for types that you want to change the default zoom scale for, you can add a MP_BIT_LEVEL attribute to the feature itself or to the default attribute list for a feature type. The value of this attribute should specify the minimum MP zoom bit level that a feature should appear at. For example, if you use the maximum Map Detail setting with no template file, you will get a map with populated zoom levels at 24, 22, and 20 bits. If you wanted a feature to show up in just the lower 2 zoom levels of that map (the 24 and 22 bit resolution layers), you could add a MP_BIT_LEVEL attribute with a value of 22 to your feature or the default attribute list for that type, then that feature would get a Levels=2 value written to the exported MP file. If your map had less detail (say zoom levels of 21, 19, and 17 bits), the same feature would only show up in the most detailed 21 bit layer as features are always present in at least one layer of the map. If you want a feature to always show up at all zoom levels in your map regardless of what zoom levels are present, just add a MP_BIT_LEVEL attribute with a value of 1.
    I'll read this and figure out more after my 3-day backpack. Finished cutting and compiling 352 15-min maps yesterday. I need a break.
    I'll look into adding some sort of user interface way to set the image id to use for a map. Note of course that now you can also set it using a template file rather than resorting to the registry.
    When I prototype I need to change this value with every export. Also the value in the dialog would be a huge help. Yesterday I made a gridding mistake and clicked Cancel, well theirs no global cancel, so I had to cancel each grid box, each of which incremented the counter and I forgot, another lost hour.
    It looks to me like the map name was the only think on the Polish MP dialog not being saved. I have made that be saved now as well. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.
    Actually I was interested in the gridding tab and export coordinates tab. I'd like to see my last export coordinates rather than the global value for everything. I reverse grid almost everything, those two check boxes get unchecked. This was a another awesome feature you added to v9 last year.
    Regarding the Type=literal behavior, I have emailed Stan to see if he can restore the previous behavior of generating a warning rather than an error and then just either not including the feature or generating a feature of type 0. I think that behavior was better and would solve this issue without any changes in Global Mapper.
    Depending on the feature type it is either a non-fatal error or the compiler stops. The non-fatal items are simply lost, seems a waste.

    In my view, assuming it's possible, the place to solve this issue is at GM. Then I can quickly correct the "errors" in my layers. From the correction also comes knowledge, likely I'm doing something wrong.

    Thanks,
    Roger

    PS: Please feel free to take a full day off, this incredible service makes me feel like I'm taking advantage of you.
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Roger,

    I have moved onto Global Mapper v11 development so user interface changes for v10 are basically done, but I can add the image ID control for a v11 build.

    I did go ahead and update the Gridding tab to remember the reverse options. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.

    For the exports, just use the button to 'Reset to Last Exported Bounds' when exporting to use your last exported bounds.

    For the types I would be interested in a MP file that causes a fatal error as Stan @ cGPSMapper seems to indicate this should not be what happens.

    The problem with making the literal types some kind of warning or error in Global Mapper is that exporting the literal type names is actually desirable behavior and was the original way of adding custom type -> MP Type mapping. When there is a literal name for a Type value cGPSMapper could look for that type name in a RGNType.txt (or some other file) and use the type number assignment there. So making a literal type export a warning of some kind would cause those warnings to appear for users using this method of type assignment.

    I actually think what would work best would be if cGPSMapper would display a warning with the full Type string displayed. That way you could just check your build warnings from cGPSMapper and see what unexpected types were exported since only cGPSMapper knows if a literal type name is known or not based on the input provided to it. Global Mapper does not know if the literal type name will be known or not.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Perry
    Perry Global Mapper User
    edited May 2009
    Mike,

    Thanks for looking into the Levels – EndLevel thing. I must have had something else going on / messed-up which mislead me. I’m not familiar with the program language used by Stan, but I did a simple test. This time Levels =3 and EndLevel=3 produced the same result.

    Perry
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    I have moved onto Global Mapper v11 development so user interface changes for v10 are basically done, but I can add the image ID control for a v11 build.
    I'm content to wait for v11.

    For the exports, just use the button to 'Reset to Last Exported Bounds' when exporting to use your last exported bounds.
    Is this new or have I been overlooking something again.
    For the types I would be interested in a MP file that causes a fatal error as Stan @ cGPSMapper seems to indicate this should not be what happens.

    This Package file should export Type=BLM which will stop the 095a compiler with an E038 error message and the line number of the [end] line. The 093 compiler will sail through the same Type=BLM argument.

    Here's Stan's reply to me regarding the E038 Error:
    "Note that second cause could be that you're using named types - and one of the name has no definition. I'd suggest to use real text editor and locate troublesome line.."

    The problem with making the literal types some kind of warning or error in Global Mapper is that exporting the literal type names is actually desirable behavior and was the original way of adding custom type -> MP Type mapping. When there is a literal name for a Type value cGPSMapper could look for that type name in a RGNType.txt (or some other file) and use the type number assignment there. So making a literal type export a warning of some kind would cause those warnings to appear for users using this method of type assignment.

    I actually think what would work best would be if cGPSMapper would display a warning with the full Type string displayed. That way you could just check your build warnings from cGPSMapper and see what unexpected types were exported since only cGPSMapper knows if a literal type name is known or not based on the input provided to it. Global Mapper does not know if the literal type name will be known or not.

    A suggestion for you to consider:
    Have a check box inside the export dialog. If checked simply do a partial export, no cordinates and check for type=literal. If found, stop the export and center the map on the position. A couple of those will make it clear to the map maker what feature class is in need of attention and a Search & Replace will likely solve the problem for 10s or 100s of similar features. This would help both fatal and non-fatal features. Currently I'm losing hundreds on non-fatal features.

    It is my belief that for best practice going forward, the MP export should only export Type=hex and never Type=literal. As I understand it, this is only possible if the map maker's unique feature types are correctly given MP_TYPE attributes. My suggestion would simply ID errors.

    Thanks for looking into this.
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Roger,

    I've already implemented the custom image ID support on the export dialog, so that will be in the first v11 betas.

    I think I'll go ahead and just keep track of any literal type names that are exported during an MP export, then just report those at the end of the export so that users that want to correct them can easily do so with a simple search. Will this work?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    I've already implemented the custom image ID support on the export dialog, so that will be in the first v11 betas.
    But a beta is for your testing, not public?
    I think I'll go ahead and just keep track of any literal type names that are exported during an MP export, then just report those at the end of the export so that users that want to correct them can easily do so with a simple search. Will this work?
    Yes and No. Unless theirs a way to know where the object is located or some other ID, a bit of a wild goose chase finding the source of the literal.

    Perhaps you mean to search the MP text file and from that find all examples and where they came from?
  • global_mapper
    global_mapper Administrator
    edited May 2009
    The v11 betas will be announced on this forum for everyone to test.

    With a list of the exported literals you can simply use the Search->Search by Attributes menu command to find features of that type and edit them. You shouldn't need to know their location.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    I'd never done a GM beta, I read the v10 beta thread and I'll just purchase the upgrade as soon as you announce. I would expect my layers and MP export to be very stable and if not you're a wiz at fixes.

    Turns out my Atom 330 is 64-bit capable, but it only supports 2GB of RAM so I'll have to wait for 32nm Clarkdale to have 6GB . . . early next year. It'll even use less power than the 330.
  • global_mapper
    global_mapper Administrator
    edited May 2009
    You'll also be happy to know that the v11 release will include a toolbar for the Digitizer Tool (this is already done) to provide easy access to commonly used items.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    You'll also be happy to know that the v11 release will include a toolbar for the Digitizer Tool (this is already done) to provide easy access to commonly used items.
    Indeed I will!!!

    Next week???
  • global_mapper
    global_mapper Administrator
    edited May 2009
    I might be able to have a very early alpha (wouldn't call it beta yet) available next week sometime for you very early adopters that want some specific functions, like the MP improvements and the Digitizer Toolbar. I'll let you know when it is ready.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited May 2009
    I have completed updating the Polish MP export to report any exported literal types. This will be in the v11 alpha when it is ready.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    Awesome, v11 Alpha sounds great to me, I'll subscribe to this thread just in case I fall asleep.

    Many Thanks
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Roger,

    I have gone ahead and placed a first alpha installer for v11 (it is called beta 1, but really consider it an alpha) at http://www.globalmapper.com/global_mapper_setup_v1100_beta1.exe for you to try. It contains your requested MP changes as well as the Digitizer Toolbar.

    For those users really wanting to get an early start on v11, there is a preliminary purchase page for upgrades and new licenses at Global Mapper Download/Purchase v11 with PayPal.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    It contains your requested MP changes as well as the Digitizer Toolbar.
    Finally got a chance to download and install v11. Very colorful.

    The MP export dialog contained the promised enhancements. Thanks

    Can the row of digitizer tools be undocked?

    I'll figure out Paypal in the morning.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited May 2009
    I've updated the Digitizer Toolbar to be undockable. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • PaulTocknell
    PaulTocknell Forum Administrator Unconfirmed
    edited May 2009
    How do you undock the digitizer toolbar? I must be missing something...
  • global_mapper
    global_mapper Administrator
    edited May 2009
    You first have to make sure you have the absolute latest build, then just left-click and drag somewhere in the Digitizer Toolbar but not on a button and you should be able to drag it and even dock it somewhere else.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    For those users really wanting to get an early start on v11, there is a preliminary purchase page for upgrades and new licenses at Global Mapper Download/Purchase v11 with PayPal.
    Is the upgrade specific to v10 or will it upgrade v9 as well? The upgrade box says v10 to v11.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited May 2009
    The upgrade is for v10 to v11. If you are coming from v9 you would need to purchase the upgrade twice and I can handle just sending you a v11 key rather than bothering with the intermediate v9-v10 upgrade key.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited May 2009
    For setting which levels you want certain feature types to show up at use the MP_BIT_LEVEL attribute. Here is the User's Manual section describing that attribute:

    Most built-in types already have a default zoom scale at which they will show up in built MP maps (this will translate to a Levels= value for the feature in the exported MP file based on the levels in the MP file header). For custom types and for types that you want to change the default zoom scale for, you can add a MP_BIT_LEVEL attribute to the feature itself or to the default attribute list for a feature type. The value of this attribute should specify the minimum MP zoom bit level that a feature should appear at. For example, if you use the maximum Map Detail setting with no template file, you will get a map with populated zoom levels at 24, 22, and 20 bits. If you wanted a feature to show up in just the lower 2 zoom levels of that map (the 24 and 22 bit resolution layers), you could add a MP_BIT_LEVEL attribute with a value of 22 to your feature or the default attribute list for that type, then that feature would get a Levels=2 value written to the exported MP file. If your map had less detail (say zoom levels of 21, 19, and 17 bits), the same feature would only show up in the most detailed 21 bit layer as features are always present in at least one layer of the map. If you want a feature to always show up at all zoom levels in your map regardless of what zoom levels are present, just add a MP_BIT_LEVEL attribute with a value of 1.
    Mike,

    Thanks for taking the time to explain this. Makes a lot of sense given my current level of understanding. Two years ago I'd just gone duh. I'll have to experiment until I get the look I want.

    Thanks
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited June 2009
    You'll also be happy to know that the v11 release will include a toolbar for the Digitizer Tool (this is already done) to provide easy access to commonly used items.
    The digitizer toolbar in v11 is a mixed bag. The tool I needed yesterday was missing, so I had to RC and select from the dialog.

    Has tools that I've used in the past:
    - Show/Hide Vextex
    - Split line
    - Move
    - Insert vertex
    - Combine

    Has NOT:
    - Delete/undelete

    When I combine overlapping datasets I find it most efficient to delete the entire dataset, show deleted, then undelete the non-overlapping items. The ability of GM to customize feature colors is a huge plus for this task.

    I'd favor a customizable toolbar where I could add just the subset of tools I use to the bar. If, depending on feedback, this might happen in the future.

    None the less, a very good start.
  • global_mapper
    global_mapper Administrator
    edited June 2009
    It sounds like you are just missing the delete/undelete option, correct? I had left the delete option off the toolbar since it had the Delete shortcut key. Were you aware of that key?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited June 2009
    It sounds like you are just missing the delete/undelete option, correct? I had left the delete option off the toolbar since it had the Delete shortcut key. Were you aware of that key?
    I think so.

    I'm aware that if I select an item, the keyboard Delete will delete the item. However if the Delete key will Undelete a selected deleted feature(s), I was unaware of that.

    Am I making sense?
  • global_mapper
    global_mapper Administrator
    edited June 2009
    You are correct, the Delete key only deletes selected features, it won't undelete. I never really pegged the Undelete option as being used very often. I have gone ahead and added a new shortcut key (Shift+Delete) for undelete. I don't think it is used enough by the general user community to warrant a dedicated toolbar button, but should I ever allow a customizable toolbar then you could add it there.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com