[mapserver-users] [MS-master] SLD request and style + label behaviour

Rahkonen Jukka (Tike) jukka.rahkonen at mmmtike.fi
Sat May 3 04:28:22 PDT 2014


Hi,

First thing to check is if OSM buildings really have names in the data or maybe test by using osm_id as labelitem because it for sure exists for all the buildings. Other things to do is to add also DEBUG 5 into your layer, check that ms_errorfile is set and see what messages it collects. Hmm, and check if font "sc" can be found. Jeff will soon tell you to use shp2img for testing but perhaps a good WMS client is here better because of all the scale dependent layers used in OSM mapfiles.

-Jukka Rahkonen-


________________________________
Yves Jacolin wrote:

> Hello,

> I am testing MapServer master this week and I found some curious behaviour.

# I am using :
* basemaps for the mapfile with data from OSM in France.
* MapServer master, built today
$ /usr/lib/cgi-bin/mapserv -v
MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=XMP
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

# Testing:
* export sld with GetStyles request on buildings15 layer.

Layer definition:

LAYER
    STATUS ON
    PROJECTION
        "init=epsg:3857"
    END
    GROUP "default"
    NAME "buildings15"
    TYPE POLYGON
    CONNECTIONTYPE postgis
    CONNECTION "host=localhost dbname=france user=yves password=yves
port=5432"
    DATA "geometry from (select geometry,osm_id, name as name from
osm_buildings) as foo using unique osm_id using srid=3857"
    LABELITEM "name"
    PROCESSING "LABEL_NO_CLIP=ON"
    PROCESSING "CLOSE_CONNECTION=DEFER"
    MAXSCALEDENOM 20313
    MINSCALEDENOM 10156
    CLASS
      STYLE
         COLOR "#bbbbbb"
         OPACITY 50
      END
      STYLE
         OUTLINECOLOR "#333333"
         WIDTH 0
      END
      LABEL
         TYPE TRUETYPE
         FONT sc
         PARTIALS FALSE
         MINFEATURESIZE AUTO
         SIZE 8
         COLOR 0 0 0
         OUTLINECOLOR 255 255 255
         OUTLINEWIDTH 2
         WRAP ' '
         MAXLENGTH 6
         ALIGN CENTER
      END
   END
END

# Issues:

* GetStyle request:
- Gives me a label definition (which seems corrects to me, except that there is
no outlinecolor/width parameters)
- Gives me a stroke-width value of 1 instead of 0

* GetMap request doesn't show any labels

Sorry if this mails comes with differents issues, we can split it on several
different thread if needed.

Regards,

Y.

--
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel (France) : +33 4 79 26 57 98
Tel (Suisse) : 021 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81

Mail : yves.jacolin at camptocamp.com<mailto:yves.jacolin at camptocamp.com>
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140503/e36dc2a0/attachment-0001.html>


More information about the mapserver-users mailing list