private static void registerAndInit( CRSStore crss, String id, boolean prefer ) throws CRSStoreException { if ( id != null ) { if ( idToCRSStore.containsKey( id ) ) { throw new CRSStoreException( Messages.getMessage( "CRSManager.DUPLICATE_ID", id ) ); } LOG.info( "Registering global crs store with id '" + id + "', type: '" + crss.getClass().getName() + "'" ); idToTransF.put( id, new TransformationFactory( crss ) ); idToCRSStore.put( id, crss ); if ( prefer ) { storeIds.add( 0, id ); } else { storeIds.add( id ); } crss.init(); } }