Utilities

Missing NumberRange constructor

Because of usage of parameterized types, expressions like:

NumberRange range = new NumberRange(lower, upper);
need to replace the constructor call by a call to the static method factory:
NumberRange<Integer> range = NumberRange.create(lower, upper);
The <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]


Missing DefaultParameterDescriptor constructor

Because of usage of parameterized types, expressions like:

ParameterDescriptor descriptor = new DefaultParameterDescriptor(name, validValues, defaultValue);
need an explicit declaration of the value class, as below. It is usually just a matter of adding something like String.class in the arguments.
ParameterDescriptor descriptor = new DefaultParameterDescriptor(name, valueClass, validValues, defaultValue);

[top]

Referencing

Missing ReferencingFactoryContainer.createProjectedCRS method.

Because of the removal of deprecated methods, expressions like:

ReferencingFactoryContainer factories = ...
ProjectedCRS crs = factories.createProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
need to replace the call to the 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]


Missing ProjectedCRS constructor

Because of the removal of deprecated methods, expressions like:

ProjectedCRS crs = new DefaultProjectedCRS(properties, geographicCRS, method, transform, cartesianCS);
need to bundle the 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]