[mapserver-commits] r12026 - in sandbox/inspire_soc2011: mapserver msautotest/wxs/expected

svn at osgeo.org svn at osgeo.org
Mon Aug 8 12:53:57 EDT 2011


Author: stefanl
Date: 2011-08-08 09:53:57 -0700 (Mon, 08 Aug 2011)
New Revision: 12026

Modified:
   sandbox/inspire_soc2011/mapserver/mapwms.c
   sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario1_styles130_roadarea.xml
   sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario2_styles130_roadarea.xml
Log:
msWMSGetStyles didn't wwork for root layer

Modified: sandbox/inspire_soc2011/mapserver/mapwms.c
===================================================================
--- sandbox/inspire_soc2011/mapserver/mapwms.c	2011-08-07 22:35:26 UTC (rev 12025)
+++ sandbox/inspire_soc2011/mapserver/mapwms.c	2011-08-08 16:53:57 UTC (rev 12026)
@@ -4099,7 +4099,9 @@
             {
                 for (j=0; j<map->numlayers; j++)
                 {
-                    if ((GET_LAYER(map, j)->name &&
+                    if ((map->name &&
+                         strcasecmp(map->name, layers[k]) == 0) ||
+                        (GET_LAYER(map, j)->name &&
                          strcasecmp(GET_LAYER(map, j)->name, layers[k]) == 0) ||
                         (GET_LAYER(map, j)->group &&
                          strcasecmp(GET_LAYER(map, j)->group, layers[k]) == 0))

Modified: sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario1_styles130_roadarea.xml
===================================================================
--- sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario1_styles130_roadarea.xml	2011-08-07 22:35:26 UTC (rev 12025)
+++ sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario1_styles130_roadarea.xml	2011-08-08 16:53:57 UTC (rev 12026)
@@ -1,8 +1,66 @@
 Content-type: text/xml
 
-<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
-<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
-<ServiceException code="LayerNotDefined">
-msWMSGetStyles(): WMS server error. Invalid layer(s) given in the LAYERS parameter.
-</ServiceException>
-</ServiceExceptionReport>
+<StyledLayerDescriptor version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:se="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<NamedLayer>
+<se:Name>TN.RoadTransportNetwork.RoadLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass1</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>67</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#ff0000</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+<se:Rule>
+<se:Name>myclass2</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>68</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#00ff00</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+<NamedLayer>
+<se:Name>TN.RailTransportNetwork.RailwayLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass3</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>74</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#0000ff</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+<NamedLayer>
+<se:Name>TN.AirTransportNetwork.AirLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass4</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>66</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#00ffff</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+</StyledLayerDescriptor>
+

Modified: sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario2_styles130_roadarea.xml
===================================================================
--- sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario2_styles130_roadarea.xml	2011-08-07 22:35:26 UTC (rev 12025)
+++ sandbox/inspire_soc2011/msautotest/wxs/expected/wms_inspire_scenario2_styles130_roadarea.xml	2011-08-08 16:53:57 UTC (rev 12026)
@@ -1,8 +1,66 @@
 Content-type: text/xml
 
-<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
-<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
-<ServiceException code="LayerNotDefined">
-msWMSGetStyles(): WMS server error. Invalid layer(s) given in the LAYERS parameter.
-</ServiceException>
-</ServiceExceptionReport>
+<StyledLayerDescriptor version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:se="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<NamedLayer>
+<se:Name>TN.RoadTransportNetwork.RoadLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass1</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>67</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#ff0000</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+<se:Rule>
+<se:Name>myclass2</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>68</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#00ff00</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+<NamedLayer>
+<se:Name>TN.RailTransportNetwork.RailwayLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass3</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>74</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#0000ff</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+<NamedLayer>
+<se:Name>TN.AirTransportNetwork.AirLink</se:Name>
+<UserStyle>
+<se:FeatureTypeStyle>
+<se:Rule>
+<se:Name>myclass4</se:Name>
+<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>F_CODE</ogc:PropertyName><ogc:Literal>66</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
+<se:LineSymbolizer>
+<se:Stroke>
+<se:SvgParameter name="stroke">#00ffff</se:SvgParameter>
+<se:SvgParameter name="stroke-width">1.00</se:SvgParameter>
+</se:Stroke>
+</se:LineSymbolizer>
+</se:Rule>
+</se:FeatureTypeStyle>
+</UserStyle>
+</NamedLayer>
+</StyledLayerDescriptor>
+



More information about the mapserver-commits mailing list