[mapserver-users] [MS-master] SLD request and style + label behaviour
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 #bb OPACITY 50 END STYLE OUTLINECOLOR #33 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.jaco...@camptocamp.com http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] [MS-master] SLD request and style + label behaviour
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 #bb OPACITY 50 END STYLE OUTLINECOLOR #33 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.jaco...@camptocamp.commailto:yves.jaco...@camptocamp.com http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] [MS-master] SLD request and style + label behaviour
On 2014-05-03, 8:28 AM, Rahkonen Jukka (Tike) wrote: Jeff will soon tell you to use shp2img for testing but.. Jukka you made me smile :) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] [MS-master] SLD request and style + label behaviour
Hello, thanks for your answer ! check is if OSM buildings really have names Checked and I get correct name values :) check if font sc can be found It is in the basemaps repository and in local. All config seems right in this part Ok I found where the 'problem' came from: MINFEATURESIZE is auto so in the scale where the layer is displayed I think no label will be lower than its geometry size, so no label will be displayed ever. Y. 2014-05-03 13:28 GMT+02:00 Rahkonen Jukka (Tike) jukka.rahko...@mmmtike.fi : 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 #bb OPACITY 50 END STYLE OUTLINECOLOR #33 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.jaco...@camptocamp.com http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- 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.jaco...@camptocamp.com http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users