SET_LAYER_OPTIONS Parameter

AndreaRAndreaR Global Mapper UserPosts: 58Trusted User
edited June 2014 in GM Script Language
Hi Mike,

The Layer Group option is ok, but i have a requst:

I need the possibility under the SET_LAYER_OPTIONS command to have a parameter SHAPE_TYPE (for check LINES, AREAS and POINTS)

The problem is that in my script i have many levels under OSM_LINES level generated by this command.....
SPLIT_LAYER FILENAME="OSM_LINES" SPLIT_BY_ATTR="<Feature Desc>" LAYER_DESC_ATTR_ONLY CLOSE_ORIG_LAYER
....that have the same name under OSM_AREAS and under OSM_POINTS levels generated by this other two command:
SPLIT_LAYER FILENAME="OSM_AREAS" SPLIT_BY_ATTR="<Feature Desc>" LAYER_DESC_ATTR_ONLY CLOSE_ORIG_LAYER
SPLIT_LAYER FILENAME="OSM_POINTS" SPLIT_BY_ATTR="<Feature Desc>" LAYER_DESC_ATTR_ONLY CLOSE_ORIG_LAYER
So, when i start for example this three commands for check in a part of layer name if is present the "*highway*" string and group all layers find:
SET_LAYER_OPTIONS FILENAME="*highway*" LAYER_GROUP="OSM_LINE <sub> All Highway"
SET_LAYER_OPTIONS FILENAME="*highway*" LAYER_GROUP="OSM_AREAS <sub> All Highway"
SET_LAYER_OPTIONS FILENAME="*highway*" LAYER_GROUP="OSM_POINTS <sub> All Highway"
is a big problem, because the FILENAME="*highway*" not recognize to check only in the line or areas or point type levels, and reprocess all layers including those already grupped, and the output is a mixture of layers generated!!
The best is to have the command like this:

SET_LAYER_OPTIONS FILENAME="*highway*" SHAPE_TYPE="LINES" LAYER_GROUP="OSM_LINE <sub> All Highway"

Or in alternative for the command SPLIT_LAYER FILENAME the possibility to append and or suffix a custom string at the SPLIT_BY_ATTR="<Feature Desc>" Parameter (for example "L_" or "A_" or "P_") and check during the group layers command if is present and choose the right levels to process..

Thanks in advanced

Andrea
Sign In or Register to comment.