This commit propagates the method signature changes in GeoAPI. Reverting this change causes compilation errors, which are fixed by reapplying the changes in a similar (but not identical) way.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r24924:24925 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/AbstractCoordinateOperation.java
Revision 24924 | Revision 24925 |
---|---|
private static double getAccuracy0(final CoordinateOperation operation) { final Collection accuracies = operation.getPositionalAccuracy(); for (final Iterator it=accuracies.iterator(); it.hasNext();) { final Result accuracy = ((PositionalAccuracy) it.next()).getResult(); if (accuracy instanceof QuantitativeResult) { final QuantitativeResult quantity = (QuantitativeResult) accuracy; final double[] r = quantity.getValues(); if (r!=null && r.length!=0) { final Unit unit = quantity.getValueUnit(); if (unit!=null && SI.METER.isCompatible(unit)) { return unit.getConverterTo(SI.METER).convert(r[0]); } } } } /* * No quantitative, linear accuracy were found. If the coordinate operation is actually * a conversion, the accuracy is up to rounding error (i.e. conceptually 0) by definition. |
private static double getAccuracy0(final CoordinateOperation operation) { final Collection accuracies = operation.getPositionalAccuracy(); for (final Iterator it=accuracies.iterator(); it.hasNext();) { Collection results = ((PositionalAccuracy) it.next()).getResult(); for( Iterator it2 = results.iterator(); it2.hasNext(); ){ final Result accuracy = (Result) it2.next(); if (accuracy instanceof QuantitativeResult) { final QuantitativeResult quantity = (QuantitativeResult) accuracy; Collection r = quantity.getValues(); if (r!=null && r.size() !=0) { final Unit unit = quantity.getValueUnit(); if (unit!=null && SI.METER.isCompatible(unit)) { for( Iterator i=r.iterator();i.hasNext();){ Double d = (Double) i.next(); if( d != null ){ double value = d.doubleValue(); return unit.getConverterTo(SI.METER).convert( value ); } } } } } } } /* * No quantitative, linear accuracy were found. If the coordinate operation is actually * a conversion, the accuracy is up to rounding error (i.e. conceptually 0) by definition. |