Global Mapper v25.0

Need to change the <Description> Attribute

RSVector
RSVector Global Mapper UserTrusted User
edited June 2013 in GM Script Language
I need to change the <Description> attribute. When I use the command:

EDIT_VECTOR COMPARE_STR="<Feature Type>=Green Corridor" ATTR_VAL="<Description>=Primary Trail"

a second "DESCRIPTION" attribute is created. The Delete Attribute command below doesn't seem to work.

EDIT_VECTOR COMPARE_STR="<Feature Type>=Green Corridor" ATTR_TO_DELETE="<Description>"

How can I modify the GM <Description> attribute to a user defined value. Ultimately, I am trying to control the outoput of a KML export.

Comments

  • global_mapper
    global_mapper Administrator
    edited February 2013
    The <Feature Desc> (not <Description>) field is special and cannot be directly edited. For KML export rather than editing that I would use the KML_HTML_DESC_TEXT parameter and define a custom KML description text from whatever attributes that you need so you don't need to rely on the feature description.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
  • RSVector
    RSVector Global Mapper User Trusted User
    edited June 2013
    I have been using the KML_HTML_DESC_TEXT parameter successfully. My KML export also included the <Feature Name> value within KML <name> </name> tags. After coming back to this some time later with a different package file, the KML export includes the <description> </description> field (even if I don't specify to include it on the export dialog) BUT DOES NOT EXPORT the <Feature Name> value to the <name> </name> tags. Iam I forgetting something?
  • global_mapper
    global_mapper Administrator
    edited June 2013
    Do you have label display enabled for the features and do they have a label? There is a change in the most recent release so that the <name> tag doesn't write out if the feature doesn't have a label that is enabled for display. So make sure the checkbox to 'Draw Feature Labels' is checked on the Vector Display tab of the Configuration dialog.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • RSVector
    RSVector Global Mapper User Trusted User
    edited June 2013
    I did have the "Display Labels" checked in the dialog. I don't have anything populated in the "LABEL" attribute for the feature, only the <Feature Name>. Do I need to copy that info into the LABEL for it to be written out to the <name> tag?
  • global_mapper
    global_mapper Administrator
    edited June 2013
    No the display label should be shown on the Feature Info dialog should be what is written out. Do you see the labels on the map display in Global Mapper prior to export? If they are shown there they should end up in the <name> field in the KML file.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • RSVector
    RSVector Global Mapper User Trusted User
    edited June 2013
    Then something is still wrong. When I hover over a line or point feature the label I want is displayed. When I edit the feature, it shows up as the "Name". In the Search Box it is listed under <Feature Name>. But this value is not being populated within the <name> tag for KML export. It used too.
  • global_mapper
    global_mapper Administrator
    edited June 2013
    Does that name actually display on the map as a label though? The Name will only export to the KML if the label is configured to display on the map in Global Mapper. You can have the label set properly for searches and feature info, but if you have unchecked the option to have labels display, either for that type or all labels on the Vector Display tab of the Configuration dialog, then it won't export to KML.

    The thinking is if you don't want to display it on the map in Global Mapper you don't want to display it on the map in Google Earth either. Users wanted a way to turn off individual labels on Google Earth export so they would only get the ones they wanted to display.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • RSVector
    RSVector Global Mapper User Trusted User
    edited June 2013
    OK, got it. Thanks.