Global Mapper v25.0

GPX_Style/Overlay to Feature Type Mapping

Dan Anderson
Dan Anderson Global Mapper User
edited March 2008 in Vector Data
I'm evaluating GM to see how many of my needs it meets - using V9.02.

I've created a GPX file with another program that contains many polylines (tracks) of various types I've defined according to the GPX_Style and Overlay schemas. When I open the GPX file with GM, the types, colors, width, and line pattern are in the attribute list. The GM feature type is "Tracklog".

1. Is it possible to get GM to display the object with the given attributes?

2. If I define a new GM feature type equal to the type in the GPX file, is it possible to get GM to map the GPX type to a GM feature type (if they are equal or not equal) and, hence, display the object as specified by the GM feature type.

The Overlay Control Center Options don't seem to allow this possibility.

Comments

  • global_mapper
    global_mapper Administrator
    edited February 2008
    If you can provide me with a GPX file where line style information is not being used I can take a look. There is already support for getting line color information from a gpx_style:color tag, but I haven't seen a file with width and pattern information as well.

    GM should already try and match the value in the <desc> tag for a GPX feature to a GM type and automatically assign a feature type if a type with a matching name is defined in Global Mapper.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    If you can provide me with a GPX file where line style information is not being used I can take a look. There is already support for getting line color information from a gpx_style:color tag, but I haven't seen a file with width and pattern information as well.
    I've attached a zipped GPX file with a bunch of defined types. The attributes are listed in the GM attribute list but I haven't seen any including color applied.
    GM should already try and match the value in the <desc> tag for a GPX feature to a GM type and automatically assign a feature type if a type with a matching name is defined in Global Mapper.
    support@globalmapper.com
    I put a description of the object (trail or road) in the description field. So it might contain:
    "Pike National Forest Trail # 636
    Tanglewood Trail".
    Nothing I put in the description field is intended to be used to indicate the object type. The object type is in the "type" field.

    Thanks for your reply and help.

    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Dan,

    Thanks for the file. I added support for the the way that color and style values are presented in that GPX file. I wasn't quick sure what units the <width> parameter was in (it did not appear to be pixels, perhaps meters?), so I just left it alone. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.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
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    The <width> parameter is in millimeters of the output device. So a "1" would mean the line on the screen or printer is 1 mm thick regardless of scale.

    More information is available here:
    Yahoo! Groups

    Many thanks for such a prompt update of GM. I'll look at it shortly.

    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Dan,

    Thanks for the information. I have updated Global Mapper to also use the width values. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.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
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    Thanks, the basic functionality is there - the results are close. The GM display is actually slightly larger than in the program I used to create it.

    My primary concern is if I want to change the settings a little for one or more types, all the individual line segments have a custom type. So I believe I'd have to change each one individually. I'm wondering if say I create a GM type of "WM R Major" and the GPX file has <type>WM R Major</type> that perhaps GM would use the attributes for the type setup in GM. Then I could adjust the GM type to change all the objects of that type.

    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Global Mapper rounds the mm value to the nearest pixel when it calculates the size, I'm guessing the other program perhaps always rounds down the value, resulting in some of the lines being thinner.

    For the type issue, you are correct that with the current type setting all features will be assigned a custom style independent of the default style for the type assigned to the feature. However, you can reset features back to use the default style for their assigned type simply by selecting all of the features with the Digitizer Tool, right clicking, selecting Edit, then changing the style setting back to the option to use the default style for the assigned type.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    The problem is all my road and trail types are of "Tracklog" type to GM. Selecting thousands of line segments of different types probably isn't convenient.

    Regards,
    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Ah, I had not seen the <type> tag before. I have added support for using that to auto-assign a type other than 'tracklog' if a matching type exists. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.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
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    The auto-assign worked with the attributes in the GPX file taking priority over the attributes set in the GM type. If I delete "color", "width", etc. in the GPX file then I get the value set in the matching GM type.

    Is it possible to make it the other way? In other words, if there is no matching type in GM use the attributes in the GPX file and if there is a matching type in GM use the attributes assigned to the GM type even if those attributes are listed in the GPX file.

    Thanks,
    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Dan,

    While it would certainly be technically possible to work the way that you described, it would be different than how the other imports work in Global Mapper and remove the ability to have a type in a GPX file that used a custom drawing style different than the default style for that type. Now that the type-based assignment works, I would suggest just using the approach of selecting and editing all features after load and changing them back to use the default stlye settings.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Dan Anderson
    Dan Anderson Global Mapper User
    edited March 2008
    Okay, I'm a fan of consistency.

    Is there a way to select all objects of type "x" and change them all to use the default style? Due to the quantity of data selecting one object at a time, going to the edit dialog, and changing the radio button isn't practical. Otherwise, I guess I'll be writing a program to modify the GPX file before opening it with GM.

    Thanks,
    Dan
  • global_mapper
    global_mapper Administrator
    edited March 2008
    Dan,

    You can use the Search->Search by Attributes menu command to find all features of a given type, select and edith them. However, if you just want to change all features to use the default style for their type, just use Edit->Select All to select everything, then right click and you'll be able to edit all files at once and set them all to use the default style for whatever type the feature already has.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com