/** * Creates the inverse CoordinateOperation. This method can be used to chain * {@link org.cts.op.CoordinateOperation}s and/or inverse CoordinateOperation in * a unique CoordinateOperationSequence. This method is not declared * abstract, so that implementation classes have not to implement it if they * represent non invertible operation. */ public CoordinateOperation inverse() throws NonInvertibleOperationException { throw new NonInvertibleOperationException(this.toString() + " is non invertible"); }
private void addGeographicTransformation(GeodeticDatum targetDatum, CoordinateOperation coordOp, boolean addInverseOp) { if (geographicTransformations.get(targetDatum) == null) { geographicTransformations.put(targetDatum, new HashSet<CoordinateOperation>()); } else if (geographicTransformations.get(targetDatum).contains(coordOp)) return; geographicTransformations.get(targetDatum).add(coordOp); if (addInverseOp) { try { targetDatum.addGeographicTransformation(this, coordOp.inverse(), false); } catch (NonInvertibleOperationException e) { e.printStackTrace(); } } }
@Override public Projection inverse() throws NonInvertibleOperationException { throw new NonInvertibleOperationException(this.toString() + " is non invertible"); }
return inverse; } catch (Exception e) { throw new NonInvertibleOperationException(e.getMessage());
return inverse; } catch (Exception e) { throw new NonInvertibleOperationException(e.getMessage());