Global Mapper v26.0

SYM_ANGLE based on value of other attribute

AndreaR
AndreaR Global Mapper UserTrusted User

Hi all

I have multiple layers with only Point feature with custom symbols. Each point has an attribute named "DIRECTION" with a number between 0 and 360. I would like to rotate the symbol based on the attribute value via script.

I tried to create the simple script using SYM_ANGLE and of course it works by rotating all symbols 90 degrees:

GLOBAL_MAPPER_SCRIPT VERSION="1.00"

EDIT_VECTOR FILENAME="*" STYLE_ATTR="SYM_ANGLE=90"

How can I do for each point to read the value of the "DIRECTION" attribute and use it with SYM_ANGLE for rotate any point with correct direction? For example:

EDIT_VECTOR FILENAME="*" STYLE_ATTR="SYM_ANGLE=value of attribute DIRECTION"

there is a way for use SYM_ANGLE combined with formula, variable or other for get the value?

Thanks

Andrea

Comments

  • Hello,

    I can't assist you with scripting but you can obtain what you want by using quiver plot as style for the point and using your direction attribute for direction.

    Best regards

  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User

    Hi Andrea,

    I don't think that you can do what you're looking for; I believe that the argument for SYM_ANGLE, that is, what you've designated as "value of attribute DIRECTION" must be a numeric value in the range of 0-360. That is, unless I'm missing something -- I don't have access to the actual code any longer.

    What you're asking for, i.e., setting the symbol rotation from a point's attribute value, sounds like a nice enhancement, though.

    You might want to pursue this with Blue Marble's tech support.

    Cheers,

    ~Jeff