/** * Returns the parameter value for the specified operation parameter. This convenience method is * used by subclasses for initializing {@linkplain MathTransform math transform} from a set of * parameters. * * @param param The parameter to look for. * @param group The parameter value group to search into. * @return The requested parameter value, or {@code null} if {@code param} is {@linkplain * #createOptionalDescriptor optional} and the user didn't provided any value. * @throws ParameterNotFoundException if the parameter is not found. * @todo Move to the {@link org.geotools.parameter.Parameters} class. */ protected static String stringValue( final ParameterDescriptor<?> param, final ParameterValueGroup group) throws ParameterNotFoundException { final ParameterValue<?> value = getParameter(param, group); return (value != null) ? value.stringValue() : null; }
final Object value = param.getValue(); if (value == null) return; sortClause = param.stringValue(); return; final Object value = param.getValue(); if (value == null) return; mergeBehavior = MergeBehavior.valueOf(param.stringValue().toUpperCase()); return;
/** * Returns the string value of the parameter identified by the given descriptor. * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * * @param parameter the name or alias of the parameter to look for. * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. * * @see DefaultParameterValue#stringValue() * * @since 0.6 */ public String stringValue(final ParameterDescriptor<? extends CharSequence> parameter) throws ParameterNotFoundException { final ParameterValue<?> value = getParameter(parameter); return (value != null) ? value.stringValue() : defaultValue(parameter).toString(); }
/** * Returns the string value of the parameter identified by the given descriptor. * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * * @param parameter the name or alias of the parameter to look for. * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. * * @see DefaultParameterValue#stringValue() * * @since 0.6 */ public String stringValue(final ParameterDescriptor<? extends CharSequence> parameter) throws ParameterNotFoundException { final ParameterValue<?> value = getParameter(parameter); return (value != null) ? value.stringValue() : defaultValue(parameter).toString(); }
@Override public CoordinateReferenceSystem getCRS(final GeoPos referencePos, ParameterValueGroup parameters, GeodeticDatum datum) throws FactoryException { int zoneIndex = parameters.parameter(ZONE_NAME).intValue(); String hemisphere1 = parameters.parameter(HEMISPHERE_NAME).stringValue(); boolean south = (SOUTH_HEMISPHERE.equals(hemisphere1)); ParameterValueGroup tmParameters = createTransverseMercatorParameters(zoneIndex, south, datum); return createCrs(getProjectionName(zoneIndex, south), new TransverseMercator.Provider(), tmParameters, datum); }
@Override public CoordinateReferenceSystem getCRS(final GeoPos referencePos, ParameterValueGroup parameters, GeodeticDatum datum) throws FactoryException { int zoneIndex = parameters.parameter(ZONE_NAME).intValue(); String hemisphere1 = parameters.parameter(HEMISPHERE_NAME).stringValue(); boolean south = (SOUTH_HEMISPHERE.equals(hemisphere1)); ParameterValueGroup tmParameters = createTransverseMercatorParameters(zoneIndex, south, datum); return createCrs(getProjectionName(zoneIndex, south), new TransverseMercator.Provider(), tmParameters, datum); }
String srs = value.stringValue(); value.stringValue());
if(value==null) return; sortClause = param.stringValue(); return;