/** * Add the id to the cache, by mapping it to all its identifiers. * * @param <V> * type of CRSIdentifiable * @param resource * to insert into cache * @param update * if true an existing identifiable in the cache will be overwritten. * @return the identifiable */ public synchronized <V extends CRSResource> V addIdToCache( V resource, boolean update ) { return addIdToCache( cachedIdentifiables, resource, update ); }
addIdToCache( cachedCRSXY, result, false ); if ( result.getType() == COMPOUND ) { addIdToCache( cachedCRSXY, ( (ICompoundCRS) result ).getUnderlyingCRS(), false ); if ( ( (ICompoundCRS) result ).getUnderlyingCRS().getType() == PROJECTED ) { ICRS underlying = resolve( ( (ICompoundCRS) result ).getUnderlyingCRS() ); addIdToCache( cachedCRSXY, ( (ProjectedCRS) underlying ).getGeographicCRS(), false ); addIdToCache( ( (IProjectedCRS) result ).getGeographicCRS(), false ); addIdToCache( result, false ); if ( result.getType() == COMPOUND ) { addIdToCache( ( (ICompoundCRS) result ).getUnderlyingCRS(), false ); if ( ( (ICompoundCRS) result ).getUnderlyingCRS().getType() == PROJECTED ) { ICRS underlying = resolve( ( (ICompoundCRS) result ).getUnderlyingCRS() ); addIdToCache( ( (ProjectedCRS) underlying ).getGeographicCRS(), false ); addIdToCache( ( (IProjectedCRS) result ).getGeographicCRS(), false );