[mapserver-users] Issue with label content for UNION layers

Julian Hollingbery julian at northtech.dk
Tue Dec 10 02:39:20 PST 2019


Hi list,

I’m seeing a strange phenomenon regarding label content for a layer with connectiontype UNION.
A WMS request to the parent layer (including the UNION layer) produces the result I’d expect, but the same request directly to the UNION layer labels all features with the same label.
Correct:
http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=588000.0,6042000.0,888000.0,6342000.0&CRS=EPSG:25832&WIDTH=500&HEIGHT=500&LAYERS=danske_stednavne&STYLES=&FORMAT=image/png&TRANSPARENT=FALSE<http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=588000.0,6042000.0,888000.0,6342000.0&CRS=EPSG:25832&WIDTH=500&HEIGHT=500&LAYERS=danske_stednavne&STYLES=&FORMAT=image/png&TRANSPARENT=FALSE>
Wrong:
http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=588000.0,6042000.0,888000.0,6342000.0&CRS=EPSG:25832&WIDTH=500&HEIGHT=500&LAYERS=landskabsform&STYLES=&FORMAT=image/png&TRANSPARENT=FALSE<http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=588000.0,6042000.0,888000.0,6342000.0&CRS=EPSG:25832&WIDTH=500&HEIGHT=500&LAYERS=landskabsform&STYLES=&FORMAT=image/png&TRANSPARENT=FALSE>

The reponses can be seen here: https://www.dropbox.com/sh/121shf8djnx3b3d/AAAApGTLfcuga_mXWDaWFsKQa?dl=0

Any thoughts?

Best Regards,
Julian

MAP
    NAME "danske_stednavne"
    EXTENT 120000 5900000 1000000 6500000
    MAXSIZE 10000

    OUTPUTFORMAT
        NAME "png24"
        DRIVER "AGG/PNG"
        MIMETYPE "image/png; mode=24bit"
        EXTENSION "png"
        IMAGEMODE "RGB"
        FORMATOPTION INTERLACE=OFF
    END
    PROJECTION
        "init=epsg:25832"
    END
    DEBUG 0
    CONFIG "ON_MISSING_DATA" "LOG"
    FONTSET "fonts/fontset.txt"

    WEB
        METADATA
            "wms_srs" "EPSG:25832 EPSG:4326 EPSG:4258 EPSG:25833 EPSG:32632 EPSG:32633 EPSG:4093 EPSG:4094 EPSG:4095 EPSG:4096 EPSG:3395 EPSG:3857"
        END
    END

    LAYER
        NAME "landskabsform"
        EXTENT 120000 5900000 1000000 6500000
        TEMPLATE "blank.html"
        LABELITEM skrivemaade
        STATUS DEFAULT
        TYPE polygon
        CONNECTIONTYPE UNION
        CONNECTION "oer_store,oer_mellem"
        METADATA
            "wms_srs" "epsg:25832"
        END
        PROJECTION
            "init=epsg:25832"
        END

        STYLEITEM "AUTO"
        # Define an empty class that will be filled at runtime from the color and
        # styles read from each source layer.
        CLASS
        END

    END #LAYER

    LAYER
        NAME "oer_store"
        INCLUDE "./danske_stednavne_post_include.map"
        DATA "geometri from stednavne_nohist_l1_wms.oer_store using unique objectid using srid=25832"
        TYPE polygon
        STATUS OFF
        LABELITEM "skrivemaade"
        METADATA
            "wms_srs" "epsg:25832"
        END
        PROJECTION
            "init=epsg:25832"
        END
        CLASS
            STYLE
                OUTLINECOLOR 91 91 91
                WIDTH 1
            END #STYLE

            LABEL
                COLOR 0 0 0
                FONT "verdana"
                TYPE truetype
                SIZE 12
            END #LABEL
        END #CLASS
    END #LAYER

    LAYER
        NAME "oer_mellem"
        INCLUDE "./danske_stednavne_post_include.map"
        DATA "geometri from stednavne_nohist_l1_wms.oer_mellem using unique objectid using srid=25832"
        TYPE polygon
        STATUS OFF
        LABELITEM skrivemaade
        METADATA
            "wms_srs" "epsg:25832"
        END
        PROJECTION
            "init=epsg:25832"
        END
        CLASS
            STYLE
                OUTLINECOLOR 91 91 91
                WIDTH 1
            END #STYLE

            LABEL
                COLOR 0 0 0
                FONT "verdana"
                TYPE truetype
                SIZE 10
            END #LABEL
        END #CLASS
    END #LAYER

END #MAP

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20191210/84ee78c4/attachment.htm>


More information about the MapServer-users mailing list