CoordinateReferenceSystem pointCRS = position.getCoordinateReferenceSystem();
DirectPosition copy = new DirectPositionImpl(position);
if ((myCRS != null) && (pointCRS != null) && (!myCRS.equals(pointCRS))) {
// Do the conversion.
try {
BasicFactories commonFactory = BasicFactories.getDefault();
CoordinateOperationFactory cof = commonFactory.getCoordinateOperationFactory();
CoordinateOperation coordOp = cof.createOperation(pointCRS, myCRS);
MathTransform mt = coordOp.getMathTransform();
mt.transform(position, copy);
}
catch (OperationNotFoundException e) {