Hi All

Wondering whether someone might let me know whether I've done the right thing 
here or whether I'm just setting myself up for a fall later.

I was getting the following exception running some coordinate stuff:
Exception in thread "main" 
org.opengis.referencing.operation.OperationNotFoundException: Concatenated 
operation not supported.    at 
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1440)   
 at 
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1307)   
 at 
org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:326)

So I replaced the offedning code...

                /*                 * Constructs the pass through transform only 
if there is at least one ordinate to                 * pass. Actually, the code 
below would give an acceptable result even if this check                 * was 
not performed, except that the exception below could be unnecessary 
thrown.                 */                if (!(step instanceof Operation)) 
{                    // TODO                    throw new 
OperationNotFoundException("Concatenated operation not 
supported.");                }                mt = 
getMathTransformFactory().createPassThroughTransform(lower, mt, 
dimensions-upper);                step = new 
DefaultPassThroughOperation(properties, sourceStepCRS, targetStepCRS,

with...
                /*                 * Constructs the pass through transform only 
if there is at least one ordinate to                 * pass. Actually, the code 
below would give an acceptable result even if this check                 * was 
not performed, except that the exception below could be unnecessary 
thrown.                 */                mt = 
getMathTransformFactory().createPassThroughTransform(lower, mt, 
dimensions-upper);
                if (!(step instanceof Operation)) {                    step = 
DefaultOperation.create(Collections.singletonMap("name", step.getName()), 
sourceStepCRS, targetStepCRS, mt, new DefaultOperationMethod(mt), 
null);                }                step = new 
DefaultPassThroughOperation(properties, sourceStepCRS, 
targetStepCRS,                                                       
(Operation) step, mt);


Seems to work ok but would just like some warning on any issues I might 
encounter down the track with this code...

Thanks in advance

Tim
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to