pre-release version 0.9 (September, 2001)
© Pedro Pereira Gonçalves (pedro@inovagis.org)

Original File vecparam.htm
Abstract This web page sumarizes the GIServer query parameters created to enhace the interactivity with the Web Map Server for Vectorial Data.
Author Pedro Pereira Gonçalves (email)
Last Change
History 2002-03-04 : File Created
Index Page GIServer tutorial
Important Links:


Apart from WMS parameters and general vectorial parameters, the GIServer accepts layer-specific query parameters. These parameters enhance the interactivity of the requests and give a direct linkage to the GIS data producing new dynamic layers of geographic informatio.

Note : When requesting these parameters it is necessary to specify to which layer are they refering. For example, if the request is to drawn a borders layer with a PEN width of 2 pixels, it is necessary to specify :
    <dataset>.<layer>.PEN = 2
Even if the GIServer parameters do NOT respect the WMS specification, all these non-WMS conformant parameters might be transformed in to style definition (see Styles and GIServer Parameters) For querying vectorial data the following parameters are defined:
  • .query
    This string parameter will execute a query to the associated database in the vectorial file and will only draw the records resulting from that query. It accepts the following mathematical operations: TRUNC, ROUND, ABS, ARCTAN, COS, EXP, FRAC, INT, LN, PI, SIN, SQR, SQRT, POWER. In relation to strings it accepts the following functions: UPPER, LOWER, COPY, POS, LENGTH. Bitwise operations are also valid.
    REQUEST=GETMAP&
    LAYERS=TERRA.BORDERS&
    BBOX=-10,30,70,70&
    SRS=EPSG:4326&
    WIDTH=300&
    HEIGHT=150&
    FORMAT=GIF&
    TERRA.BORDERS.FIELD=NAME&
    TERRA.BORDERS.PENSTYLE=5&
    TERRA.BORDERS.QUERY=



  • .selectquery
    This string parameter will execute a query to the associated database in the vectorial file and will draw the records resulting from that query like they were selected (with a pen width of 3 and red color). It accepts the following mathematical operations: TRUNC, ROUND, ABS, ARCTAN, COS, EXP, FRAC, INT, LN, PI, SIN, SQR, SQRT, POWER. In relation to strings it accepts the following functions: UPPER, LOWER, COPY, POS, LENGTH. Bitwise operations are also valid.
    REQUEST=GETMAP&
    LAYERS=TERRA.BORDERS&
    BBOX=-10,30,70,70&
    SRS=EPSG:4326&
    WIDTH=300&
    HEIGHT=150&
    FORMAT=GIF&
    TERRA.BORDERS.SELECTQUERY=



  • .colorquery
    This string parameter will execute a query to the associated database in the vectorial file and will only draw the records resulting from that query. It accepts the following mathematical operations: TRUNC, ROUND, ABS, ARCTAN, COS, EXP, FRAC, INT, LN, PI, SIN, SQR, SQRT, POWER. In relation to strings it accepts the following functions: UPPER, LOWER, COPY, POS, LENGTH. Bitwise operations are also valid.
    REQUEST=GETMAP&
    LAYERS=TERRA.BORDERS&
    BBOX=-10,30,70,70&
    SRS=EPSG:4326&
    WIDTH=300&
    HEIGHT=150&
    FORMAT=GIF&
    TERRA.BORDERS.FIELD=NAME&
    TERRA.BORDERS.PENSTYLE=5&
    TERRA.BORDERS.COLORQUERY=
    This parameter can have multiple values present in the query to process multiple queries.For instance the query
      TERRA.BORDERS.COLORQUERY=((UPPER(NAME)<>'ITALY'),0xFF0000) &
      TERRA.BORDERS.COLORQUERY=((UPPER(NAME)='ITALY'),0x0000FF)
    will paint Italy in blue and the rest of the world in red.

    An additional parameter can be added to the query to indicate the text for the legend.
      TERRA.BORDERS.COLORQUERY=((UPPER(NAME)<>'ITALY'),0xFF0000,Italy) &
    When this parameter is omitted the legend will use the query text. If we add to previous request :
      TERRA.BORDERS.COLORQUERY=((UPPER(NAME)<>'ITALY'),0xFF0000) &
      TERRA.BORDERS.COLORQUERY=((UPPER(NAME)='ITALY'),0x0000FF,Italy) &
      TERRA.BORDERS.LEGEND=TRUE
    A legend will be added to the request displaying the text 'Italy' for the blue and (UPPER(NAME)<>'ITALY') for the red.
    (For more information about legend go to Legend parameters)

    To access this queries from a file you can use the tag COLORQUERYFILE that must represent a file name without the extension placed in the same directory of the data file. The file format is just a sequency of colorquery values in each line. Something like
    (COUNT=0,0xFEF1B4, )
    (COUNT>0,0xFFCF00, 1 - 10 )
    (COUNT>10,0xEBB400, 11 - 50)
    (COUNT>50,0xB87100, 51 - 100)
    (COUNT>100,0x8D3700, 101 - 200)
    (COUNT>200,0x630000, mais de 200)
    and it should be saved with the extension '.query'. Please note that if this text file is dynamically changed by some other process you should warn the cache system.

    It is also possible to generate automatic color distribution using the AUTO function. It this function you have to select a numeric field and the GIServer will automatically create the palette going from the minimum color value to maximum color value with the number of classes specified. The syntax is :
      COLORQUERY = AUTO(<TYPE>, <FIELD>, <MINCLASSCOLOR>, <MAXCLASSCOLOR>, <NUMCLASS>, [<SPECIFICVALUE>,<SPECIFICCOLOR>, .... ])
    EXAMPLE:
    REQUEST=GETMAP&
    LAYERS=TERRA.BORDERS&
    BBOX=-10,30,70,70&
    SRS=EPSG:4326&
    WIDTH=300&
    HEIGHT=150&
    FORMAT=GIF&
    TERRA.BORDERS.LEGEND.X=-2&
    TERRA.BORDERS.MAXVALUE=500&
    TERRA.BORDERS.FIELD=COUNT&
    TERRA.BORDERS.COLORQUERY=AUTO(DEC,COUNT,0x630000,0xFFCF00,5,0,0xFFF1AD)
    note: Possible values for TYPE are DEC, MULT2, MULT3, MULT4 ...



See also:

This is a old historical version of the inovaGIS site For updated info about GIServer please go to http://giserver.terradue.com/