[mapserver-commits] [MapServer/MapServer] 45dcce: Fix label point calculation (fixes #5752)
Even Rouault
noreply at github.com
Fri Jan 22 02:39:39 PST 2021
Branch: refs/heads/main
Home: https://github.com/MapServer/MapServer
Commit: 45dcce49737b3d311f4a2a614c803af4d6801cd2
https://github.com/MapServer/MapServer/commit/45dcce49737b3d311f4a2a614c803af4d6801cd2
Author: Even Rouault <even.rouault at spatialys.com>
Date: 2021-01-22 (Fri, 22 Jan 2021)
Changed paths:
M maplabel.c
M msautotest/gdal/expected/nonsquare.png
M msautotest/gdal/expected/rot_out.png
M msautotest/misc/expected/attrbind_test001.png
M msautotest/misc/expected/autostyle_quoted.png
M msautotest/misc/expected/listexpression.png
M msautotest/misc/expected/quoting.png
M msautotest/misc/expected/rfc14.png
M msautotest/misc/expected/shp2img-size.png
M msautotest/query/expected/text_test001.png
M msautotest/query/expected/text_test002.png
M msautotest/query/expected/text_test003.png
M msautotest/query/expected/text_test004.png
M msautotest/query/expected/text_test005.png
M msautotest/query/expected/text_test006.png
M msautotest/query/expected/text_test007.png
M msautotest/renderers/expected/baseline_text.cairo.png
M msautotest/renderers/expected/baseline_text.pdf
M msautotest/renderers/expected/baseline_text.png
M msautotest/renderers/expected/baseline_text.svg
M msautotest/renderers/expected/embed_sb_rgb.cairo.png
M msautotest/renderers/expected/embed_sb_rgb.png
M msautotest/renderers/expected/embed_sb_rgb_tr.cairo.png
M msautotest/renderers/expected/embed_sb_rgb_tr.png
M msautotest/renderers/expected/embed_sb_rgba.cairo.png
M msautotest/renderers/expected/embed_sb_rgba.png
M msautotest/renderers/expected/embed_sb_rgba_offset.cairo.png
M msautotest/renderers/expected/embed_sb_rgba_offset.png
M msautotest/renderers/expected/embed_sb_rgba_tr.cairo.png
M msautotest/renderers/expected/embed_sb_rgba_tr.png
M msautotest/renderers/expected/entity_encoded_follow_text.cairo.png
M msautotest/renderers/expected/entity_encoded_follow_text.pdf
M msautotest/renderers/expected/entity_encoded_follow_text.png
M msautotest/renderers/expected/entity_encoded_follow_text.svg
M msautotest/renderers/expected/grid.cairo.png
M msautotest/renderers/expected/grid.pdf
M msautotest/renderers/expected/grid.png
M msautotest/renderers/expected/grid.svg
M msautotest/renderers/expected/label-align-center.cairo.png
M msautotest/renderers/expected/label-align-center.png
M msautotest/renderers/expected/label-align-default.cairo.png
M msautotest/renderers/expected/label-align-default.png
M msautotest/renderers/expected/label-align-left.cairo.png
M msautotest/renderers/expected/label-align-left.png
M msautotest/renderers/expected/label-align-right.cairo.png
M msautotest/renderers/expected/label-align-right.png
M msautotest/renderers/expected/label-multifont.cairo.png
M msautotest/renderers/expected/label-multifont.pdf
M msautotest/renderers/expected/label-multifont.png
M msautotest/renderers/expected/label-multifont.svg
M msautotest/renderers/expected/label_align_attribute.png
M msautotest/renderers/expected/label_ar-align-center.cairo.png
M msautotest/renderers/expected/label_ar-align-center.png
M msautotest/renderers/expected/label_ar-align-default.cairo.png
M msautotest/renderers/expected/label_ar-align-default.png
M msautotest/renderers/expected/label_ar-align-left.cairo.png
M msautotest/renderers/expected/label_ar-align-left.png
M msautotest/renderers/expected/label_ar-align-right.cairo.png
M msautotest/renderers/expected/label_ar-align-right.png
M msautotest/renderers/expected/label_latin_align_center.png
M msautotest/renderers/expected/label_latin_align_default.png
M msautotest/renderers/expected/label_latin_align_left.png
M msautotest/renderers/expected/label_latin_align_right.png
M msautotest/renderers/expected/label_offset_attribute.png
M msautotest/renderers/expected/labelcacheoff.cairo.png
M msautotest/renderers/expected/labelcacheoff.pdf
M msautotest/renderers/expected/labelcacheoff.png
M msautotest/renderers/expected/labelcacheoff.svg
M msautotest/renderers/expected/labelpnt.cairo.png
M msautotest/renderers/expected/labelpnt.pdf
M msautotest/renderers/expected/labelpnt.png
M msautotest/renderers/expected/labelpnt.svg
M msautotest/renderers/expected/labelrot.cairo.png
M msautotest/renderers/expected/labelrot.pdf
M msautotest/renderers/expected/labelrot.png
M msautotest/renderers/expected/labelrot.svg
M msautotest/renderers/expected/labels-anno.cairo.png
M msautotest/renderers/expected/labels-anno.pdf
M msautotest/renderers/expected/labels-anno.png
M msautotest/renderers/expected/labels-anno.svg
M msautotest/renderers/expected/labels-bitmap-multiline.png
M msautotest/renderers/expected/labels-bitmap.png
M msautotest/renderers/expected/labels-leader.cairo.png
M msautotest/renderers/expected/labels-leader.pdf
M msautotest/renderers/expected/labels-leader.png
M msautotest/renderers/expected/labels-leader.svg
M msautotest/renderers/expected/labels-min-distance.cairo.png
M msautotest/renderers/expected/labels-min-distance.pdf
M msautotest/renderers/expected/labels-min-distance.png
M msautotest/renderers/expected/labels-min-distance.svg
M msautotest/renderers/expected/labels-wrap.png
M msautotest/renderers/expected/labels.cairo.png
M msautotest/renderers/expected/labels.pdf
M msautotest/renderers/expected/labels.png
M msautotest/renderers/expected/labels.svg
M msautotest/renderers/expected/lots_of_text.cairo.png
M msautotest/renderers/expected/lots_of_text.png
M msautotest/renderers/expected/multilabel-leader.cairo.png
M msautotest/renderers/expected/multilabel-leader.pdf
M msautotest/renderers/expected/multilabel-leader.png
M msautotest/renderers/expected/multilabel-leader.svg
M msautotest/renderers/expected/multilabel.cairo.png
M msautotest/renderers/expected/multilabel.pdf
M msautotest/renderers/expected/multilabel.png
M msautotest/renderers/expected/multilabel.svg
M msautotest/renderers/expected/poly-label-multiline-pos-auto.cairo.png
M msautotest/renderers/expected/poly-label-multiline-pos-auto.pdf
M msautotest/renderers/expected/poly-label-multiline-pos-auto.png
M msautotest/renderers/expected/poly-label-multiline-pos-auto.svg
M msautotest/renderers/expected/poly-label-pos-auto.cairo.png
M msautotest/renderers/expected/poly-label-pos-auto.pdf
M msautotest/renderers/expected/poly-label-pos-auto.png
M msautotest/renderers/expected/poly-label-pos-auto.svg
M msautotest/renderers/expected/polygon-simple.cairo.png
M msautotest/renderers/expected/polygon-simple.pdf
M msautotest/renderers/expected/polygon-simple.png
M msautotest/renderers/expected/polygon-simple.svg
M msautotest/renderers/expected/resolution_text_1.png
M msautotest/renderers/expected/resolution_text_2.png
M msautotest/renderers/expected/resolution_text_4.png
M msautotest/renderers/expected/text_shaping_1.cairo.png
M msautotest/renderers/expected/text_shaping_1.pdf
M msautotest/renderers/expected/text_shaping_1.png
M msautotest/renderers/expected/text_shaping_1.svg
M msautotest/sld/expected/map_label.png
M msautotest/sld/expected/map_style_text.png
M msautotest/sld/expected/sld_label_function.png
M msautotest/sld/expected/sld_label_literal.png
M msautotest/sld/expected/sld_label_mixed.png
M msautotest/sld/expected/sld_label_property.png
M msautotest/sld/expected/sld_label_raw.png
M msautotest/wxs/expected/wms_filter_getmap130.png
M msautotest/wxs/expected/wms_filter_getmap130_dwithin2.png
M msautotest/wxs/expected/wms_filter_getmap130_emptyfilter.png
M msautotest/wxs/expected/wms_filter_getmap130_group_and_layer.png
M msautotest/wxs/expected/wms_filter_getmap130_one_group.png
M msautotest/wxs/expected/wms_filter_getmap130_propertyequalto.png
M msautotest/wxs/expected/wms_get_map_multi_layers_one_sld_on_one_layer.png
M msautotest/wxs/expected/wms_get_map_multi_layers_one_sld_on_one_layer_postgis.png
M msautotest/wxs/expected/wms_grid_reproj_to_3857_non_square_pixels_beyond_validity.png
M msautotest/wxs/expected/wms_grid_reproj_to_3857_square_pixels_beyond_validity.png
M msautotest/wxs/expected/wms_grid_reproj_to_3857_square_pixels_within_validity.png
M msautotest/wxs/expected/wms_inspire_map_all.png
M msautotest/wxs/expected/wms_inspire_map_all_style1.png
M msautotest/wxs/expected/wms_inspire_map_all_style2.png
M msautotest/wxs/expected/wms_inspire_map_commontransportelements.png
M msautotest/wxs/expected/wms_inspire_map_railtransportnetwork.png
M msautotest/wxs/expected/wms_inspire_map_railwayarea.png
M msautotest/wxs/expected/wms_inspire_map_railwaylink.png
M msautotest/wxs/expected/wms_inspire_map_railwaystationarea.png
M msautotest/wxs/expected/wms_inspire_map_railwayyardarea.png
M msautotest/wxs/expected/wms_inspire_map_roadarea.png
M msautotest/wxs/expected/wms_inspire_map_roadlink.png
M msautotest/wxs/expected/wms_inspire_map_roadservicearea.png
M msautotest/wxs/expected/wms_inspire_map_roadtransportnetwork.png
M msautotest/wxs/expected/wms_inspire_map_transportarea.png
M msautotest/wxs/expected/wms_inspire_map_transportarea_style1.png
M msautotest/wxs/expected/wms_inspire_map_transportarea_style2.png
M msautotest/wxs/expected/wms_inspire_map_transportlink.png
M msautotest/wxs/expected/wms_inspire_map_transportnode.png
M msautotest/wxs/expected/wms_inspire_map_vehicletrafficarea.png
M msautotest/wxs/expected/wms_layer_groups_map_all.png
M msautotest/wxs/expected/wms_layer_groups_map_g1.png
M msautotest/wxs/expected/wms_layer_groups_map_g2sg3l1.png
M msautotest/wxs/expected/wms_layer_groups_map_g3.png
M msautotest/wxs/expected/wms_layer_groups_map_sg1.png
M msautotest/wxs/expected/wms_layer_groups_map_sg2.png
M msautotest/wxs/expected/wms_ogr_native.png
M msautotest/wxs/expected/wms_ogr_native_sql_data.png
Log Message:
-----------
Fix label point calculation (fixes #5752)
If we add multiple newlines to the end of the text, it is misaligned vertically when ANGLE=0
For example:
```
LABEL
FONT "arial"
SIZE 16
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TEXT "[PropID_0]*[PropID_1]*[PropID_2]*[PropID_3]*[PropID_4]*[PropID_5]*[PropID_6]*[PropID_7]*[PropID_8]"
WRAP '*'
END # LABEL
```
Where the actual values of the properties (ie. PropID_3...PropID_7) are missing. It works properly when ANGLE != 0
Co-authored-by: Tamas Szekeres <szekerest at gmail.com>
More information about the mapserver-commits
mailing list