SLPParser fails for some RasterSymbolizer tags, the solution is provided in the
description. please review and commit
----------------------------------------------------------------------------------------------------------------------
Key: GEOT-1447
URL: http://jira.codehaus.org/browse/GEOT-1447
Project: GeoTools
Issue Type: Bug
Components: core styling
Affects Versions: 2.3.4
Environment: Ubuntu Feisty, sun java build 1.6.0-b105
Reporter: Stefan Alfons Krüger
Attachments: pyramid.sld
Parsing of an .SLD with RasterSymbolizer fails for some tags, as the tag
parsing code is wrong... the solution is provided:
I attached a SLD file that fails to be parsed...
in SLDParserparseSelectedChannel()
if (childName.equalsIgnoreCase("SourceChannelName")) {
symbol.setChannelName(child.getNodeValue());
}
if (childName.equalsIgnoreCase("ContrastEnhancement")) {
try {
symbol.setContrastEnhancement((Expression) ExpressionBuilder
.parse(child.getNodeValue()));
} catch (Exception e) {
// TODO: handle exception
child.getNodeValue()
doesn't return the content of the tag but always null. it has to be replaced
twice here with
child.getFirstChild().getNodeValue()
Same problem in parseContrastEnhancement():
if (childName.equalsIgnoreCase("GammaValue")) {
try {
symbol.setGammaValue((Expression)
ExpressionBuilder
.parse(child.getNodeValue()));
} catch (Exception e) {
// TODO: handle exception
}
}
child.getNodeValue() has to be replaced with
child.getFirstChild().getNodeValue()
this is my first JIRA bug report.. i hope i did everything right,
greetings,
steve
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel