This commit contains only changes for GeoTools class names. Those changes do not apply to SIS since the class name in Geotk and SIS are different.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r7307:7844 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/wkt/MathTransformParser.java
| Revision 7307 | Revision 7844 |
|---|---|
package org.geotools.referencing.wkt; // J2SE dependencies //import java.util.Set; //import java.util.HashSet; import java.util.Collections; // Parsing |
package org.geotools.referencing.wkt; // J2SE dependencies import java.util.Collections; // Parsing |
import org.opengis.referencing.operation.MathTransform;
import org.opengis.parameter.GeneralParameterValue;
import org.opengis.parameter.ParameterValue;
import org.opengis.parameter.OperationParameter;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.NoSuchIdentifierException;
import org.opengis.referencing.FactoryException; |
import org.opengis.referencing.operation.MathTransform;
import org.opengis.parameter.GeneralParameterValue;
import org.opengis.parameter.ParameterValue;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.NoSuchIdentifierException;
import org.opengis.referencing.FactoryException; |
* set the corresponding parameter in the ParameterList.
*/
Element param;
ParameterValueGroup params = new org.geotools.parameter.ParameterValueGroup(
Collections.singletonMap("name", "params"), parameters);
while ((param=element.pullOptionalElement("PARAMETER")) != null) {
final String name = param.pullString("name");
//I am assuming this will not be a ParameterValueGroup (bad assumption?)
ParameterValue parameter = (ParameterValue) params.getValue(name);
//should be able to use parameter.getValue().getClass() here, but it returns null
if (Integer.class.equals(((OperationParameter)parameter.getDescriptor()).getValueClass())) {
parameter.setValue(param.pullInteger("value"));
} else {
parameter.setValue(param.pullDouble("value"));
}
param.close();
} |
* set the corresponding parameter in the ParameterList.
*/
Element param;
ParameterValueGroup params = new org.geotools.parameter.ParameterGroup(
Collections.singletonMap("name", "params"), parameters);
while ((param=element.pullOptionalElement("PARAMETER")) != null) {
final String name = param.pullString("name");
//I am assuming this will not be a ParameterValueGroup (bad assumption?)
ParameterValue parameter = params.parameter(name);
//should be able to use parameter.getValue().getClass() here, but it returns null
if (Integer.class.equals(((ParameterDescriptor)parameter.getDescriptor()).getValueClass())) {
parameter.setValue(param.pullInteger("value"));
} else if (Double.class.equals(((ParameterDescriptor)parameter.getDescriptor()).getValueClass())) {
parameter.setValue(param.pullDouble("value"));
} else {
parameter.setValue(param.pullString("value"));
}
param.close();
} |