4. Mapfile Notes

This page details the various types of declaration found in a Mapfile.

  • Quoted strings. Used for quoted property values e.g.

    NAME "Layer1"
    DATA "lakes.shp"
    
  • Non-quoted lists. E.g. a POINTS block can be defined as follows:

    POINTS
        0 100
        100 200
        40 90
    END
    
  • Quoted lists. Used for property lists that should be quoted. E.g. the PROJECTION block can be defined as follows:

    PROJECTION
        'proj=utm'
        'ellps=GRS80'
        'datum=NAD83'
        'zone=15'
        'units=m'
        'north'
        'no_defs'
    END
    
  • Key-value lists.

    PROCESSING "BANDS=1"
    PROCESSING "CONTOUR_ITEM=elevation"
    PROCESSING "CONTOUR_INTERVAL=20"
    
  • Key-double-value lists. As above but there are two strings for each directive.

    CONFIG MS_ERRORFILE "stderr"
    CONFIG "PROJ_DEBUG" "OFF"
    CONFIG "ON_MISSING_DATA" "IGNORE"
    
  • Composite types- container declarations which finish with the keyword END. Examples:

    MAP ... END
    LAYER ... END
    CLASS ... END
    STYLE ... END
    

4.1. Mappyfile Additions

Hidden containers - these containers are not outputted as part of the pprint. They are used to store objects of the same type e.g. LAYERs, CLASSes, STYLEs