Revision 229 org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.jcrs.lib/src/main/java/org/gvsig/crs/repository/Iau2000RepositoryGT.java

View differences:

Iau2000RepositoryGT.java
11 11
import org.gvsig.crs.ICrs;
12 12

  
13 13
public class Iau2000RepositoryGT implements ICrsRepository {
14
    private static final Logger LOG =
15
        LoggerFactory.getLogger(Iau2000RepositoryGT.class);
16
    
17
	public ICrs getCrs(String code) {
18
		CrsGT crsGT = null;
19
		try {
20
			CoordinateReferenceSystem crs = CRS.decode("IAU2000:"+code);
21
			crsGT = new CrsGT(crs);
22
		} catch (NoSuchAuthorityCodeException e) {
23
		    LOG.info("Impossible to get the CRS", e);
24
			return null;			
25
		} catch (FactoryException e) {
26
		    LOG.info("Impossible to get the CRS", e);
27
			return null;
28
		}
29
		return crsGT;
30
	}
31 14

  
15
    private static final Logger LOG
16
            = LoggerFactory.getLogger(Iau2000RepositoryGT.class);
17

  
18
    public ICrs getCrs(String code) {
19
        CrsGT crsGT = null;
20
        try {
21
            CoordinateReferenceSystem crs = CRS.decode("IAU2000:" + code);
22
            crsGT = new CrsGT(crs);
23
        } catch (NoSuchAuthorityCodeException e) {
24
            LOG.debug("Can't get the CRS '"+code+"' authority 'IAU2000' in GT repository. No such authority code");
25
            return null;
26
        } catch (FactoryException e) {
27
            LOG.debug("Can't get the CRS '"+code+"' authority 'IAU2000' in GT repository", e);
28
            return null;
29
        }
30
        return crsGT;
31
    }
32

  
32 33
}

Also available in: Unified diff