NumberRange constructor
Because of usage of parameterized types, expressions like:
need to replace the constructor call by a call to the static method factory:NumberRange range = new NumberRange(lower, upper);
TheNumberRange<Integer> range = NumberRange.create(lower, upper);
<Integer> declaration is optional but recommanded, and may need
to be changed to <Double> or other types depending on the type of the
lower and upper arguments.
| [top] |
DefaultParameterDescriptor constructor
Because of usage of parameterized types, expressions like:
need an explicit declaration of the value class, as below. It is usually just a matter of adding something likeParameterDescriptor descriptor = new DefaultParameterDescriptor(name, validValues, defaultValue);
String.class in the arguments.
ParameterDescriptor descriptor = new DefaultParameterDescriptor(name, valueClass, validValues, defaultValue);
| [top] |
ReferencingFactoryContainer.createProjectedCRS method.
Because of the removal of deprecated methods, expressions like:
need to replace the call to theReferencingFactoryContainer factories = ... ProjectedCRS crs = factories.createProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
ReferencingFactoryContainer method by
a call to the same method in CRSFactory:
CRSFactory factory = factories.getCRSFactory(); // Note: an alternative is to use FactoryFinder. ProjectedCRS crs = factory.createProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
| [top] |
ProjectedCRS constructor
Because of the removal of deprecated methods, expressions like:
need to bundle theProjectedCRS crs = new DefaultProjectedCRS(properties, geographicCRS, method, transform, cartesianCS);
method and transform arguments in an
DefiningConversion object:
Conversion conversion = new DefiningConversion("my conversion", method, transform);
ProjectedCRS crs = new DefaultProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
The same applies to constructions using a ParameterValueGroup argument
instead than MathTransform, or to constructions performed with the
ReferencingFactoryContainer.createProjectedCRS overloaded method, or to constructions
performed with the CRSFactory and CoordinateOperationFactory interfaces.
| [top] |