SORT_LAYERS

The SORT_LAYERS command allows you to sort the loaded layers based on some criteria, like name, resolution, type, etc. The following parameters are supported by the command:

  • FILENAME - filename of the layers to sort. If you leave this off all layers will be sorted. You can use wild-cards to match on multiple loaded files. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2".
  • LAYER_GROUP - specifies the layer group to match on. Only loaded layers in the specified group will be matched on. You can use wildcards (like '*' or '?') to match multiple groups. If you don't provide this parameter any group is ok. If you want only those layers not in a group, add LAYER_GROUP="" for none.
  • MAP_ORDER - specifies how to sort the maps. The following values are recognized:
    • LAYER_DESC_ASC - ascending order by layer description
    • LAYER_DESC_DESC - descending order by layer description
    • RESOLUTION - sort in order of increasing resolution (i.e. less detailed drawn first)
    • TYPE - sort by type (elevation first, then raster, then vector)
    • MOVE_FRONT - move the matching layers to the front of the draw order
    • MOVE_FRONT_GROUP - move the matching layers to the front of the group specified with LAYER_GROUP
    • MOVE_END - move the matching layers to the end of the draw order
    • MOVE_END_GROUP - move the matching layers to the end of the group specified with LAYER_GROUP
    • NSWE - sort by map box, north to south, west to east in row
    • NSEW - see NSWE, just different order
    • SNWE
    • SNEW
    • WENS
    • WESN
    • EWNS
    • EWSN