Home page | about c-squares | latest news | resources | specification | c-squares mapper | examples

CMAR c-squares Mapper - Technical Information


The CSIRO Marine and Atmospheric Research (CMAR) c-squares mapper is a perl utility which plots dataset exents (geographic "footprints") on a range of base maps, selected automatically according to the extent of the dataset. It operates on "c-squares strings" as supplied by relevant data sources (e.g. metadata records). C-squares are unique identifiers for 10, 5, 1, 0.5, or 0.1 degree squares on the earth's surface (or smaller as desired), numbered according to a convention derived from the World Meteorological Organisation (WMO) 10-degree square numbers and a hierarchical subdivision of the same. C-squares strings are text strings that comprise a list of relevant c-square numbers separated by a vertical bar ( | ) character (example: 1000|1001|1002 etc.). For further information on the c-squares system and nomenclature, see the c-squares home page.

Mapper Features

Input parameters supported

For the application developer or otherwise interested person, here is the list of currently supported input parameters and their usage.
csq C-squares string to plot, as a vertical bar (pipe) separated list of valid c-squares codes (this is the only required parameter for cs_map.pl). Example: 1000:1 (single square) or 1000:1|1000:2|1000:3 (three squares).
Tip: to create a blank map, send a c-square code of the correct resolution but entirely zeros, e.g. 0000 (10 deg. resolution), 0000:0 (5 deg. resolution), etc.
fill create filled, rather than outline, squares if any value supplied (e.g. fill=Y) - default is outline.
color colour of c-square symbol expressed as hex RGB code (e.g. purple: CC66FF)
or by name (one of red, green, blue, black, white, yellow, brown). Default is red for csq if no color specified.
csq2 through csq7 optional slots for second, third, fourth, fifth, sixth, and seventh c-squares strings - e.g. for different colours/ resolutions/ symbology, as required
fill2 through fill7 fill the square of the relevant c-squares string if any value supplied (e.g. fill2=Y)
color2 through color7 colour of c-square symbol expressed as hex RGB code
or by name (from pre-defined list only), for the relevant c-squares strings. Defaults are green, blue, black, white, yellow, brown.
If not supplied, defaults will be used, e.g. green for csq2, etc.
test lat,lon list of test points, separated by a vertical bar (|) - used for calibrating maps, debugging, etc. (will plot as cross hairs)
header dataset head and body title (HTML tags ok)
title dataset secondary headers
legend the map legend displayed under the map - may contain html
landmask supply landmask=Y to toggle land mask on (where available); default is off
map name of display basemap if desired, otherwise will default to best fit
dilate choose csq depiction method for readability. Normally, very small squares are dilated for readability, also small gap left between adjacent large squares for same reason. Sending dilate=N will turn this feature off
enlarge 'Y' if requesting larger map when available as specified in the Map_Index file. Large maps are identified by the base image name ending in '-big.gif'
decomp decompression of strings containing '*' (default is Y, supplying decomp=N will result in faster operation and is useful for debugging but may have some odd visual effects)
redirect URL for external procedure which will be called if user clicks on an active map
filedesc name to be appended (before extension) to tmp map file name
inline if inline=Y, gif image (map) alone will be returned, without surrounding HTML code or interactive form contents
popup default is a new full size window for redirects. Supply popup=Y for a popup (small) window (can then utilise popH, popW, offsetH and offset W to control window size and positioning)
popH height of popup windows (pixels) - will use 700 if none specified
popW width of popup windows (pixels) - will use 800 if none specified
offsetH offset from top for popup windows (pixels) - will use 50 if none specified
offsetW offset from left for popup windows (pixels) - will use 50 if none specified
debug set for debugging diagnostics (debug=true), otherwise default is false
sym symbol marking c-square: rectangle (default) or circle
*clickable.x represents longitudinal image (pixel) co-ordinate
*clickable.y represents latitudinal image (pixel) co-ordinate
**factor scale associated with each map (pixels per degree)
**N_ext northern extent of image (decimal degrees)
**W_ext western extent of image (decimal degrees)
bold Controls boldness of square rendering, for world base maps (and globe views based upon these). Current values employed are 6 (designated "bold", = default), 3 ("intermediate"), and 1 ("finest"). These values refer to the width in pixels that the square boundary is drawn on the original (7200 pixel wide) base map, before re-scaling to produce the size actually viewed by the user. "Bold" squares are also enlarged beyond their actual square boundaries to improve visibility when zoomed fully out.


The c-squares active map tester is a new web interface allowing user-defined input to many of these parameters for demonstration and testing purposes, with additional explanation on these features as required.