Revision 5461 org.gvsig.raster/branches/org.gvisg.raster_proyeccion_al_vuelo/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/AbstractRasterDataParameters.java
AbstractRasterDataParameters.java | ||
---|---|---|
50 | 50 |
private static final String FIELD_VISIBLE = "visible"; |
51 | 51 |
private static final String FIELD_REPROJ_OPTION = "selected_option"; |
52 | 52 |
|
53 |
protected IProjection crs = null; |
|
54 |
|
|
55 | 53 |
/** |
56 | 54 |
* @param definition |
57 | 55 |
*/ |
... | ... | |
91 | 89 |
.setMandatory(false) |
92 | 90 |
.setHidden(true); |
93 | 91 |
|
94 |
/*definition.addDynFieldObject(FIELD_CRS)
|
|
95 |
.setDescription("CRS") |
|
96 |
.setMandatory(false)
|
|
97 |
.setHidden(true);*/
|
|
92 |
definition.addDynFieldObject(FIELD_CRS) |
|
93 |
.setDescription("CRS").
|
|
94 |
setType(org.cresques.DataTypes.CRS).
|
|
95 |
setMandatory(false);
|
|
98 | 96 |
} |
99 | 97 |
|
100 | 98 |
public void assignFields(RasterDataParameters par, RasterDataServerExplorer explorer) { |
... | ... | |
104 | 102 |
setAlphaBand(par.getAlphaBand()); |
105 | 103 |
setFrame(par.getFrame()); |
106 | 104 |
setURI(par.getURI()); |
105 |
setSRS(par.getSRS()); |
|
107 | 106 |
} |
108 | 107 |
|
109 | 108 |
/** |
... | ... | |
145 | 144 |
} |
146 | 145 |
|
147 | 146 |
public String getSRSID() { |
148 |
if (crs == null) { |
|
149 |
return null; |
|
150 |
} |
|
151 |
return crs.getAbrev(); |
|
147 |
return getSRS() != null ? getSRS().getAbrev() : null; |
|
152 | 148 |
} |
153 | 149 |
|
154 | 150 |
public void setSRSID(String srsid) { |
155 | 151 |
if (srsid == null) { |
156 |
crs = null;
|
|
152 |
setSRS(null);
|
|
157 | 153 |
} else { |
158 |
crs = CRSFactory.getCRS(srsid);
|
|
154 |
setSRS(CRSFactory.getCRS(srsid));
|
|
159 | 155 |
} |
160 | 156 |
} |
161 | 157 |
|
162 | 158 |
public void setSRS(IProjection srs) { |
163 |
this.crs = srs;
|
|
159 |
this.setDynValue(FIELD_CRS, srs);
|
|
164 | 160 |
} |
165 | 161 |
|
166 | 162 |
public IProjection getSRS() { |
167 |
if (this.getSRSID() == null) { |
|
168 |
return null; |
|
169 |
} |
|
170 |
return crs; |
|
163 |
return (IProjection) this.getDynValue(FIELD_CRS); |
|
171 | 164 |
} |
172 | 165 |
|
173 | 166 |
/** |
Also available in: Unified diff