Hi all,
To summarize up front, I would like to change the type of the
"ContrastEnhancment" reference on SelectedChannelType from Expression to
ContrastEhnancment. Continue on for more details.
Looking at the SLD 1.0.0 schema I see:
<xsd:complexType name="SelectedChannelType">
<xsd:sequence>
<xsd:element ref="sld:SourceChannelName">
<xsd:element ref="sld:ContrastEnhancement">
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ContrastEnhancement">
<xsd:complexType>
<xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:element ref="sld:Normalize"/>
<xsd:element ref="sld:Histogram"/>
</xsd:choice>
<xsd:element ref="sld:GammaValue" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
However the org.geotools.styling.SelectedChannelType interface looks like:
public interface SelectedChannelType extends GTComponent {
public void setChannelName(String name);
public String getChannelName();
public void setContrastEnhancement(Expression gammaValue);
public Expression getContrastEnhancement();
}
Where ContrastElement is an Expression. However the contrast
org.geotools.styling.ContrastElement interface already exists:
public interface ContrastEnhancement extends GTComponent {
public void setType(Expression type);
public Expression getType();
public void setGammaValue(Expression gamma);
public Expression getGammaValue();
public void setNormalize();
public void setHistogram();
}
and matches up nicely with the spec. So I would like to change the type
of the reference on SelectedChannelType from Expression to
ContrastEnhancement.
One problem is that I cannot maintain full backwards compatability since
i need to change the return type of
SelectedChannelType#getContrastEnhancment(). That being said I have made
the change in my local sandbox and the build remains fine. So it stands
that it may break some client code.
-Justin
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel