[mapserver-commits] [MapServer/MapServer] d9ef84: msShapeGetNextClass(): use msScaleInBounds()
Even Rouault
noreply at github.com
Tue Sep 23 03:30:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/MapServer/MapServer
Commit: d9ef84c19c3e787be51bad3d8a83c3ce942f8e9d
https://github.com/MapServer/MapServer/commit/d9ef84c19c3e787be51bad3d8a83c3ce942f8e9d
Author: Even Rouault <even.rouault at spatialys.com>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M src/maputil.c
Log Message:
-----------
msShapeGetNextClass(): use msScaleInBounds()
Commit: b8f298d70135a8fe57387312a38febc40d413110
https://github.com/MapServer/MapServer/commit/b8f298d70135a8fe57387312a38febc40d413110
Author: Even Rouault <even.rouault at spatialys.com>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M CMakeLists.txt
A msautotest/misc/data/Road_Works_inner_transparent.svg
M msautotest/wxs/etc/symbols.sym
A msautotest/wxs/expected/point_symbol_identification_class_minscaledenom_5700.xml
A msautotest/wxs/expected/point_symbol_identification_expression_false.xml
A msautotest/wxs/expected/point_symbol_identification_mode_query_classauto.txt
A msautotest/wxs/expected/point_symbol_identification_mode_query_classgroup.txt
A msautotest/wxs/expected/point_symbol_identification_rotation_30.png
A msautotest/wxs/expected/point_symbol_identification_rotation_30_classgroup_i_159_j_91.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_118_j_78.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_159_j_91.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_70_j_82.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_73_j_82.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_73_j_82_with_styles.xml
A msautotest/wxs/expected/point_symbol_identification_style_minscaledenom_5700.xml
A msautotest/wxs/expected/point_symbol_identification_two_layers.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_layer.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_number_of_styles.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_styles.xml
A msautotest/wxs/point_symbol_identification.map
A msautotest/wxs/templates/point_symbol_identification.tmpl
M src/mapagg.cpp
M src/mapcopy.c
M src/mapfile.c
M src/mapfile.h
M src/maplexer.c
M src/maplexer.l
M src/mapparser.h
R src/mapprimitive.c
A src/mapprimitive.cpp
M src/mapprimitive.h
R src/mapquery.c
A src/mapquery.cpp
A src/mapquery.h
M src/maprendering.c
A src/maprendering.h
M src/mapserver.h
M src/mapwms.cpp
Log Message:
-----------
WMS GetFeatureInfo: add options to precisely identify points through their symbols
Currently, when MapServer receives a WMS GetFeatureInfo request on a point layer, it queries the
vector data source on a square centered on the value of the X and Y parameters of the query
(converted from image pixels to the layer coordinate reference system), with a radius expressed in
the LAYER.TOLERANCE MapFile parameter (or its default values if not specified). This behavior
works fine as long as symbols used to represent the point are of square shape, and with the symbol
being centered on the point. When the symbol is of rectangular shape and/or with a anchor point far
from its center, users may get unexpected results (false positives and false negatives) when clicking
on features on the map.
This PR adds a new IDENTIFY block under LAYER that can be set to
```
IDENTIFY
CLASSAUTO
END
```
to use the symbols from the style classes of the incoming WMS GFI request
or
```
IDENTIFY
CLASSGROUP "name_of_class_group"
END
```
to use a precise style group when identifying point symbols.
Identification takes into account potential transparency in the symbol.
The existing TOLERANCE and TOLERANCEUNITS are taken into account. Note
that for clarity of the mapfile, it is possible to move them under the IDENTIFY
block.
This also works with mode=query requests:
e.g:
```
mapserv -conf ../etc/mapserv.conf QUERY_STRING="MAP=point_symbol_identification.map&mode=query&layer=test_classgroup&qlayer=test_classgroup&imgxy=73+62&imgext=1000+2000+1400+2300&imgsize=200+150"
```
Note: this enhancement is currently restricted to POINT layers.
Commit: 4c675f553d1d2b9da02619f709e1c2a7b3ca87f9
https://github.com/MapServer/MapServer/commit/4c675f553d1d2b9da02619f709e1c2a7b3ca87f9
Author: Even Rouault <even.rouault at spatialys.com>
Date: 2025-09-23 (Tue, 23 Sep 2025)
Changed paths:
M CMakeLists.txt
A msautotest/misc/data/Road_Works_inner_transparent.svg
M msautotest/wxs/etc/symbols.sym
A msautotest/wxs/expected/point_symbol_identification_class_minscaledenom_5700.xml
A msautotest/wxs/expected/point_symbol_identification_expression_false.xml
A msautotest/wxs/expected/point_symbol_identification_mode_query_classauto.txt
A msautotest/wxs/expected/point_symbol_identification_mode_query_classgroup.txt
A msautotest/wxs/expected/point_symbol_identification_rotation_30.png
A msautotest/wxs/expected/point_symbol_identification_rotation_30_classgroup_i_159_j_91.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_118_j_78.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_159_j_91.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_70_j_82.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_73_j_82.xml
A msautotest/wxs/expected/point_symbol_identification_rotation_30_i_73_j_82_with_styles.xml
A msautotest/wxs/expected/point_symbol_identification_style_minscaledenom_5700.xml
A msautotest/wxs/expected/point_symbol_identification_two_layers.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_layer.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_number_of_styles.xml
A msautotest/wxs/expected/point_symbol_identification_wrong_styles.xml
A msautotest/wxs/point_symbol_identification.map
A msautotest/wxs/templates/point_symbol_identification.tmpl
M src/mapagg.cpp
M src/mapcopy.c
M src/mapfile.c
M src/mapfile.h
M src/maplexer.c
M src/maplexer.l
M src/mapparser.h
R src/mapprimitive.c
A src/mapprimitive.cpp
M src/mapprimitive.h
R src/mapquery.c
A src/mapquery.cpp
A src/mapquery.h
M src/maprendering.c
A src/maprendering.h
M src/mapserver.h
M src/maputil.c
M src/mapwms.cpp
Log Message:
-----------
Merge pull request #7318 from rouault/point_symbol_identification
WMS GetFeatureInfo: add options to precisely identify points through their symbols
Compare: https://github.com/MapServer/MapServer/compare/df31c72b1fe4...4c675f553d1d
To unsubscribe from these emails, change your notification settings at https://github.com/MapServer/MapServer/settings/notifications
More information about the MapServer-commits
mailing list