Revision 10354
trunk/libraries/libjni-ecw/src/com/ermapper/ecw/JNCSFile.java | ||
---|---|---|
205 | 205 |
} |
206 | 206 |
|
207 | 207 |
/** |
208 |
* Crea una vista en un fichero ecw abierto |
|
208 |
* Asigna la vista pasando por par?metros los pixeles de inicio y fin y coordenadas de georreferenciaci?n solicitadas- |
|
209 |
* El cliente de esta funci?n tendr? que convertir las coordenadas reales en pixeles. |
|
210 |
*/ |
|
211 |
public int setView(int nBands, int posBands[], int iniX, int iniY, int endX, int endY, double tlX, double tlY, double brX, double brY, |
|
212 |
int bufW, int bufH)throws JNCSFileNotOpenException, JNCSInvalidSetViewException{ |
|
213 |
int l = ECWSetView(nBands, posBands, iniX, iniY, endX, endY, tlX, tlY, brX, brY, bufW, bufH); |
|
214 |
if(l != 0){ |
|
215 |
String s = JNCSError.getError(l); |
|
216 |
throw new JNCSInvalidSetViewException(s); |
|
217 |
}else{ |
|
218 |
bSetViewIsWorld = true; |
|
219 |
return 0; |
|
220 |
} |
|
221 |
|
|
222 |
} |
|
223 |
|
|
224 |
/** |
|
225 |
* Crea una vista en un fichero ecw abierto. |
|
226 |
* |
|
209 | 227 |
* @param nBands N?mero de bandas en bandList |
210 | 228 |
* @param bandList Array de ?ndices de bandas |
211 | 229 |
* @param width ancho de la vista en pixels |
... | ... | |
222 | 240 |
{ |
223 | 241 |
JNCSDatasetPoint jncsdatasetpoint = convertWorldToDataset(d, d1); |
224 | 242 |
JNCSDatasetPoint jncsdatasetpoint1 = convertWorldToDataset(d2, d3); |
225 |
int l = ECWSetView(i, ai, jncsdatasetpoint.x, jncsdatasetpoint.y, jncsdatasetpoint1.x, jncsdatasetpoint1.y, d, d1, d2, d3, j, k);
|
|
243 |
int l = ECWSetView(i, ai, jncsdatasetpoint.x, jncsdatasetpoint.y, jncsdatasetpoint1.x - 1, jncsdatasetpoint1.y - 1, d, d1, d2, d3, j, k);
|
|
226 | 244 |
if(l != 0) |
227 | 245 |
{ |
228 | 246 |
//String s = ECWGetErrorString(l); |
Also available in: Unified diff