Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: referencing
-
Labels:None
-
Number of attachments :
Description
The following methods should be removed from CRSFactory interface:
- createProjectedCRS(Map, GeographicCRS, String, GeneralParameterValue[], CartesianCS);
- createProjectedCRS(Map, GeographicCRS, ParameterValueGroup, CartesianCS);
- getDefaultParameters();
The following method will stay there:
- createProjectedCRS(Map, OperationMethod, GeographicCRS, MathTransform, CartesianCS);
Basically, this bug report is about removing any method from CRSFactory that try to creates themself a MathTransform, for the following reasons:
- It introduces a dependency to MathTransformFactory at the
implementation level of this method. This is against the
orthogonal aspect of factories (no other methods force this
kind of cross-dependency).
- It brings duplication with MathTransformFactory's API,
e.g. getDefaultParameters().
- This is mostly a convenience method; user can do the same with
similar efficiency in their own code.
- Experience gained in Geotoosl implementation and usage suggests
that it is hard to get a method that meets every need. Some code
will ignore this method and build ProjectedCRS in their own way
(with the createProjectedCRS(..., MathTransform, ...) method)
anyway. They may want to use their own MathTransformFactory, use
a different OperationMethod, etc.
If there is some voice against the removal of all 'createProjectedCRS(...)' methods without explicit MathTransform parameter, please comment here.
Issue Links
- is related to
-
GEO-61
Need a better way to instantiate ProjectedCRS with factories
-
Those methods has not been deprecated in latest GeoAPI snapshot. They will be removed later (unless some peoples express objections).