/** * Get a {@link Transformation} with given id, or <code>null</code> if it does not exist. * * @param crsStore * {@link CRSStore} instance, looking for the {@link Transformation}, may not be <code>null</code> * @param id * of the {@link Transformation} * @return the identified {@link Transformation} or <code>null<code> if no transformation is found. * @throws IllegalArgumentException * if crsStore is null */ private synchronized static Transformation getTransformation( CRSStore crsStore, String id ) { if ( crsStore == null ) { throw new IllegalArgumentException( Messages.get( "CRSManager.STORE_NULL" ) ); } CRSResource t = null; try { t = crsStore.getDirectTransformation( id ); } catch ( Throwable e ) { LOG.debug( "Could not retrieve a transformation for id: " + id ); } if ( t != null ) { return (Transformation) t; } LOG.debug( "The given id: " + id + " is not of type transformation return null." ); return null; }
Transformation result = provider.getDirectTransformation( sourceCRS, targetCRS ); if ( result != null ) { String implName = result.getImplementationName();