[mapserver-users] Mapserver wms request throws error when trying to load SLD file

Bill Hudspeth bhudspeth at edac.unm.edu
Tue Oct 21 10:30:01 PDT 2014


That was indeed the problem...I changed the path and it now works..!

thanks

----- Original Message -----
From: "Bob Basques (CI-StPaul)" <bob.basques at ci.stpaul.mn.us>
To: "Bill Hudspeth" <bhudspeth at edac.unm.edu>, mapserver-users at lists.osgeo.org
Sent: Tuesday, October 21, 2014 10:32:21 AM
Subject: RE: [mapserver-users] Mapserver wms request throws error when trying to	load SLD file

It doesn't look like MapServer can find your SLD, does that Link work from a browser directly?

Bobb



-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bill Hudspeth
Sent: Tuesday, October 21, 2014 11:30 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Mapserver wms request throws error when trying to load SLD file

Hello,

Thanks Jeff for answering my questions about Mapserv executables and path on Ubuntu Linux. I can now view my raster image fine, but I am trying to apply an SLD file and get the error:

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1"> <ServiceException>
msSLDApplySLDURL: WMS server error. Could not open SLD http://localhost/var/www/pm25_geoserver/public_html/pm25_sld.xml and save it in a temporary file. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TMPPATH in the map file. Please check the MapServer documentation on temporary path settings.
msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 403 () for http://localhost/var/www/pm25_geoserver/public_html/pm25_sld.xml
</ServiceException>
</ServiceExceptionReport>


I have set my temp file path in the Web section of the mapfile to:

WEB
  TEMPPATH "/tmp/"
  IMAGEPATH "/tmp/"
  IMAGEURL "/tmp/"
END

and my SLD is:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
  xmlns="http://www.opengis.net/sld"
  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>
    <Name>pm25_monthly</Name>
    <UserStyle>
      <Title>PM 2.5</Title>
    <FeatureTypeStyle>
          <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
	    <RasterSymbolizer>
		    <ColorMap type="ramp">
			<ColorMapEntry color="#000000" quantity="0.0" opacity="0.0"/>
			<ColorMapEntry color="#021ca0" quantity="1.0" opacity="0.5"/>
			<ColorMapEntry color="#0432ff" quantity="5.0" opacity="0.5"/>
			<ColorMapEntry color="#015efe" quantity="10.0" opacity="0.5"/>
			<ColorMapEntry color="#06bfff" quantity="15.0" opacity="0.5"/>                              
			<ColorMapEntry color="#26fcd7" quantity="20.0" opacity="0.5"/>
			<ColorMapEntry color="#06bfff" quantity="25.0" opacity="0.5"/>                               
			<ColorMapEntry color="#f2f903" quantity="30.0" opacity="0.5"/>
			<ColorMapEntry color="#ff9d02" quantity="35.0" opacity="0.5"/>                               
			<ColorMapEntry color="#ff4005" quantity="40.0" opacity="0.5"/>
			<ColorMapEntry color="#e12000" quantity="45.0" opacity="0.5"/>                               
			<ColorMapEntry color="#810d02" quantity="50.0" opacity="0.5"/>
		  </ColorMap>
	    </RasterSymbolizer>
      </Rule>
    </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>


Can't see why it is failing...

Thanks, Bill
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list