[mapserver-users] Apply style on osm layer using sld
Hi All, I'm trying style a vector layer containing OSM data (places) using the mapscript style shown below. It works so long as I don't add any styling entry pertaining to labels. However, adding label styling makes MapServer crash while making WMS calls. It shows a few points with labeled but shortly thereafter, the mapserver instance crashes. There is no error statement in log file also. This how my layer looks like in map file : LAYER CONNECTION "host=localhost port=5432 user=abc password=asdf123 dbname=abc" CONNECTIONTYPE POSTGIS DATA 'geom from "OSM_places" using unique gid using srid=4326' EXTENT 68.5094575 6.6791812 97.0315678 35.368417 FILTER ((( ("[type]" ="city") OR ("[type]" ="town") OR ("[type]" ="village") OR ( ("[type]" != "town") And ( ("[type]" != "town") And ("[type]" != "town")) ) ))) METADATA "type" "vector" "wms_srs" "EPSG:4326 CRS:84" "wfs_srs" "EPSG:4326" "tinyows_retrievable" "1" "ows_enable_request" "*" "tinyows_table" "OSM_places" "wfs_namespace_prefix" "abc" "tinyows_writable" "1" "wfs_title" "OSM_places" "wfs_namespace_uri" "http://www.abc.com/"; "wms_title" "OSM_places" END # METADATA NAME "OSM_places" PROJECTION "proj=longlat" "datum=WGS84" "no_defs" END # PROJECTION STATUS OFF TEMPLATE "tempalte.html" TILEITEM "location" TYPE POINT UNITS METERS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="city")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 7e+06 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="town")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 90 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="village")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 50 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ( ("[type]" != "town") And ( ("[type]" != "town") And ("[type]" != "town")) ) ) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 10 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS END # LAYER After removing TEXT ("[name]") from each class it shows all points but with this TEXT ("[name]") in layer mapserver crashes. Log file : [Wed Feb 1 13:04:19 2017].298440 msDrawMap(): Layer 12 (OSM_places), 0.012s [Wed Feb 1 13:04:19 2017].298478 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].298713 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].298923 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299227 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299415 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299765 msDrawMap(): Drawing Label Cache, 0.001s [Wed Feb 1 13:04:19 2017].299772 msDrawMap() total time: 0.014s [Wed Feb 1 13:04:19 2017].302860 msSaveImage(stdout) total time: 0.003s [Wed Feb 1 13:04:19 2017].302888 mapserv request processing time (msLoadMap not incl.): 0.017s [Wed Feb 1 13:04:19 2017].302893 msFreeMap(): freeing map at 0x104c030. [Wed Feb 1 13:04:19 2017].318020 CGI Request 309 on process 7081 [Wed Feb 1 13:04:19 2017].318575 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed Feb 1 13:04:19 2017].318593 msDrawMap(): WMS/WFS set-up and query, 0.000s [Wed Feb 1 13:04:19 2017].318604 msDrawRasterLayerLow(world): entering. [Wed Feb 1 13:04:19 2017].319702 msDrawMap(): Layer 0 (world), 0.001s [Wed Feb 1 13:04:19 2017].319724 msDrawMap(): Drawing Label Cache, 0.000s [Wed Feb 1 13:04:19 2017].319728 msDrawMap() total time: 0.002s [Wed Feb 1 13:04:19 2017].324501 msSaveImage(stdout) total time: 0.005s [Wed Feb 1 13:04:19 2017].324533 mapserv request proce
Re: [mapserver-users] Apply style on osm layer using sld
Hi, Could you clarify which part of your problem has a connection with SLD? -Jukka Rahkonen- vineet singh wrote: [mapserver-users] Apply style on osm layer using sld Hi All, I'm trying style a vector layer containing OSM data (places) using the mapscript style shown below. It works so long as I don't add any styling entry pertaining to labels. However, adding label styling makes MapServer crash while making WMS calls. It shows a few points with labeled but shortly thereafter, the mapserver instance crashes. There is no error statement in log file also. This how my layer looks like in map file : LAYER CONNECTION "host=localhost port=5432 user=abc password=asdf123 dbname=abc" CONNECTIONTYPE POSTGIS DATA 'geom from "OSM_places" using unique gid using srid=4326' EXTENT 68.5094575 6.6791812 97.0315678 35.368417 FILTER ((( ("[type]" ="city") OR ("[type]" ="town") OR ("[type]" ="village") OR ( ("[type]" != "town") And ( ("[type]" != "town") And ("[type]" != "town")) ) ))) METADATA "type" "vector" "wms_srs" "EPSG:4326 CRS:84" "wfs_srs" "EPSG:4326" "tinyows_retrievable" "1" "ows_enable_request""*" "tinyows_table""OSM_places" "wfs_namespace_prefix""abc" "tinyows_writable" "1" "wfs_title" "OSM_places" "wfs_namespace_uri" "http://www.abc.com/"; "wms_title" "OSM_places" END # METADATA NAME "OSM_places" PROJECTION "proj=longlat" "datum=WGS84" "no_defs" END # PROJECTION STATUS OFF TEMPLATE "tempalte.html" TILEITEM "location" TYPE POINT UNITS METERS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="city")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 7e+06 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="town")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 90 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ("[type]" ="village")) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 50 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS CLASS NAME "Unknown" EXPRESSION ( ( ("[type]" != "town") And ( ("[type]" != "town") And ("[type]" != "town")) ) ) LABEL ANGLE AUTO SIZE 12 COLOR 255 255 255 OFFSET 0 5 OUTLINECOLOR 0 0 0 POSITION LC SHADOWSIZE 1 1 END # LABEL MAXSCALEDENOM 10 STYLE COLOR 255 0 0 SIZE 6 SYMBOL "sld_mark_symbol_circle_filled" END # STYLE TEXT ("[name]") END # CLASS END # LAYER After removing TEXT ("[name]") from each class it shows all points but with this TEXT ("[name]") in layer mapserver crashes. Log file : [Wed Feb 1 13:04:19 2017].298440 msDrawMap(): Layer 12 (OSM_places), 0.012s [Wed Feb 1 13:04:19 2017].298478 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].298713 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].298923 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299227 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299415 setting outlinewidth to 1 (1, 10, 10) [Wed Feb 1 13:04:19 2017].299765 msDrawMap(): Drawing Label Cache, 0.001s [Wed Feb 1 13:04:19 2017].299772 msDrawMap() total time: 0.014s [Wed Feb 1 13:04:19 2017].302860 msSaveImage(stdout) total time: 0.003s [Wed Feb 1 13:04:19 2017].302888 mapserv request processing time (msLoadMap not incl.): 0.017s [Wed Feb 1 13:04:19 2017].302893 msFreeMap(): freeing map at 0x104c030. [Wed Feb 1 13:04:19 2017].318020 CGI Request 309 on process 7081 [Wed Feb 1 13:04:19 2017].318575 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed Feb 1 13:04:19 2017].318593 msDrawMap(): WMS/WFS set-up and query, 0.000s [Wed Feb 1 13:04:19 2017].318604 msDrawRasterLayerLow(world): entering. [Wed Feb 1
Re: [mapserver-users] Apply style on osm layer using sld
Sorry for wrong title, I meant to say styling rather than sld. Thanks Vineet Singh On Feb 1, 2017 3:34 PM, "Rahkonen Jukka (MML)" < jukka.rahko...@maanmittauslaitos.fi> wrote: > Hi, > > > > Could you clarify which part of your problem has a connection with SLD? > > > > -Jukka Rahkonen- > > > > vineet singh wrote: > [mapserver-users] Apply style on osm layer using sld > > > > Hi All, > > > > > > I'm trying style a vector layer containing OSM data (places) using the > mapscript style shown below. It works so long as I don't add any styling > entry pertaining to labels. > > However, adding label styling makes MapServer crash while making WMS calls. > > It shows a few points with labeled but shortly thereafter, the mapserver > instance crashes. There is no error statement in log file also. > > This how my layer looks like in map file : > > LAYER > > CONNECTION "host=localhost port=5432 user=abc password=asdf123 > dbname=abc" > > CONNECTIONTYPE POSTGIS > > DATA 'geom from "OSM_places" using unique gid using srid=4326' > > EXTENT 68.5094575 6.6791812 97.0315678 35.368417 > > FILTER ((( ("[type]" ="city") OR ("[type]" ="town") OR ("[type]" > ="village") OR ( ("[type]" != "town") And ( ("[type]" != "town") And > ("[type]" != "town")) ) ))) > > METADATA > > "type" "vector" > > "wms_srs" "EPSG:4326 CRS:84" > > "wfs_srs" "EPSG:4326" > > "tinyows_retrievable" "1" > > "ows_enable_request""*" > > "tinyows_table""OSM_places" > > "wfs_namespace_prefix""abc" > > "tinyows_writable" "1" > > "wfs_title" "OSM_places" > > "wfs_namespace_uri" "http://www.abc.com/"; > > "wms_title" "OSM_places" > > END # METADATA > > NAME "OSM_places" > > PROJECTION > > "proj=longlat" > > "datum=WGS84" > > "no_defs" > > END # PROJECTION > > STATUS OFF > > TEMPLATE "tempalte.html" > > TILEITEM "location" > > TYPE POINT > > UNITS METERS > > CLASS > > NAME "Unknown" > > EXPRESSION ( ("[type]" ="city")) > > LABEL > > ANGLE AUTO > > SIZE 12 > > COLOR 255 255 255 > > OFFSET 0 5 > > OUTLINECOLOR 0 0 0 > > POSITION LC > > SHADOWSIZE 1 1 > > END # LABEL > > MAXSCALEDENOM 7e+06 > > STYLE > > COLOR 255 0 0 > > SIZE 6 > > SYMBOL "sld_mark_symbol_circle_filled" > > END # STYLE > > TEXT ("[name]") > > END # CLASS > > CLASS > > NAME "Unknown" > > EXPRESSION ( ("[type]" ="town")) > > LABEL > > ANGLE AUTO > > SIZE 12 > > COLOR 255 255 255 > > OFFSET 0 5 > > OUTLINECOLOR 0 0 0 > > POSITION LC > > SHADOWSIZE 1 1 > > END # LABEL > > MAXSCALEDENOM 90 > > STYLE > > COLOR 255 0 0 > > SIZE 6 > > SYMBOL "sld_mark_symbol_circle_filled" > > END # STYLE > > TEXT ("[name]") > > END # CLASS > > CLASS > > NAME "Unknown" > > EXPRESSION ( ("[type]" ="village")) > > LABEL > > ANGLE AUTO > > SIZE 12 > > COLOR 255 255 255 > > OFFSET 0 5 > > OUTLINECOLOR 0 0 0 > > POSITION LC > > SHADOWSIZE 1 1 > > END # LABEL > > MAXSCALEDENOM 50 > > STYLE > > COLOR 255 0 0 > > SIZE 6 > > SYMBOL "sld_mark_symbol_circle_filled" > > END # STYLE > > TEXT ("[name]") > > END # CLASS > > CLASS > > NAME "Unknown" > > EXPRESSION ( ( ("[type]" != "town") And ( ("[type]" != "town") And > ("[type]" != "town")) ) ) > > LABEL > > ANGLE AUTO > > SIZE 12 > > COLOR 255 255 255 > > OFFSET 0 5 > > OUTLINECOLOR 0 0 0 > > POSITION LC > > SHADOWSIZE 1 1 > > END # LABEL > > MAXSCALEDENOM 10 > > STYLE > > COLOR 255 0 0 > > SIZE 6 > > SYMBOL "sld_mark_symbol_circle_filled" > > END # STYLE > > TEXT ("[name]") > > END # CLASS > > END # LAYER > > > > After removing TEXT ("[name]") from each class it shows all points but > with this TEXT ("[name]") in layer mapserver crashes. > > Log file : > > [Wed Feb 1 13:04:19 2017].298440 msDrawMap(): Layer 12 (OSM_places), > 0.012s > > [Wed Feb 1 13:04:19 2017].298478 setting outlinewidth to 1 (1, 10, 10) > > [Wed Feb 1 13:04:19 2017].298713 setting outlinewidth to 1 (1, 10, 10) > > [Wed Feb 1 13:04:19 2017].298923 setting outlinewidth to 1 (1, 10, 10) > > [Wed Feb 1 13:04:19 2017].299227 setting outlinewidth to 1 (1, 10, 10) > > [Wed Feb 1 13:04:19 2017].299415 setting outlinewidth to 1 (1, 10, 10) > > [Wed Feb 1 13:04:19 2017].299765 msDrawMap(): Drawing Label Cache, 0.001s > > [Wed Feb 1 13:04:19 2017].299772 msDrawMap
[mapserver-users] compiling mapserver regex problem
Hi All, I'm trying to compile mapserver and I get regex errors I can't solve it. ..\regex.c(4876) : error C2081: 'preg' : name in formal parameter list illegal 1>..\regex.c(4876) : error C2081: 'errbuf' : name in formal parameter list illegal 1>..\regex.c(4876) : error C2081: 'errbuf_size' : name in formal parameter list illegal 1>..\regex.c(4877) : error C2055: expected formal parameter list, not a type list ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] compiling mapserver
I get the following errors when I try to compile mapserver trunk version using visual studio 2015 1>d:\maps\mapserver.h(2238): warning C4273: 'strdup': inconsistent dll linkage 1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt\string.h(530): note: see previous definition of 'strdup' 1> maperror.c ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] compiling mapserver
Hi Ahmed, I have no issues with today's master with Visual Studio 2015. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2017-02-01 12:10 PM, Ahmed Tolba wrote: I get the following errors when I try to compile mapserver trunk version using visual studio 2015 1>d:\maps\mapserver.h(2238): warning C4273: 'strdup': inconsistent dll linkage 1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt\string.h(530): note: see previous definition of 'strdup' 1> maperror.c ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MS4W version 3.2.0 available
Hello everyone, MS4W version 3.2.0 is now available at http://www.ms4w.com This is a substantial release, so please see the very long list of updates to this popular product at: http://ms4w.com/HISTORY.html You'll notice updates for PHP 5.6.30, MapServer 7.0.4, MapCache, and (literally) the entire stack of libraries. Please note that your server must have this C++ Redistributable installed on it beforehand: (use the "x86" one https://www.microsoft.com/en-ca/download/details.aspx?id=30679). MS4W is growing, and 2017 will see lots of action in terms of MS4W; it now has 63 working mapfiles and data, installs to over 1GB of space, with now over 6,000 downloads per month and over 1TB of transfers. It includes plugins for Oracle, ECW, MSSQL, MapScripts (Java, Python, CSharp, PHP). It comes with pre-configured packages for GeoMOOSE, Mapbender, pmapper, OpenLayers (with a custom local WMS service working in the OpenLayers examples) and several MapServer viewers. And of course lots of changes are in progress for PHP 7 inside MS4W, which is working in MS4W Alpha versions (more details at http://mapserver.org/development/rfc/ms-rfc-117.html). Phew lots! Please don't be afraid to also provide feedback and requests through the MS4W tracker (so the comments and requests are not lost or forgotten): http://www.ms4w.com/trac/ Thank you all for sharing your spatial information with MS4W. And happy MapServing! -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MS4W version 3.2.0 available
Congratulations Jeff and all involved in MS4W. This work is priceless! All the best, Em 01/02/2017 22:27, "Jeff McKenna" escreveu: > Hello everyone, > > MS4W version 3.2.0 is now available at http://www.ms4w.com This is a > substantial release, so please see the very long list of updates to this > popular product at: http://ms4w.com/HISTORY.html You'll notice updates > for PHP 5.6.30, MapServer 7.0.4, MapCache, and (literally) the entire stack > of libraries. > > Please note that your server must have this C++ Redistributable installed > on it beforehand: (use the "x86" one https://www.microsoft.com/en-c > a/download/details.aspx?id=30679). > > MS4W is growing, and 2017 will see lots of action in terms of MS4W; it now > has 63 working mapfiles and data, installs to over 1GB of space, with now > over 6,000 downloads per month and over 1TB of transfers. It includes > plugins for Oracle, ECW, MSSQL, MapScripts (Java, Python, CSharp, PHP). It > comes with pre-configured packages for GeoMOOSE, Mapbender, pmapper, > OpenLayers (with a custom local WMS service working in the OpenLayers > examples) and several MapServer viewers. And of course lots of changes are > in progress for PHP 7 inside MS4W, which is working in MS4W Alpha versions > (more details at http://mapserver.org/development/rfc/ms-rfc-117.html). > Phew lots! > > Please don't be afraid to also provide feedback and requests through the > MS4W tracker (so the comments and requests are not lost or forgotten): > http://www.ms4w.com/trac/ > > Thank you all for sharing your spatial information with MS4W. > > And happy MapServing! > > > -jeff > > -- > Jeff McKenna > MapServer Consulting and Training Services > http://www.gatewaygeomatics.com/ > > > > > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users