[mapserver-users] Thankyou Message and a possible bug in the SLD feature (mapserver 5.6.5-2)
Hi all, after having received extremely useful support from this community, I wish to publicly recognize the effort spent by Yewondwossen Assefa in supporting my request of help. Thanks to his support I was able to overcome my problem related to the use of the SLD feature to apply a spatial user-related filter to a coverage. After his help, I went on with the experiments and I found that, under the release 5.6.5-2 of mapserver (linux Debian), the spatial filter, applied to a coverage maintains all the features defined in the map file for the elements that fall within the BBOX filter (this spatial filter worked fine as well as the more generic polygonal fence) with the exception of the LABEL, which was not passed to the selected features. In other words: given the calling URL like: http://bla-bla/cgi-bin/mapserv?map=/bla-bla-bla/maps_2.mapLAYERS=mylayerEXCEPTIONS=application%2Fvnd.ogc.se_inimageFORMAT=image%2FpngTRANSPARENT=TRUEVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG%3A900913BBOX=-10018754.17,-10018754.17,0,0WIDTH=256HEIGHT=256SLD=http://localhost/sldfile.xml and an sldfile.xml containing only the spatial filter like: ?xml version=1.0 encoding=UTF-8? StyledLayerDescriptor version=1.0.0 xmlns=http://www.opengis.net/sld; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd; NamedLayer Namemylayer/Name UserStyle Titlexxx/Title FeatureTypeStyle Rule ogc:Filter BBOX PropertyNameGeometry/PropertyName gml:Box srsName=http://www.opengis.net/gml/srs/epsg.xml#32632; gml:coordinates$BBOX_minx,$BBOX_miny $BBOX_maxx,$BBOX_maxy/gml:coordinates /gml:Box /BBOX /ogc:Filter /Rule /FeatureTypeStyle /UserStyle /NamedLayer /StyledLayerDescriptor where $BBOX_m... are variables replaced by the BBOX coords, then, assuming that the layer mylayer is a polygon layer with a label defined, then the whole command returns only the polygons that fall within the BBOX boundaries with all the attributes defined in the map file (like the filling color or the stroke size and color) but without the LABEL (the same call without the SLD param returns the whole coverage including the labels. Again thank you Yewondwossen and thank you all. Respectfully. Marco Bagni ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver WMS
Hi, very likely there is a problem with your DATA declaration since, as far as I know you have to put the name of the coverage enclosed within quotes and complete with the extension like: DATA 'popplace.shp' On the other side this MAP file looks wery skinny. Here is an example of a MAP template I am using with my system for a vector coverage in SHP format: ###START6493f0c28e6856b_VL2 LAYER NAME '6493f0c28e6856b_VL2' TYPE LINE DATA 'absolute path to the location of the shape file like /usr/local/web/gweb/gis-root/level_2/cartographic_background/administrative_boundaries/district_limit/6493f0c28e6856b/reg2010_s.shp' DUMP true HEADER 'this is optional and allows to return the results of an identify in html format but in order to have this you have to declare 'wms_feature_info_mime_type' 'text/html' in the WEB METADATA section of the MAP part of the map file, that at the beginning of the file :/usr/local/web/gweb/gis-root/level_2/cartographic_background/administrative_boundaries/district_limit/6493f0c28e6856b/template_header.html' TEMPLATE 'this MUST be filled with something also some gibberish like templatestuff or the absolute path to a real HTML file like: /usr/local/web/gweb/gis-root/level_2/cartographic_background/administrative_boundaries/district_limit/6493f0c28e6856b/template_query.html' FOOTER 'applies the same comment of the HEADER token /usr/local/web/gweb/gis-root/level_2/cartographic_background/administrative_boundaries/district_limit/6493f0c28e6856b/template_footer.html' EXTENT 313361.0014 3933878.5013 1312106.7514 5220491.2513 METADATA 'wfs_title' 'VL_2: Regioni' # this name is the name displayed in the WMS clients 'ows_title' 'VL_2: Regioni' 'ows_abstract' 'UserData:; ;__System___; Sector: Cartographic Background; Category: Administrative Boundaries; Table: District Limit; Date_from: -00-00; Date_to: -00-00; DataType: LINE' 'ows_srs' 'EPSG:4326' 'ows_include_items' 'all' 'ows_types' 'auto' 'gml_featureid' 'ID' # this stuff is for WFS queries and contains the list of the coverage fields that must be exported 'gml_include_items' 'all' 'gml_types' 'auto' 'gml_COD_REG_type' 'Integer' 'gml_NOME_REG_type' 'String' END STATUS OFF TRANSPARENCY 100 PROJECTION 'proj=utm' 'ellps=WGS84' 'datum=WGS84' 'zone=32' 'north' 'units=m' 'no_defs' END # # In this field the user can insert the commands to display the map # accordingly with a classification based on the value of one or more fields # following the MAP Server syntax like in the following example: # # # CLASSITEM 'Code' # CLASS # NAME '1.000 Code 13.250' # EXPRESSION ( ([Code] = 1.000) AND ([Code] = 13.250) ) # STYLE # WIDTH 1 # OUTLINECOLOR 0 0 0 # COLOR 0 255 0 # END # END # CLASS # NAME '13.250 Code 25.500' # EXPRESSION ( ([Code] = 13.250) AND ([Code] = 25.500) ) # STYLE # WIDTH 1 # OUTLINECOLOR 0 0 0 # COLOR 0 191 64 # END # END # CLASS NAME 'VL_2: Regioni' TEXT ([NOME_REG]) STYLE WIDTH 1 OUTLINECOLOR 0 0 0 COLOR 127 127 127 END LABEL # the field used to display the label is declared in the TEXT token few lines before FONT 'arial' TYPE bitmap COLOR 0 0 0 OUTLINECOLOR 255 255 255 POSITION auto SIZE tiny WRAP '@' END END END ###END6493f0c28e6856b_VL2 Hoping that this will be of some help. Cheers Marco Bagni On Mon, June 27, 2011 9:32 am, Sila Khan wrote: i followed the same pattern of mapfile for accessing maps through wms and when i start it in browser it gives Error like this loadHashTable(): Unknown identifier. Parsing error near (TYPE):(line 47) when i modify the recommended line it goes to an other line with same Error plz help me to rectify the Error NAME WMS-testSTATUS ONSIZE 400 300SYMBOLSET ../etc/symbols.symEXTENT -220 -712631 3072800 384UNITS METERSSHAPEPATH ../dataIMAGECOLOR 255 255 255FONTSET ../etc/fonts.txt WEB IMAGEPATH /ms4w/tmp/ms_tmp/ IMAGEURL /ms_tmp/ METADATA wms_title WMS Demo Server ##required wms_onlineresource http://yourpath/cgi-bin/mapserv.exe?; ##required wms_srs EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 ##recommended ENDEND PROJECTION init=epsg:42304 ##requiredEND ## Start of layer definitions# LAYER NAME park METADATA wms_titleParks ##required END TYPE POLYGON STATUS OFF DATA park PROJECTION init=epsg:42304 ##recommended END CLASS NAME Parks STYLE COLOR 200 255 0 OUTLINECOLOR 120 120 120 END ENDEND # Layer LAYER NAME popplace METADATA wms_titleCities ##required END TYPE POINT STATUS ON DATA popplace PROJECTION init=epsg:42304 ##recommended END CLASS NAME Cities STYLE SYMBOL 2
[mapserver-users] Demo.Mapserver.Org is Down: any (good) news??
Hi all, I am trying to apply the Styled Layer Descriptor (SLD) feature to my project and I am looking for syntactically correct examples of such directives. Reading the official manual at http://mapserver.org/ogc/sld.html I tried to browse the contained examples but all the links point to demo.mapserver.org and the site is always temporary unavailable. The problem is that this temporary is going on without interruption since more two weeks (such is the time I have waited before asking for the help of the community). Is there some good fellow that can share a correct example of an SLD XML file where there is the rule to fill with some color some polygons contained within a region (BBOX or more sophisticated region boundary like a user polygon)? Thanks in advance for your support. Cheers Marco Bagni ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Demo.Mapserver.Org is Down: any (good) news??
Now it works! Thanks. BTW: any working example of an SLD filter where a generic polygon is used to define the area used to apply a particular attribute? On Mon, June 13, 2011 3:03 pm, Jeff McKenna wrote: On 11-06-13 9:51 AM, Marco Bagni wrote: Reading the official manual at http://mapserver.org/ogc/sld.html I tried to browse the contained examples but all the links point to demo.mapserver.org and the site is always temporary unavailable. I've fixed the issue on the demo.mapserver.org - please retry. If you ever see problems again don't hesitate to send a message to the mailing list. -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 -- ICT GIS Senior Specialist Phone: +39 06 3751 5913 Mobile: +39 380 709 5502 Phone: +1 904 807 7866 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] SLD and Spatial Filtering: what is working and what is not?
Hi all, playing with the SLD feature and trying to use it in order to show with a RED color only those polygons, in a coverage, that fit within a user-defined fence I have found some things that seem to be broken: The following SLD filter works fine: NamedLayer NameREQUESTED_LAYER_NAME/Name UserStyle Titlexxx/Title FeatureTypeStyle Rule ogc:Filter BBOX PropertyNameGeometry/PropertyName gml:Box srsName=http://www.opengis.net/gml/srs/epsg.xml#4326; gml:coordinates8.473,40.231 9,40.784/gml:coordinates /gml:Box /BBOX /ogc:Filter PolygonSymbolizer Fill CssParameter name=fill#FF/CssParameter /Fill /PolygonSymbolizer /Rule /FeatureTypeStyle /UserStyle /NamedLayer This SLD file works as exepected, all the polygons outside the BBOX rectangle are not displayed and those that fall within are displayed in RED color. eplacing the ogc:Filter with something more versatile like a fence (in the example I have used exactly the same vertices of the BBOX rectangle given above) it does not work. Why? NamedLayer NameREQUESTED_LAYER_NAME/Name UserStyle Titlexxx/Title FeatureTypeStyle Rule ogc:Filter Within PropertyNameGeometry/PropertyName gml:Polygon srsName=http://www.opengis.net/gml/srs/epsg.xml#4326; gml:outerBoundaryIs gml:LinearRing gml:coordinates8.473,40.231 8.473,40.784 9,40.784 9,40.231 8.473,40.231/gml:coordinates /gml:LinearRing /gml:outerBoundaryIs /gml:Polygon /Within /ogc:Filter PolygonSymbolizer Fill CssParameter name=fill#FF/CssParameter /Fill /PolygonSymbolizer /Rule /FeatureTypeStyle /UserStyle /NamedLayer I have tried also DWithin with no results (the filter is applied but no polygons are displayed). BTW sorry for my ignorance by what is the difference between Within and DWithin? And where can I find some written reference on the meaning of the Spatial Filters? What am I doing wrong? What kind of ogc:Filters are available in the SLD feature (applied to a WMS request)? Since the documentation on this particular issue is very poor I am asking the help of this community with the promise to produce, for the benefit of us all, a short and effective HOWTO recipe when the problem shall be sorted out. Thanks in advance. Marco Bagni ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SLD and Spatial Filtering: what is working and what is not?
Jeff, apart fine sarcasm, can you (would you) be of some help? I promised my support AFTER having found the solution! ;-) Cheers Marco Bagni On Mon, June 13, 2011 7:48 pm, Jeff McKenna wrote: On 11-06-13 1:40 PM, Marco Bagni wrote: Since the documentation on this particular issue is very poor I am asking the help of this community with the promise to produce, for the benefit of us all, a short and effective HOWTO recipe when the problem shall be sorted out. That's wonderful news. You can start to add documentation right away by: 1) heading to the MapServer wiki (http://trac.osgeo.org/mapserver/) 2) then log in (if you need to create a login see http://www.osgeo.org/osgeo_userid) 3) then pan the wiki page down and you'll see all of the wonderful wiki pages that users have created. 4) create your wiki pages 5) send an email to mapserver-users list pointing to your new wiki page Thanks! -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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users