Bill Hudspeth
2014-10-21 16:29:44 UTC
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
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