Thanks Jan, I applied the changes (should be commited today). For now I'm still 
working primarily on MathTransformBuilder (the change applied in other classes 
are only the changes required in order to keep the library compiling and 
running 
without test failures). I also applied the following additional changes:

* Replaced CalculationException by MismatchedSizeException or
   MismatchedDimensionException, which are existing exceptions
   appropriate for the purpose of CalculationException I believe.

* MathTransformBuilder expects factories in constructor arguments.
   They are the factories to be used later for creation of math
   transform instances.

* Added a first draft of 'getSourceCRS()', 'getTargetCRS()', 'getValidArea()'
   methods. I plan to go to the point where we have a working
   'getCoordinateOperation()' method, which is one level higher than
   MathTransform. All those methods rely on 'getMathTransform()'
   and build more complex objects around it.


Now continuing on the proposal, what about the following?

* Rename 'get/setDestinationPoints' as 'get/setTargetPoints'
   for consistency with 'getTargetCRS()'. The later come from
   org.opengis.referencing.operation.CoordinateOperation.

* Since we renamed 'AbstractParamCalculator' as 'MathTransformBuilder',
   we should probably rename every classes like 'AffineParamCalculator'
   as 'AffineTransformBuilder'.

* What about renaming the "org.geotools...calculator" package as
   "org.geotools...builder"?

* Replace the "throws TransformException" clause in getMathTransform()
   by "throws FactoryException" (or some subclass of it), because the
   exception is about the creation of a math transform, not the usage
   of an existing one for transforming points.

* Turns the 'ptSrc' and 'ptDst' fields into private ones, and add
   'getSourcePoints' and 'getDestination/TargetPoints()' methods.

* Replace the 'ptSrc' and 'ptDst' arrays by java.util.List. The main
   purpose it to protect the data from uncontroled changes outside the
   MathTransformBuilder methods (for example 'getSourcePoints()' would
   returns an immutable view of the list).

        Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to