Revision 818 org.gvsig.sis.proj/trunk/org.gvsig.sis.proj/org.gvsig.sis.proj.catalog.impl/src/main/java/org/gvsig/sis/proj/catalog/SisCRSCatalogManager.java

View differences:

SisCRSCatalogManager.java
102 102
			// FIXME: authoritynotfoundexception;
103 103
			throw new CoordinateReferenceSystemNotFoundException(code, e);
104 104
		}
105
		return new DefaultCRSDefinition(crs);
105
		return new DefaultCRS(crs);
106 106
	}
107 107
	
108 108
	public CRSDefinition getCRSDefinition(CoordinateReferenceSystem crs) throws CoordinateReferenceSystemNotFoundException {
109
		return new DefaultCRSDefinition(crs);
109
		return new DefaultCRS(crs);
110 110
	}
111 111

  
112 112
	@Override
......
121 121
			// FIXME: authoritynotfoundexception;
122 122
			throw new CoordinateReferenceSystemNotFoundException(wkt, e);
123 123
		}
124
		return new DefaultCRSDefinition(crs);
124
		return new DefaultCRS(crs);
125 125
	}
126 126

  
127 127
	@Override
128 128
	public CRSDefinition getCompoundCRS(CRSDefinition... crsList) throws IncompatibleDefinitionException {
129
		DefaultCRSDefinition[] defs = (DefaultCRSDefinition[]) crsList;
129
		DefaultCRS[] defs = (DefaultCRS[]) crsList;
130 130
		ArrayList<CoordinateReferenceSystem> components = new ArrayList<CoordinateReferenceSystem>();
131 131
		for (CRSDefinition def: defs) {
132
			if (def instanceof DefaultCRSDefinition) {
133
				components.add(((DefaultCRSDefinition)def).getInternalCRS());	
132
			if (def instanceof DefaultCRS) {
133
				components.add(((DefaultCRS)def).getInternalCRS());	
134 134
			}
135 135
			else {
136 136
				throw new IncompatibleDefinitionException();
......
140 140
		CoordinateReferenceSystem compoundCRS;
141 141
		try {
142 142
			compoundCRS = CRS.compound(components.toArray(new CoordinateReferenceSystem[components.size()]));
143
			return new DefaultCRSDefinition(compoundCRS);
143
			return new DefaultCRS(compoundCRS);
144 144
		} catch (FactoryException e) {
145 145
			// FIXME: which kind of exception
146 146
			throw new IncompatibleDefinitionException(e);
......
203 203
	public List<TransformationDefinition> getCoordinateTransformations(CRSDefinition source, CRSDefinition target) throws CRSCatalogException {
204 204
		ArrayList<TransformationDefinition> transforms = new ArrayList<TransformationDefinition>();
205 205
		try {
206
			CoordinateReferenceSystem sourceCRS = ((DefaultCRSDefinition)source).getInternalCRS();
207
			CoordinateReferenceSystem targetCRS = ((DefaultCRSDefinition)target).getInternalCRS();
208
			DefaultTransformationDefinition def = new DefaultTransformationDefinition(CRS.findOperation(sourceCRS, targetCRS, null));
206
			CoordinateReferenceSystem sourceCRS = ((DefaultCRS)source).getInternalCRS();
207
			CoordinateReferenceSystem targetCRS = ((DefaultCRS)target).getInternalCRS();
208
			DefaultTransformation def = new DefaultTransformation(CRS.findOperation(sourceCRS, targetCRS, null));
209 209
			transforms.add(def);
210 210
		} catch (NoSuchAuthorityCodeException e) {
211 211
			// TODO Auto-generated catch block
......
225 225
		try {
226 226
			CoordinateReferenceSystem sourceCRS = CRS.forCode(source);
227 227
			CoordinateReferenceSystem targetCRS = CRS.forCode(target);
228
			DefaultTransformationDefinition def = new DefaultTransformationDefinition(CRS.findOperation(sourceCRS, targetCRS, null));
228
			DefaultTransformation def = new DefaultTransformation(CRS.findOperation(sourceCRS, targetCRS, null));
229 229
			transforms.add(def);
230 230
		} catch (NoSuchAuthorityCodeException e) {
231 231
			// TODO Auto-generated catch block

Also available in: Unified diff