Global Mapper v25.0

How Assign Several Styles to One Layer

Henderson
Henderson Global Mapper UserTrusted User
edited December 2012 in Technical Support
Hello,

I have a landcover shapefile polygon feature layer with several types of landcover (i.e., features), named accordingly, say wetland, forest, grassland within that layer. How do I have GM13 apply say x area style for the wetland features (i.e., polygons) and say the y area style for the forest features, etc., within that layer.

Under 'Overlay control center' I access the 'vector options' window, for the layer in question. Under the 'Area Styles' tab I see at the bottom of the window 'Multiple Style Types for Selected Layers' but it is grayed out. Would this be the correct option or is there another way to do it. Thanks.

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2012
    For that scenario you would want to use the option to assign styles based on attributes. You can then assign one style for the wetlands, another for the forest, etc. The 'Multiple Style Types for Selected Layers' will be highlighted if you show the options for multiple layers at once and they aren't all using the same style setup.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Henderson
    Henderson Global Mapper User Trusted User
    edited December 2012
    Mike, I select 'Apply styling based on attribute name/values'. Beneath that is 'Attribute name/value to base style on' and I choose 'Name' from dropdown list, as I have have named each of the polygons to be one of five landcover types.

    At this point I was expecting GM13 to list, for the layer that I have selected, the Various Values for the Name field for the various polygons in that layer. I was then expecting to be able to highlight say the 'Grassland' value from the list of five Name values (i.e. five landcover types for that layer) and be able to apply an existing area style to that value. Stepping through the five names in this way, assigning an existing area style to each Name value would style each polygon on this landcover feature layer to the correct landcover style.

    However, it is looking as though I can't assign existing area styles in this way, I need to create new ones from scratch each time. Is this correct or have I missed something. Thanks.
  • global_mapper
    global_mapper Administrator
    edited December 2012
    You are almost there. Once you have selected to style based on attribute and selected the label, press the 'Init from Values' button to automatically provide a style entry for each name encountered in the layer. You can then edit the styles assigned to be different for each value. You can save that style mapping to a file for loading and applying to another layer if you want.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Henderson
    Henderson Global Mapper User Trusted User
    edited December 2012
    You are almost there. Once you have selected to style based on attribute and selected the label, press the 'Init from Values' button to automatically provide a style entry for each name encountered in the layer. You can then edit the styles assigned to be different for each value. You can save that style mapping to a file for loading and applying to another layer if you want.

    Mike, when I press 'Init from Values' it reads in the names of the five landcover types and assigns its own temporary styling to each.

    In the tools > configure menu I had previously created 5 area styles corresponding to each of these 5 landcover types and named accordingly.

    It seems I can't assign these after hitting 'init from Values', looks like I have to recreate each of them manually. Is there a way using my existing styles? Thanks.

    Thanks.
  • global_mapper
    global_mapper Administrator
    edited December 2012
    Ah what you have done is created new area feature types. While there isn't currently a way to automatically assign types based on some attribute value on the Options dialog, Global Mapper will assign types based on recognized attributes for some formats. What you should do is assign an attribute named GM_TYPE to each feature with the value set to the same name as you used for the new custom type on the Area Styles tab of the Configuration dialog. If you already have the name set to this, just right-click on the layer in the Control Center and select the CALC ATTR option and create a new attribute named GM_TYPE with the value set to the label.

    Once you have that, export the results to a Simple ASCII Text file or Shapefile using the File->Export Vector Data menu command. Then, load that file back in and the type name in the GM_TYPE attribute should automatically get assigned to the matching type/style. This will work for any file with a GM_TYPE (or some other recognized) attribute.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/products/global-mapper.p