Global Mapper Pro

Use custom Point Image in Script

AndreaR
AndreaR Global Mapper UserTrusted User
edited June 2014 in Vector Data
Hi Mike,

I've under C:\Users\Andrea\AppData\Local\GlobalMapper\CustomSymbols two files:

- OSM_ELETTRICITA_Traliccio.png

- custom_symbols.txt that contain only:

"OSM_ELETTRICITA_Traliccio","OSM_ELETTRICITA_Traliccio.png"

I have created in Point Style a new Point Type:

Type Name: OSM - ELETTRICITA' - Traliccio
Symbol: FROM TYPE: OSM - ELETTRICITA' - Traliccio

and in C:\Users\Andrea\AppData\Local\GlobalMapper\ there is a file named custom_point_types.txt that contain only:

"OSM - ELETTRICITA' - Traliccio","OSM_ELETTRICITA_Traliccio",1,255,"~0~534799372~0.000~0~0"

In my script file i've:

EDIT_VECTOR FILENAME="%LIVELLO_PUNTI%" SHAPE_TYPE="POINTS" COMPARE_STR="<Feature Desc>=power - tower" POINT_TYPE="OSM - ELETTRICITA' - Traliccio" MOVE_TO_NEW_LAYER=YES NEW_LAYER_NAME="%P_POWER%"

Why when i run my script, for any point "power - tower" instead my custom OSM_ELETTRICITA_Traliccio.png symbol, i have the default tower symbol of Global Mapper?

What is my error?

Thanks for your big patience

Andrea

Comments

  • global_mapper
    global_mapper Administrator
    edited June 2014
    Andrea,

    That looks ok. If you select one of those points after running the script with the Feature Info Tool does it show the type has been assigned to the "OSM - ELETTRICITA' Traliccio" type?

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • AndreaR
    AndreaR Global Mapper User Trusted User
    edited June 2014
    Yes Mike,

    If i select a point with the Feature Info Tool, the Feature Type is: OSM - ELETTRICITA' - Traliccio

    If I want to see my custom symbol for one point i must select with Digitizer Tool a point, then right click -> EDIT Edit Point Feature
    and under Feature Style, i must to check the option: Use Default Style for Selected Feature Type, because by default is checked: Specify Style to Use When Rendering Feature
    and Point Symbol is: FROM TYPE: Tower

    I don't understand what is wrong!

    Andrea
  • global_mapper
    global_mapper Administrator
    edited June 2014
    Andrea,

    Ah, what has happened is that your point was set to a custom style rather than marked as using the default style for its assigned type. With the custom style assigned, changing the type didn't affect the style, it kept the custom style. What you can do in this case is also add the following parameter to the EDIT_VECTOR command:

    STYLE_ATTR="SYMBOL=OSM_ELETTRICITA_Traliccio"

    If you add that to your EDIT_VECTOR it should set the custom style for the matching features.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Sign In or Register to comment.