Skip to content

Commit a2bd21f

Browse files
authored
Merge pull request #1035 from rouault/identify
Document the new LAYER.IDENTIFY block
2 parents b05323c + 82cadf5 commit a2bd21f

File tree

5 files changed

+137
-1
lines changed

5 files changed

+137
-1
lines changed

conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ class WKTLexer(RegexLexer):
436436
r'SHAPEPATH|SIZE|SIZEUNITS|STATUS|STYLE|STYLEITEM|SYMBOL|SYMBOLSCALE|'
437437
r'SYMBOLSCALEDENOM|SYMBOLSET|TABLE|TEMPLATE|TEMPLATEPATTERN|TEXT|'
438438
r'TILEINDEX|TILEITEM|TILESRS|TITLE|TO|TOLERANCE|TOLERANCEUNITS|TRANSPARENCY|'
439-
r'TRANSPARENT|TRANSFORM|TYPE|UNITS|UTFDATA|UTFITEM|WEB|WIDTH|WKT|WRAP|IMAGEMODE|VALIDATION|VALUES'
439+
r'TRANSPARENT|TRANSFORM|TYPE|UNITS|UTFDATA|UTFITEM|WEB|WIDTH|WKT|WRAP|IMAGEMODE|VALIDATION|VALUES|'
440+
r'IDENTIFY|CLASSAUTO'
440441
r')\b')
441442

442443
class MapFileLexer(RegexLexer):

en/images/layer_classes.png

4.24 KB
Loading

en/mapfile/identify.txt

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
.. index::
2+
single: IDENTIFY
3+
4+
.. _identify:
5+
6+
*****************************************************************************
7+
IDENTIFY
8+
*****************************************************************************
9+
10+
.. versionadded:: 8.6
11+
12+
Controls how vector features are identified, typically through WMS GetFeatureInfo
13+
or MODE=QUERY requests.
14+
15+
.. index::
16+
pair: IDENTIFY; TOLERANCE
17+
:name: mapfile-identify-tolerance
18+
19+
.. _identify_tolerance:
20+
21+
TOLERANCE [double]
22+
Sensitivity for point based queries (i.e. via mouse and/or map
23+
coordinates). Given in TOLERANCEUNITS. If the layer is a POINT or a LINE,
24+
the default is 3. For all other layer types, the default is 0. To
25+
restrict polygon searches so that the point must occur in the polygon
26+
set the tolerance to zero. This setting does not apply to WFS GetFeature
27+
operations.
28+
29+
.. index::
30+
pair: IDENTIFY; TOLERANCEUNITS
31+
:name: mapfile-identify-toleranceunits
32+
33+
.. _identify_tolerance_units:
34+
35+
TOLERANCEUNITS [pixels|feet|inches|kilometers|meters|miles|nauticalmiles|dd]
36+
Units of the TOLERANCE value. Default is pixels.
37+
38+
.. index::
39+
pair: IDENTIFY; CLASSAUTO
40+
:name: mapfile-identify-classauto
41+
42+
CLASSAUTO
43+
44+
By default, identification of point features is based on their location,
45+
potentially extended with the radius defined by TOLERANCE value.
46+
47+
When setting the CLASSAUTO keyword, symbols from the style classes used to
48+
render the incoming WMS GetFeatureInfo request are used for more precise
49+
identification, by recognizing non-transparent pixels of the symbol.
50+
51+
The TOLERANCE value is also used to extend sensitive pixels beyond
52+
non-transparent pixels of the symbol.
53+
54+
This option is mutually exclusive with CLASSGROUP.
55+
56+
This option is currently only honoured on layers of type POINT using
57+
SYMBOL.
58+
59+
Example:
60+
61+
.. code-block:: mapfile
62+
63+
IDENTIFY
64+
TOLERANCE 5 # optional
65+
CLASSAUTO
66+
END
67+
68+
CLASS
69+
GROUP "my_style_group"
70+
STYLE
71+
SYMBOL "my_symbol"
72+
END
73+
END
74+
75+
76+
.. index::
77+
pair: IDENTIFY; CLASSGROUP
78+
:name: mapfile-identify-classgroup
79+
80+
CLASSGROUP [string]
81+
82+
By default, identification of point features is based on their location,
83+
potentially extended with the radius defined by TOLERANCE value.
84+
85+
When setting the CLASSGROUP keyword, symbols from the specified class's group
86+
are used for more precise identification, by recognizing non-transparent
87+
pixels of the symbol.
88+
89+
The :ref:`CLASS` object's GROUP parameter must be used in combination with
90+
CLASSGROUP.
91+
92+
The TOLERANCE value is also used to extend sensitive pixels beyond
93+
non-transparent pixels of the symbol.
94+
95+
This option is mutually exclusive with CLASSAUTO.
96+
97+
This option is currently only honoured on layers of type POINT using
98+
SYMBOL.
99+
100+
Example:
101+
102+
.. code-block:: mapfile
103+
104+
IDENTIFY
105+
TOLERANCE 5 # optional
106+
CLASSGROUP "my_style_group"
107+
END
108+
109+
CLASS
110+
GROUP "my_style_group"
111+
STYLE
112+
SYMBOL "my_symbol"
113+
END
114+
END

en/mapfile/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ styling using :ref:`CLASS` and :ref:`STYLE` directives.
5555
fontset
5656
geomtransform
5757
grid
58+
identify
5859
include
5960
join
6061
label

en/mapfile/layer.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,20 @@ HEADER [filename]
716716
Template to use *before* a layer's set of results have been sent.
717717
Multiresult query modes only.
718718

719+
.. index::
720+
pair: LAYER; IDENTIFY
721+
:name: mapfile-layer-identify
722+
723+
.. _layer-identify:
724+
725+
:ref:`IDENTIFY`
726+
.. versionadded:: 8.6
727+
728+
Signals the start of a :ref:`IDENTIFY` object.
729+
730+
Controls how vector features are identified, typically through WMS GetFeatureInfo
731+
or MODE=QUERY requests.
732+
719733
.. index::
720734
pair: LAYER; JOIN
721735
:name: mapfile-layer-join
@@ -1869,6 +1883,9 @@ TOLERANCE [double]
18691883
set the tolerance to zero. This setting does not apply to WFS GetFeature
18701884
operations.
18711885

1886+
.. note:: Starting with MapServer 8.6, the TOLERANCE value can also be
1887+
defined as a :ref:`child of an IDENTIFY block <identify_tolerance>`.
1888+
18721889
.. index::
18731890
pair: LAYER; TOLERANCEUNITS
18741891
:name: mapfile-layer-toleranceunits
@@ -1877,6 +1894,9 @@ TOLERANCEUNITS [pixels|feet|inches|kilometers|meters|miles|nauticalmiles|dd]
18771894
Units of the TOLERANCE value. Default is pixels.
18781895
`Nauticalmiles` was added in MapServer 5.6.
18791896

1897+
.. note:: Starting with MapServer 8.6, the TOLERANCEUNITS value can also be
1898+
defined as a :ref:`child of an IDENTIFY block <identify_tolerance_units>`.
1899+
18801900
.. index::
18811901
pair: LAYER; TRANSFORM
18821902
:name: mapfile-layer-transform

0 commit comments

Comments
 (0)