Hi list,
I tried with MapServer 7.0.4 and 7.4.2 to get labels on an UNION layer. The
labels are OK when I loaded the source layer itself into QGIS, but the UNION
layer returns an empty picture (using LABELITEM) or the name of the label field
including the brackets is placed instead of the data (using TEXT inside LABEL).
Furthermore, the variable settings for ANGLE, FONT, SIZE and POSITION don't
seem to be handled correctly in the UNION layer. The font size and the position
aren't identical to the source layer. Layers with polygons and no labels are
drawn correctly!
Does anyone got an idea what is going wrong here? One example with just one
layer:
LAYER NAME "Beschriftung Flurstuecke"
CONNECTIONTYPE UNION
CONNECTION "bfn"
TYPE POINT
STATUS ON
STYLEITEM "AUTO"
EXTENT 250000 5420000 500000 5648000
MAXSCALEDENOM 25000
METADATA
wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:3034
EPSG:3857"
wms_layer_group "/Flurstueck"
wms_title "Beschriftung Flurstuecke"
END
CLASS END
PROJECTION "init=epsg:25832" END
END
.....
LAYER NAME "bfn" # Flurstücke / Nummern / Beschriftungen
CONNECTION "dbname='db' host=host port=5432 user='user'"
CONNECTIONTYPE POSTGIS
DATA "geom FROM (SELECT ogc_fid,gml_id,text,f.umn AS
color_umn,lower(art) || coalesce('-'||effekt,'') ||CASE WHEN stil='Kursiv' THEN
'-italic' WHEN stil='Fett' THEN '-bold' WHEN stil='Fett, Kursiv' THEN
'-bold-italic' ELSE '' END || CASE WHEN coalesce(fontsperrung,0)=0 THEN '' ELSE
'-'||(fontsperrung/0.25)::int END AS font_umn,0.25/0.0254*skalierung*grad_pt AS
size_umn,CASE coalesce(l.vertikaleausrichtung,s.vertikaleausrichtung) WHEN
'oben' THEN 'L' WHEN 'Basis' THEN 'U' ELSE 'C' END || CASE
coalesce(l.horizontaleausrichtung,s.horizontaleausrichtung) WHEN 'linksbündig'
THEN 'L' WHEN 'rechtsbündig' THEN 'R' ELSE 'C' END AS
position_umn,drehwinkel_grad,point AS geom FROM po_labels l JOIN
alkis_schriften s ON s.signaturnummer=l.signaturnummer AND s.katalog=1 JOIN
alkis_farben f ON s.farbe=f.id WHERE thema='Flurstücke' AND modell &&
ARRAY['DLKM','DKKM1000']::varchar[] AND (layer IN
('ax_flurstueck_nummer','ax_flurstueck_zuordnung','ax_flurstueck_zuordnung_pfeil'))
AND point IS NOT NULL) AS foo USING UNIQUE ogc_fid USING SRID=25832"
EXTENT 250000 5420000 500000 5648000
# LABELITEM "text"
MAXSCALEDENOM 5000
METADATA
wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:3034
EPSG:3857"
# wms_layer_group "/Flurstücke/Nummern"
wms_layer_group "/Flurstücke"
# wms_title "Beschriftungen (Punkte)"
wms_title "Beschriftungen (Flurstücke)"
# wms_enable_request "* !GetCapabilities"
END
PROCESSING "CLOSE_CONNECTION=DEFER"
PROJECTION "init=epsg:25832" END
SIZEUNITS INCHES
STATUS ON
SYMBOLSCALEDENOM 1000
TYPE POINT
UNITS METERS
CLASS
LABEL
ANGLE [drehwinkel_grad]
ANTIALIAS TRUE
FONT [font_umn]
SIZE [size_umn]
BUFFER 2
COLOR [color_umn]
FORCE TRUE
OUTLINECOLOR 255 255 255
OUTLINEWIDTH 2
POSITION [position_umn]
PRIORITY 10
TYPE TRUETYPE
TEXT '[text]'
END
END
END
--
Dipl.-Geogr. Oliver Schmidt
LANDESAMT FÜR VERMESSUNG UND GEOBASISINFORMATION RHEINLAND-PFALZ
Von-Kuhl-Straße 49
56070 Koblenz
Telefon 0261 492-346
Telefax 0261 492-492
[email protected]
www.lvermgeo.rlp.de
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users