Revision 1933

View differences:

tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/.cvsignore
1
doc
2
Thumbs.db
0 3

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-dvp/org/cresques/io/GrafCanMapServerClient.java
1
/*
2
 * Created on 12-dic-2004
3
 */
4
package org.cresques.io;
5

  
6
import org.cresques.px.Extent;
7

  
8
/**
9
 * Consulta el servidor de mapas de grafcan.
10
 * Implementa una llamada del tipo:
11
 * http://www.dgtcan.com/MapServer/Mapa.asp?
12
 *   XMin=219900&YMax=3151900&XMax=221000&YMin=3151300&
13
 *   Ancho=1000&Alto=1000&NumeroCapas=6&Capas=2&Servicio=NavGRAFCAN2
14
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
15
 */
16
public class GrafCanMapServerClient extends MapServerClient {
17
	public final static int CAPA_ORTOFOTO    = 2;
18
	public final static int CAPA_CARTOGRAFIA = 1;
19
	
20
	private int numeroCapas	= 6;
21
	private int capas		= CAPA_CARTOGRAFIA;
22
	private String servicio = "NavGRAFCAN2";
23
	
24
	public GrafCanMapServerClient(String serverName) {
25
		super(serverName);
26
		urlBase = "http://www.dgtcan.com/MapServer/Mapa.asp";
27
/**/	setExtent(new Extent(180020,3270000,660000,3035000));
28
	}
29
	
30
	public void setCapas(int c) { capas = c; }
31
	
32
	public void setNumeroCapas(int c) { numeroCapas = c; }
33
	
34
	public void setServicio(String s) { servicio = s; }
35
	
36
	public String getUrl() {
37
		String url = urlBase+"?"+
38
			"XMin="+xMin+"&"+ "XMax="+xMax+"&"+
39
			"YMin="+yMin+"&"+ "YMax="+yMax+"&"+
40
			"Ancho="+ancho+"&"+"Alto="+alto+"&"+
41
			"NumeroCapas="+numeroCapas+"&"+"Capas="+capas+"&"+
42
			"Servicio="+servicio;
43
		return url;
44
	}
45
}
0 46

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-dvp/org/cresques/io/BsbFile.java
1
/*
2
 * Created on 25-sep-2004
3
 *
4
 * TODO To change the template for this generated file go to
5
 * Window - Preferences - Java - Code Style - Code Templates
6
 */
7
package org.cresques.io;
8

  
9
import java.awt.Color;
10
import java.awt.Image;
11
import java.awt.geom.Point2D;
12
import java.awt.image.BufferedImage;
13
import java.io.IOException;
14
import java.util.Vector;
15

  
16
import org.cresques.cts.ICoordTrans;
17
import org.cresques.cts.IProjection;
18
import org.cresques.io.GeoFile;
19
import org.cresques.io.GeoRasterFile;
20
import org.cresques.px.Extent;
21

  
22
import es.gva.cit.jbsb.BsbException;
23

  
24
/**
25
 * Soporte 'nativo' para Bsb.
26
 * Este conjunto de funcionalidades est? tomado de manera casi literal
27
 * del soporte para ECW de ermapper.<br>
28
 * Probablemente esto deber?a formar parte del JNI que recubre a la
29
 * librer?a en C extraida de gdal.<br>
30
 * Lo pongo aqu? a manera de ejemplo de como atacar un formato binario
31
 * desde Java.<br><br>   
32
 * @author Luis W. Sevilla.
33
 */
34

  
35
class BsbNative extends es.gva.cit.jbsb.Bsb {
36
	// Polilinea con extent
37
	class Contour extends Vector {
38
		public double minX = Double.MAX_VALUE, minY = Double.MAX_VALUE;
39
		public double maxX = -Double.MAX_VALUE, maxY = -Double.MAX_VALUE;
40
		public Contour() {
41
			super();
42
		}
43
		public void add(Point2D pt) {
44
			super.add(pt);
45
			if (pt.getX() > maxX) maxX = pt.getX();
46
			if (pt.getX() < minX) minX = pt.getX();
47
			if (pt.getY() > maxY) maxY = pt.getY();
48
			if (pt.getY() < minY) minY = pt.getY();
49
		}
50
	}
51
	private int [] paleta = null;
52
	/**
53
	 * Contorno en coordenadas geogr?ficas. (y Extent del raster).
54
	 */
55
	public Contour esq = new Contour();
56
	public int width = 0, height = 0;
57
	public double originX = 0D, originY = 0D;
58
	public String version = "";
59
	
60
	public BsbNative(String fName) throws BsbException {
61
		super();
62
		try {
63
			init(fName);
64
		} catch (IOException e) {
65
			// TODO Auto-generated catch block
66
			e.printStackTrace();
67
		}
68
	}
69
	
70
	private void init(String fName) throws BsbException, IOException {
71
		bsbOpen(fName);
72
		width = g_psInfo.nXSize;
73
		height = g_psInfo.nYSize;
74
		Vector pal = new Vector();
75
		String buf = null;
76
  		for (int i=0; i<g_psInfo.papszHeader.length; i++) {
77
  			buf = g_psInfo.papszHeader[i];
78
	  		if (buf.length()<1) continue;
79
	  		if (buf.startsWith("RGB/")) {
80
	  			String [] dat = buf.split(",");
81
	  			pal.add(new Color(Integer.parseInt(dat[1]),
82
	  				Integer.parseInt(dat[2]),
83
					Integer.parseInt(dat[3])));
84
	  		} else if (buf.startsWith("VER/")) {
85
	  			version = buf.substring(4);
86
	  		} /*else if (buf.startsWith("PLY/")) { // Marco de hoja
87
	  			String [] dat = buf.split(",");
88
	  			esq.add(new Point2D.Double(Double.parseDouble(dat[2]),
89
	  					Double.parseDouble(dat[1])));
90
	  		}*/
91
  		}
92
  		if (true) { //version.startsWith("1")) {
93
  			esq.add(new Point2D.Double(0D,height));
94
  			esq.add(new Point2D.Double(0D,0D));
95
  			esq.add(new Point2D.Double(width,0D));
96
  			esq.add(new Point2D.Double(width,height));
97
  		}
98
  		paleta = new int[pal.size()];
99
  		for (int i=0; i<pal.size(); i++)
100
  			paleta[i] = ((Color) pal.get(i)).getRGB();
101

  
102
  		originX = esq.minX;
103
  		originY = esq.maxY;
104
	}
105
	
106
	double lastReadLine = -1;
107
	int currentViewWidth = -1;
108
	int currentViewHeight = -1;
109
	double currentViewX = 0D;
110
	double viewportScale = 0D;
111
	double step = 0D;
112
	
113
	public Point2D worldToRaster(Point2D pt) {
114
		double x = (((double) width)/(esq.maxX-esq.minX))*(pt.getX()-esq.minX);
115
		double y = (((double) height)/(esq.maxY-esq.minY))*(esq.maxY-pt.getY());
116
		Point2D ptRes = new Point2D.Double(x, y);
117
		return ptRes;
118
	}
119
	
120
	public int setView(double dWorldTLX, double dWorldTLY,
121
            double dWorldBRX, double dWorldBRY,
122
            int nWidth, int nHeight) {
123
		int err = 0;
124
		Point2D tl = worldToRaster(new Point2D.Double(dWorldTLX, dWorldTLY));
125
		Point2D br = worldToRaster(new Point2D.Double(dWorldBRX, dWorldBRY));
126
		// Calcula cual es la primera l?nea a leer;
127
		currentViewWidth = nWidth;
128
		currentViewHeight = nHeight;
129

  
130
		currentViewX = tl.getX();
131
		viewportScale = (double) currentViewWidth/(br.getX()-tl.getX());
132
		step = 1D/viewportScale;
133
		lastReadLine = tl.getY();
134

  
135
		System.out.println("BsbFile: TL=("+dWorldTLX+","+dWorldTLY+
136
			"); BR=("+dWorldBRX+","+dWorldBRY+")\n"+
137
			"BsbFile: escala="+viewportScale+"; lastReadLine="+lastReadLine);
138
		return err;
139
	}
140
	
141
	public int readLineRGBA(int [] line) throws BsbException {
142
		int err = 0;
143
  		bsbReadLine((int) lastReadLine);
144

  
145
  		lastReadLine += step;
146
  		
147
  		byte [] l = g_buffer.pabyScanLineBuf;
148
  		int white = Color.BLUE.getRGB();
149
  		float j =(float) currentViewX;
150
  		for (int i=0; i<currentViewWidth && j<l.length; i++, j+=step) {
151
  			line[i] = paleta[l[(int) j]-1];
152
  		}
153
		//for (int i=0; i<currentViewWidth; i++) line[i] = 128+128*256+128*256*256;
154

  
155
		return err;
156
	}
157

  
158
	void pintaInfo() {
159
  		System.out.println("Fichero BSB: Info ("+g_psInfo.papszHeader.length+" l?neas):");
160
  		for (int i=0; i<g_psInfo.papszHeader.length; i++) {
161
	  		if (g_psInfo.papszHeader[i].length()<1) continue;
162
	  		System.out.println("info["+i+"] = "+g_psInfo.papszHeader[i]);
163
  		}
164
	}
165
	
166
	void pintaPaleta() {
167
  		System.out.println("Fichero BSB: Paleta ("+paleta.length+" colores):");
168
		for (int i=0; i<paleta.length; i++)
169
			System.out.println("color("+i+")="+paleta[i]);
170
	}
171
}
172

  
173
/**
174
 * @author Luis W. Sevilla
175
 */
176
public class BsbFile extends GeoRasterFile {
177
	private BsbNative file = null;
178

  
179
	private Extent v = null;
180
	
181
	
182
	static {
183
		GeoRasterFile.registerExtension("nos", BsbFile.class);
184
		GeoRasterFile.registerExtension("kap", BsbFile.class);
185
	}
186
	public BsbFile(IProjection proj, String fName) {
187
		super(proj, fName);
188
		extent = new Extent();
189
		try {
190
			file = new BsbNative(fName);
191
			showOnOpen();
192
			load();
193
		} catch(BsbException e){
194
		  	System.out.println("Error en BSBOpen");
195
		  	e.printStackTrace();
196
		  	file = null;
197
		}
198
	}
199
	
200
	public GeoFile load() {
201
		/*double minX, minY, maxX, maxY;
202
		minX = minY = 0D;
203
		maxX = (double) width;
204
		maxY = (double) height;*/
205
		extent = new Extent(file.esq.minX, file.esq.minY, file.esq.maxX, file.esq.maxY);
206
		return this;
207
	}
208
	public void setView(Extent e) { v = new Extent(e); }
209
	public Extent getView() { return v; }
210
	
211
	public int getWidth() {	return file.width; }
212
	public int getHeight() { return file.height;}
213

  
214
	/* (non-Javadoc)
215
	 * @see org.cresques.io.GeoRasterFile#reProject(org.cresques.cts.ICoordTrans)
216
	 */
217
	public void reProject(ICoordTrans rp) {
218
		// TODO Auto-generated method stub
219
		
220
	}
221
	/* (non-Javadoc)
222
	 * @see org.cresques.io.GeoRasterFile#setTransparency(boolean)
223
	 */
224
	public void setTransparency(boolean t) {
225
		// TODO Auto-generated method stub
226
	}
227
	public void setTransparency(int t) {
228
		// TODO Auto-generated method stub
229
	}
230
	/* (non-Javadoc)
231
	 * @see org.cresques.io.GeoRasterFile#updateImage(int, int, org.cresques.cts.ICoordTrans)
232
	 */
233
	public Image updateImage(int width, int height, ICoordTrans rp) {
234
		double dFileAspect, dWindowAspect;
235
		int line, pRGBArray[] = null;
236
		Image image = null;
237

  
238
		// Work out the correct aspect for the setView call.
239
		dFileAspect = (double)v.width()/(double)v.height();
240
		dWindowAspect = (double)width /(double)height;
241

  
242
		if (dFileAspect > dWindowAspect) {
243
		  height =(int)((double)width/dFileAspect);
244
		} else {
245
		  width = (int)((double)height*dFileAspect);
246
		}
247
		
248
		// Set the view
249
		file.setView(v.minX(), v.maxY(), v.maxX(), v.minY(),
250
			width, height);
251
		
252
		image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
253
		pRGBArray = new int[width];
254
		try {
255
			for (line=0; line < height; line++) {
256
				file.readLineRGBA(pRGBArray);
257
				((BufferedImage)image).setRGB(0, line, width, 1, pRGBArray, 0, width);
258
			}
259
		} catch (Exception e) {
260
			// TODO Auto-generated catch block
261
			e.printStackTrace();
262
		}
263
		
264
		return image;
265
	}
266
	
267
	public Image updateImage(int width, int height, ICoordTrans rp, Image img, int origBand, int destBand){
268
		
269
		return null;
270
	}
271
	
272
	private void showOnOpen() {
273
  		// Report en la apertura (quitar)
274
  		System.out.println("Fichero BSB '"+getName()+"' abierto.");
275
  		System.out.println("Version = "+file.version);
276
  		System.out.println("   Size = ("+file.width+","+file.height+")");
277
  		file.pintaInfo();
278
  		file.pintaPaleta();
279

  
280
	}
281

  
282
	/* (non-Javadoc)
283
	 * @see org.cresques.io.GeoRasterFile#close()
284
	 */
285
	public void close() {
286
	}
287

  
288
	/* (non-Javadoc)
289
	 * @see org.cresques.io.GeoRasterFile#updateImage(int, int, org.cresques.cts.ICoordTrans, java.awt.Image, int)
290
	 */
291
	public Image updateImage(int width, int height, ICoordTrans rp, Image img, int flags) {
292
		// TODO Auto-generated method stub
293
		return null;
294
	}
295

  
296
	/* (non-Javadoc)
297
	 * @see org.cresques.io.GeoRasterFile#getData(int, int, int)
298
	 */
299
	public Object getData(int x, int y, int band) {
300
		// TODO Auto-generated method stub
301
		return null;
302
	}
303
	
304
	/**
305
	 * Devuelve los datos de una ventana solicitada
306
	 * @param ulX	coordenada X superior izda.
307
	 * @param ulY	coordenada Y superior derecha.
308
	 * @param sizeX	tama?o en X de la ventana.
309
	 * @param sizeY tama?o en Y de la ventana.
310
	 * @param band	Banda solicitada.
311
	 */
312
	public byte[] getWindow(int ulX, int ulY, int sizeX, int sizeY, int band){
313

  
314
		return null;
315
	}
316
	
317
	/**
318
	 * Devuelve el tama?o de bloque
319
	 * @return Tama?o de bloque
320
	 */
321
	public int getBlockSize(){
322
     //TODO Nacho: Implementar getBlockSize de EcwFile
323
	  return 1;
324
	}
325
}
326

  
327

  
0 328

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-dvp/org/cresques/io/GeoRasterWriter.java
1
package org.cresques.io;
2

  
3
import java.io.IOException;
4
import java.util.TreeMap;
5

  
6
import org.cresques.px.PxLayerList;
7
import org.cresques.px.PxRaster;
8

  
9
/**
10
 * @author Nacho Brodin <brodin_ign@gva.es>
11
 * 
12
 * Clase abstracta de la que heredan los drivers de escritura. Tiene los
13
 * m?todos abstractos que debe implementar cualquier driver de escritura
14
 * y las funcionalidades y opciones soportadas comunes a todos ellos.
15
 */
16

  
17
public abstract class GeoRasterWriter{
18
	
19
	protected String 						outfilename=null;
20
	protected String 						infilename=null;
21
	protected int 							sizeWindowX=0;
22
	protected int 							sizeWindowY=0;
23
	protected int 							ulX=0;
24
	protected int 							ulY=0;
25
	protected PxRaster 						currentRaster;
26
	protected IDataWriter					dataWriter=null;
27
	protected int 							nBands=0;
28
	protected String 						ident = null;
29
	protected String						driver = null;
30
	private static TreeMap 					supportedExtensions = null;
31
	
32
	/**
33
	 * Registra un formato de escritura
34
	 * @param ext	Extensi?n del fichero registrado
35
	 * @param clase	Clase que maneja el formato registrado
36
	 */
37
	public static void registerWriterExtension(String ext, Class clase) {
38
		
39
		if(supportedExtensions==null)
40
			supportedExtensions = new TreeMap();
41
		
42
		ext = ext.toLowerCase();
43
		System.out.println("Write RASTER: extension '"+ext+"' supported.");
44
		supportedExtensions.put(ext, clase);
45
		
46
	}
47
	
48
	/**
49
	 * Devuelve el n?mero de drivers soportados
50
	 * @return N?mero de drivers soportados
51
	 */
52
	public static int getNDrivers(){return supportedExtensions.size();}
53
	
54
	/**
55
	 * Devuelve la lista de extensiones de escritura soportadas
56
	 * @return
57
	 */
58
	public static String[] getDriversExtensions(){
59
		
60
		String[] list = new String[GeoRasterWriter.getNDrivers()];
61
		if(GeoRasterWriter.getNDrivers()>0){
62
			list[0] = supportedExtensions.firstKey().toString();
63
			for(int i=1;i<list.length;i++){
64
				list[i] = supportedExtensions.lastKey().toString();
65
			}
66
		}
67
		return list;
68
		
69
	}
70
	
71
	/**
72
	 * Devuelve el identificador del driver
73
	 * @return	Identificador del driver
74
	 */
75
	public String getIdent(){return ident;}
76
	
77
	/**
78
	 * Obtiene el nombre del driver.
79
	 * @return	Nombre del driver
80
	 */
81
	public String getDriverName(){return driver;}
82
	
83
	/**
84
	 * Asigna propiedades al driver a partir de un vector de
85
	 * strings donde cada elemento tiene la estructura de 
86
	 * propiedad=valor.
87
	 * @param props	Propiedades
88
	 */
89
	public abstract void setProps(String[] props);
90
	
91
	/**
92
	 * Realiza la funci?n de compresi?n a partir de un GeoRasterFile.
93
	 * @throws IOException
94
	 */
95
	public abstract void fileWrite()throws IOException;
96
	
97
	/**
98
	 * Realiza la funci?n de compresi?n a partir de los datos pasados por el cliente.
99
	 * @throws IOException
100
	 */
101
	public abstract void dataWrite()throws IOException;
102
	
103
	/**
104
	 * Cierra el driver 
105
	 */
106
	public abstract void writeClose();
107
	
108
	/**
109
	 * Devuelve la configuraci?n de la ventana de dialogo
110
	 * para las propiedades del driver de escritura que se est? tratando.
111
	 * @return Texto XML con las propiedades
112
	 */
113
	public abstract String getXMLPropertiesDialog();
114
	
115
	
116
}
0 117

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-dvp/org/cresques/io/AliaMapServerClient.java
1
/*
2
 * Created on 16-dic-2004
3
 */
4
package org.cresques.io;
5

  
6
import org.cresques.px.Extent;
7

  
8
/**
9
 * Consulta el servidor de mapas de Alia de Sevilla.
10
 * (hecho por tracasa)
11
 * ver http://sevilla.tracasa.es/navegar/?lang=cas
12
 * Implementa una llamada del tipo:
13
 * http://sevilla.tracasa.es/navegar/asp/mime.aspx?
14
 *   TIPO=0&Xmin=225916.666666667&Ymin=4133000&
15
 *   Xmax=254583.333333333&Ymax=4150000&PixAncho=430&PixAlto=255
16
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
17
 */
18
public class AliaMapServerClient extends MapServerClient {
19
	public final static int CAPA_ORTOFOTO_2000  = 0;
20
	public final static int CAPA_ORTOFOTO_7500  = 1;
21
	public final static int CAPA_GUIA_URBANA	= 2;
22
	
23
	public final static String [] nomCapas = {
24
		"Ortofoto 1:2.000 (Noviembre 2.001)",
25
		"Ortofoto 1:7.500 (Enero 1.999)",
26
		"Gu&iacute;a Urbana (Marzo 1.999)"};
27
	
28
	private int capas		= CAPA_ORTOFOTO_2000;
29
	
30
	public AliaMapServerClient(String serverName) {
31
		super(serverName);
32
		urlBase = "http://sevilla.tracasa.es/navegar/asp/mime.aspx";
33
		setExtent(new Extent(225916.67, 4150000.0, 254583.3, 4133000.0));
34
		setMaxViewSize(650,400);
35
	}
36
	
37
	public void setCapas(int c) { capas = c; }
38
	
39
	public String getUrl() {
40
		String url = urlBase+"?"+
41
			"TIPO="+capas+"&"+
42
			"Xmin="+xMin+"&"+ "Ymin="+yMax+"&"+
43
			"Xmax="+xMax+"&"+ "Ymax="+yMin+"&"+
44
			"PixAncho="+ancho+"&"+"PixAlto="+alto;;
45
		return url;
46
	}
47
}
0 48

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/.cdtproject
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse-cdt version="2.0"?>
3

  
4
<cdtproject>
5
<data/>
6
</cdtproject>
0 7

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/util/JNCSDatasetPoint.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSDatasetPoint.java
5

  
6
package com.ermapper.util;
7

  
8

  
9
public class JNCSDatasetPoint
10
{
11

  
12
    public JNCSDatasetPoint()
13
    {
14
        x = 0;
15
        y = 0;
16
    }
17

  
18
    public JNCSDatasetPoint(int i, int j)
19
    {
20
        x = i;
21
        y = j;
22
    }
23

  
24
    public int x;
25
    public int y;
26
}
0 27

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/util/JNCSWorldPoint.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSWorldPoint.java
5

  
6
package com.ermapper.util;
7

  
8

  
9
public class JNCSWorldPoint
10
{
11

  
12
    public JNCSWorldPoint()
13
    {
14
        x = 0.0D;
15
        y = 0.0D;
16
        z = 0.0D;
17
    }
18

  
19
    public JNCSWorldPoint(double d, double d1)
20
    {
21
        x = d;
22
        y = d1;
23
    }
24

  
25
    public JNCSWorldPoint(double d, double d1, double d2)
26
    {
27
        x = d;
28
        y = d1;
29
        z = d2;
30
    }
31

  
32
    public double x;
33
    public double y;
34
    public double z;
35
}
0 36

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/ecw/JNCSFile.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSFile.java
5

  
6
package com.ermapper.ecw;
7

  
8
import com.ermapper.util.JNCSDatasetPoint;
9
import com.ermapper.util.JNCSWorldPoint;
10
import java.io.FileInputStream;
11
import java.io.PrintStream;
12
import java.lang.reflect.Field;
13
import java.lang.reflect.Method;
14
import java.util.Properties;
15

  
16
// Referenced classes of package com.ermapper.ecw:
17
//            JNCSNativeLibraryException, JNCSFileOpenFailedException, JNCSInvalidSetViewException, JNCSException, 
18
//            JNCSFileNotOpenException, JNCSProgressiveUpdate
19

  
20
public class JNCSFile
21
    implements JNCSProgressiveUpdate
22
{
23

  
24
    private native int ECWOpen(String s, boolean flag);
25

  
26
    private native void ECWClose(boolean flag);
27

  
28
    private native int ECWSetView(int i, int ai[], int j, int k, int l, int i1, double d, double d1, double d2, double d3, 
29
            int j1, int k1);
30

  
31
    private native int ECWReadLineRGBA(int ai[]);
32

  
33
    private native int ECWReadImageRGBA(int ai[], int i, int j);
34

  
35
    private native short ECWGetPercentComplete();
36

  
37
    private static native String ECWGetErrorString(int i);
38

  
39
    private static native int NCSJNIInit();
40

  
41
    private static native String ECWGetLibVersion();
42

  
43
    static void initClass()
44
        throws JNCSNativeLibraryException
45
    {
46
        boolean flag = false;
47
        boolean flag1 = false;
48
        if(bHaveClassInit)
49
            return;
50
        if(System.getSecurityManager() != null)
51
        {
52
            Object obj = null;
53
            String s3 = System.getProperty("java.vendor");
54
            if(s3.startsWith("Netscape Communications Corporation"))
55
                try
56
                {
57
                    Class class1 = Class.forName("netscape.security.PrivilegeManager");
58
                    Class aclass[] = {
59
                        java.lang.String.class
60
                    };
61
                    Method method = class1.getMethod("enablePrivilege", aclass);
62
                    Object obj1 = class1.newInstance();
63
                    Object aobj[] = {
64
                        new String("UniversalLinkAccess")
65
                    };
66
                    Object aobj1[] = {
67
                        new String("UniversalPropertyRead")
68
                    };
69
                    method.invoke(obj1, aobj);
70
                    method.invoke(obj1, aobj1);
71
                }
72
                catch(NoSuchMethodException nosuchmethodexception)
73
                {
74
                    System.out.println("GetMethod : ".concat(String.valueOf(String.valueOf(nosuchmethodexception.getMessage()))));
75
                }
76
                catch(ClassNotFoundException classnotfoundexception)
77
                {
78
                    System.out.println("ClassNotFoundException : ".concat(String.valueOf(String.valueOf(classnotfoundexception.getMessage()))));
79
                }
80
                catch(Exception exception4)
81
                {
82
                    System.out.println("Netscape Privilige Manager Access Exception : ".concat(String.valueOf(String.valueOf(exception4.getMessage()))));
83
                }
84
            else
85
            if(s3.startsWith("Microsoft Corp."))
86
                try
87
                {
88
                    Class class2 = Class.forName("com.ms.security.PolicyEngine");
89
                    Class class3 = Class.forName("com.ms.security.PermissionID");
90
                    Field field = class3.getField("SYSTEM");
91
                    Field field1 = class3.getField("FILEIO");
92
                    Class aclass1[] = {
93
                        class3
94
                    };
95
                    Method method1 = class2.getMethod("assertPermission", aclass1);
96
                    Object aobj2[] = {
97
                        field.get(null)
98
                    };
99
                    Object aobj3[] = {
100
                        field1.get(null)
101
                    };
102
                    method1.invoke(null, aobj2);
103
                    method1.invoke(null, aobj3);
104
                }
105
                catch(NoSuchMethodException nosuchmethodexception1)
106
                {
107
                    System.out.println("Microsoft Policy Engine NoSuchMethodException : ".concat(String.valueOf(String.valueOf(nosuchmethodexception1.getMessage()))));
108
                }
109
                catch(SecurityException securityexception2)
110
                {
111
                    System.out.println("Microsoft Policy Engine SecurityException : ".concat(String.valueOf(String.valueOf(securityexception2.getMessage()))));
112
                }
113
                catch(Exception exception5)
114
                {
115
                    System.out.println("Microsoft Policy Engine Exception : ".concat(String.valueOf(String.valueOf(exception5.getMessage()))));
116
                }
117
        } else
118
        {
119
            flag1 = true;
120
        }
121
        try
122
        {
123
            System.loadLibrary("NCSUtil");
124
            System.loadLibrary("NCScnet");
125
            System.loadLibrary("NCSEcw");
126
            bUseNativeMethods = true;
127
            bUnsatisfiedLink = false;
128
        }
129
        catch(UnsatisfiedLinkError unsatisfiedlinkerror)
130
        {
131
            bUseNativeMethods = false;
132
            bUnsatisfiedLink = true;
133
            bUseNativeMethods = false;
134
            debug("Got UnsatisfiedLinkError looking on PATH");
135
        }
136
        catch(SecurityException securityexception)
137
        {
138
            bSecurityError = true;
139
            bUseNativeMethods = false;
140
            bUnsatisfiedLink = false;
141
            debug("Got SecurityException looking on PATH");
142
        }
143
        catch(Exception exception)
144
        {
145
            System.err.println("Unknown error loading ECW native libraries : ".concat(String.valueOf(String.valueOf(exception.getMessage()))));
146
            bUseNativeMethods = false;
147
            debug("Got Exception looking on PATH");
148
        }
149
        if(bUseNativeMethods)
150
            try
151
            {
152
                int i = NCSJNIInit();
153
                if(i != 0)
154
                {
155
                    System.err.println("JNCSFile classes found on PATH failed to initialize correctly. Attempting to locate other NCS dlls....");
156
                } else
157
                {
158
                    bHaveClassInit = true;
159
                    return;
160
                }
161
            }
162
            catch(UnsatisfiedLinkError unsatisfiedlinkerror1)
163
            {
164
                debug("Native ECW libraries have been found on the PATH, but could not be loaded. This may be because the version is insufficient to support the Java classes.\nAt least version 1,5,2,0 is required. Attempting to locate other NCS dlls....");
165
            }
166
            catch(Exception exception1)
167
            {
168
                debug("Unknown exception occured initialising ECW native libraries found on the PATH.".concat(String.valueOf(String.valueOf(exception1.getMessage()))));
169
            }
170
        if(flag1 && !bUseNativeMethods && !bSecurityError && System.getSecurityManager() != null)
171
        {
172
            Properties properties = new Properties();
173
            String s4 = null;
174
            String s5 = null;
175
            try
176
            {
177
                String s6 = System.getProperty("user.home");
178
                s5 = System.getProperty("file.separator");
179
                FileInputStream fileinputstream = new FileInputStream(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(s6)))).append(s5).append("jncsclasses.properties"))));
180
                properties.load(fileinputstream);
181
                s4 = properties.getProperty("clientDLLPath");
182
            }
183
            catch(Exception exception6)
184
            {
185
                s4 = null;
186
            }
187
            try
188
            {
189
                if(s4 != null)
190
                {
191
                    System.load(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(s4)))).append(s5).append("NCSUtil.dll"))));
192
                    System.load(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(s4)))).append(s5).append("NCScnet.dll"))));
193
                    System.load(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(s4)))).append(s5).append("NCSEcw.dll"))));
194
                    bUseNativeMethods = true;
195
                    bUnsatisfiedLink = false;
196
                    bSecurityError = false;
197
                }
198
            }
199
            catch(SecurityException securityexception3)
200
            {
201
                bSecurityError = true;
202
                bUseNativeMethods = false;
203
                bUnsatisfiedLink = false;
204
                debug("Got security exception looking on clientDLLPath");
205
            }
206
            catch(RuntimeException runtimeexception1)
207
            {
208
                System.out.println(runtimeexception1.getMessage());
209
                bUseNativeMethods = false;
210
                bUnsatisfiedLink = true;
211
                debug("Got RuntimeException looking on clientDLLPath");
212
            }
213
            catch(UnsatisfiedLinkError unsatisfiedlinkerror4)
214
            {
215
                bUseNativeMethods = false;
216
                bUnsatisfiedLink = true;
217
                debug("Got UnsatisfiedLinkError looking on clientDLLPath");
218
            }
219
            catch(Exception exception7)
220
            {
221
                System.out.println(exception7.getMessage());
222
                bUseNativeMethods = false;
223
                bUnsatisfiedLink = true;
224
                debug("Got Exception looking on clientDLLPath");
225
            }
226
        }
227
        if(!bUseNativeMethods && !bSecurityError)
228
            try
229
            {
230
                System.load("C:\\Program Files\\Earth Resource Mapping\\Image Web Server\\Client\\NCSUtil.dll");
231
                System.load("C:\\Program Files\\Earth Resource Mapping\\Image Web Server\\Client\\NCScnet.dll");
232
                System.load("C:\\Program Files\\Earth Resource Mapping\\Image Web Server\\Client\\NCSEcw.dll");
233
                bUseNativeMethods = true;
234
                bUnsatisfiedLink = false;
235
                bSecurityError = false;
236
                debug("Loaded ECW libraries in C:\\Program Files\\...");
237
            }
238
            catch(SecurityException securityexception1)
239
            {
240
                bSecurityError = true;
241
                bUseNativeMethods = false;
242
                bUnsatisfiedLink = false;
243
                debug("Got security exception looking on C:\\Program Files\\");
244
            }
245
            catch(RuntimeException runtimeexception)
246
            {
247
                System.out.println(runtimeexception.getMessage());
248
                bUseNativeMethods = false;
249
                bUnsatisfiedLink = true;
250
                debug("Got RuntimeException looking on C:\\Program Files\\");
251
            }
252
            catch(UnsatisfiedLinkError unsatisfiedlinkerror2)
253
            {
254
                bUseNativeMethods = false;
255
                bUnsatisfiedLink = true;
256
                debug("Got UnsatisfiedLinkError looking on C:\\Program Files\\");
257
            }
258
            catch(Exception exception2)
259
            {
260
                System.out.println(exception2.getMessage());
261
                bUseNativeMethods = false;
262
                bUnsatisfiedLink = true;
263
                debug("Got Exception looking on C:\\Program Files\\");
264
            }
265
        if(bUseNativeMethods)
266
            try
267
            {
268
                int j = NCSJNIInit();
269
                if(j != 0)
270
                {
271
                    System.err.println("JNCSFile classes failed to initialize correctly. Unrecoverable error.");
272
                    String s = ECWGetErrorString(j);
273
                    throw new JNCSNativeLibraryException(s);
274
                }
275
                bHaveClassInit = true;
276
            }
277
            catch(UnsatisfiedLinkError unsatisfiedlinkerror3)
278
            {
279
                debug("UnsatisfiedLinkError: ".concat(String.valueOf(String.valueOf(unsatisfiedlinkerror3.getMessage()))));
280
                throw new JNCSNativeLibraryException("Native ECW libraries have been found, but could not be loaded. This may be because the version is insufficient to support the Java classes.\nAt least version 1,5,2,0 is required.");
281
            }
282
            catch(Exception exception3)
283
            {
284
                debug("Exception: ".concat(String.valueOf(String.valueOf(exception3.getMessage()))));
285
                throw new JNCSNativeLibraryException("Unknown exception occured initialising ECW native libraries.".concat(String.valueOf(String.valueOf(exception3.getMessage()))));
286
            }
287
        if(bSecurityError)
288
        {
289
            String s1 = "The security manager has denied loading of native libraries. Only trusted classes and signed JAR files can access native libraries.";
290
            System.out.println(s1);
291
            throw new JNCSNativeLibraryException(s1);
292
        }
293
        if(bUnsatisfiedLink)
294
        {
295
            String s2 = "JNCSFile class failed to resolve some or all of the native ECW libraries.\nCheck that the NCSUtil, NCSCnet, and NCSUtil shared libraries are on the PATH environment variable (Win32),\nor the LD_LIBRARY_PATH (Unix), or that the parameters to the virtual machine specify their location,\nby setting the property : -Djava.library.path=<path_to_ncs_libraries>\nAlternatively, the file jncsclasses.properties in the user's home directory can specify the location.\n\nRefer to the ECW Java SDK documentation for more information on native library search paths.";
296
            throw new JNCSNativeLibraryException(s2);
297
        } else
298
        {
299
            return;
300
        }
301
    }
302

  
303
    public JNCSFile()
304
        throws JNCSException
305
    {
306
        bSetViewIsWorld = false;
307
        progImageClient = null;
308
        initClass();
309
        cellSizeUnits = 0;
310
        bIsOpen = false;
311
    }
312

  
313
    public JNCSFile(String s, boolean flag)
314
        throws JNCSException
315
    {
316
        bSetViewIsWorld = false;
317
        progImageClient = null;
318
        initClass();
319
        open(s, flag);
320
    }
321

  
322
    protected void finalize()
323
        throws Throwable
324
    {
325
        if(bIsOpen)
326
            ECWClose(false);
327
        super.finalize();
328
    }
329

  
330
    public int open(String s, boolean flag)
331
        throws JNCSFileOpenFailedException
332
    {
333
        if(s == null)
334
            throw new IllegalArgumentException();
335
        int i = ECWOpen(s, flag);
336
        if(i != 0)
337
        {
338
            bIsOpen = false;
339
            String s1 = ECWGetErrorString(i);
340
            throw new JNCSFileOpenFailedException(s1);
341
        } else
342
        {
343
            bIsOpen = true;
344
            progressive = flag;
345
            return 0;
346
        }
347
    }
348

  
349
    public void close(boolean flag)
350
    {
351
        ECWClose(flag);
352
        if(!flag);
353
    }
354

  
355
    public void addProgressiveUpdateListener(JNCSProgressiveUpdate jncsprogressiveupdate)
356
    {
357
        progImageClient = jncsprogressiveupdate;
358
    }
359

  
360
    public void refreshUpdate(int i, int j, double d, double d1, double d2, double d3)
361
    {
362
        if(progImageClient != null)
363
            progImageClient.refreshUpdate(i, j, d, d1, d2, d3);
364
    }
365

  
366
    public void refreshUpdate(int i, int j, int k, int l, int i1, int j1)
367
    {
368
        if(progImageClient != null)
369
            progImageClient.refreshUpdate(i, j, k, l, i1, j1);
370
    }
371

  
372
    public int setView(int i, int ai[], int j, int k, int l, int i1, int j1, 
373
            int k1)
374
        throws JNCSFileNotOpenException, JNCSInvalidSetViewException
375
    {
376
        int l1 = ECWSetView(i, ai, j, k, l, i1, 0.0D, 0.0D, 0.0D, 0.0D, j1, k1);
377
        if(l1 != 0)
378
        {
379
            String s = ECWGetErrorString(l1);
380
            throw new JNCSInvalidSetViewException(s);
381
        } else
382
        {
383
            bSetViewIsWorld = false;
384
            return 0;
385
        }
386
    }
387

  
388
    public int setView(int i, int ai[], double d, double d1, double d2, double d3, int j, int k)
389
        throws JNCSFileNotOpenException, JNCSInvalidSetViewException
390
    {
391
        JNCSDatasetPoint jncsdatasetpoint = convertWorldToDataset(d, d1);
392
        JNCSDatasetPoint jncsdatasetpoint1 = convertWorldToDataset(d2, d3);
393
        int l = ECWSetView(i, ai, jncsdatasetpoint.x, jncsdatasetpoint.y, jncsdatasetpoint1.x, jncsdatasetpoint1.y, d, d1, d2, d3, j, k);
394
        if(l != 0)
395
        {
396
            String s = ECWGetErrorString(l);
397
            throw new JNCSInvalidSetViewException(s);
398
        } else
399
        {
400
            bSetViewIsWorld = true;
401
            return 0;
402
        }
403
    }
404

  
405
    public int readLineRGBA(int ai[])
406
        throws JNCSException
407
    {
408
        int i = ECWReadLineRGBA(ai);
409
        if(i != 0)
410
        {
411
            String s = ECWGetErrorString(i);
412
            throw new JNCSException(s);
413
        } else
414
        {
415
            return 0;
416
        }
417
    }
418

  
419
    public int readLineBGRA(int ai[])
420
        throws JNCSException
421
    {
422
        throw new JNCSException("Not Yet Implemented!");
423
    }
424

  
425
    public int readLineBIL(int ai[])
426
        throws JNCSException
427
    {
428
        throw new JNCSException("Not Yet Implemented!");
429
    }
430

  
431
    public int readLineBIL(double ad[])
432
        throws JNCSException
433
    {
434
        throw new JNCSException("Not Yet Implemented!");
435
    }
436

  
437
    public int readImageRGBA(int ai[], int i, int j)
438
        throws JNCSException
439
    {
440
        int k = ECWReadImageRGBA(ai, i, j);
441
        if(k != 0)
442
        {
443
            String s = ECWGetErrorString(k);
444
            throw new JNCSException(s);
445
        } else
446
        {
447
            return 0;
448
        }
449
    }
450

  
451
    public String getLastErrorText(int i)
452
    {
453
        return ECWGetErrorString(i);
454
    }
455

  
456
    public JNCSDatasetPoint convertWorldToDataset(double d, double d1)
457
        throws JNCSFileNotOpenException
458
    {
459
        int i;
460
        int j;
461
        if(bIsOpen)
462
        {
463
            i = (int)Math.round((d - originX) / cellIncrementX);
464
            j = (int)Math.round((d1 - originY) / cellIncrementY);
465
        } else
466
        {
467
            throw new JNCSFileNotOpenException();
468
        }
469
        return new JNCSDatasetPoint(i, j);
470
    }
471

  
472
    public JNCSWorldPoint convertDatasetToWorld(int i, int j)
473
        throws JNCSFileNotOpenException
474
    {
475
        double d;
476
        double d1;
477
        if(bIsOpen)
478
        {
479
            d = originX + (double)i * cellIncrementX;
480
            d1 = originY + (double)j * cellIncrementY;
481
        } else
482
        {
483
            throw new JNCSFileNotOpenException();
484
        }
485
        return new JNCSWorldPoint(d, d1);
486
    }
487

  
488
    public short getPercentComplete()
489
    {
490
        return ECWGetPercentComplete();
491
    }
492

  
493
    public static String getLibVersion()
494
    {
495
        return ECWGetLibVersion();
496
    }
497

  
498
    private static void debug(String s)
499
    {
500
        if(debug)
501
            System.out.println(s);
502
    }
503

  
504
    private static boolean bUseNativeMethods = false;
505
    private static boolean bSecurityError = false;
506
    private static boolean bUnsatisfiedLink = false;
507
    static boolean bHaveClassInit = false;
508
    static boolean debug = false;
509
    public static final int ECW_CELL_UNITS_INVALID = 0;
510
    public static final int ECW_CELL_UNITS_METERS = 1;
511
    public static final int ECW_CELL_UNITS_DEGREES = 2;
512
    public static final int ECW_CELL_UNITS_FEET = 3;
513
    public int numBands;
514
    public int width;
515
    public int height;
516
    public double originX;
517
    public double originY;
518
    public double cellIncrementX;
519
    public double cellIncrementY;
520
    public int cellSizeUnits;
521
    public double compressionRate;
522
    public boolean progressive;
523
    public String fileName;
524
    public String datum;
525
    public String projection;
526
    public boolean bIsOpen;
527
    private long nativeDataPointer;
528
    private static final boolean doGarbageCollectionOnClose = false;
529
    private static final int ECW_OK = 0;
530
    private int nFileSetViewDatasetTLX;
531
    private int nFileSetViewDatasetTLY;
532
    private int nFileSetViewDatasetBRX;
533
    private int nFileSetViewDatasetBRY;
534
    private int nFileSetViewWidth;
535
    private int nFileSetViewHeight;
536
    private double dFileSetViewWorldTLX;
537
    private double dFileSetViewWorldTLY;
538
    private double dFileSetViewWorldBRX;
539
    private double dFileSetViewWorldBRY;
540
    private boolean bSetViewIsWorld;
541
    protected JNCSProgressiveUpdate progImageClient;
542

  
543
}
0 544

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/ecw/JNCSReadLineException.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSReadLineException.java
5

  
6
package com.ermapper.ecw;
7

  
8

  
9
// Referenced classes of package com.ermapper.ecw:
10
//            JNCSException
11

  
12
public class JNCSReadLineException extends JNCSException
13
{
14

  
15
    public JNCSReadLineException()
16
    {
17
    }
18
}
0 19

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/ecw/JNCSNativeLibraryException.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSNativeLibraryException.java
5

  
6
package com.ermapper.ecw;
7

  
8

  
9
// Referenced classes of package com.ermapper.ecw:
10
//            JNCSException
11

  
12
public class JNCSNativeLibraryException extends JNCSException
13
{
14

  
15
    public JNCSNativeLibraryException()
16
    {
17
    }
18

  
19
    public JNCSNativeLibraryException(String s)
20
    {
21
        super(s);
22
    }
23
}
0 24

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-ermapper/com/ermapper/ecw/JNCSProgressiveUpdate.java
1
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2
// Jad home page: http://www.kpdus.com/jad.html
3
// Decompiler options: packimports(3) 
4
// Source File Name:   JNCSProgressiveUpdate.java
5

  
6
package com.ermapper.ecw;
7

  
8

  
9
public interface JNCSProgressiveUpdate
10
{
11

  
12
    public abstract void refreshUpdate(int i, int j, double d, double d1, double d2, double d3);
13

  
14
    public abstract void refreshUpdate(int i, int j, int k, int l, int i1, int j1);
15
}
0 16

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/ant.xml
1
<project name="CMS for Java" default="dist" basedir=".">
2
    <description>
3
        Genera el jar con CMS y sus dependencias
4
    </description>
5
  <!-- set global properties for this build -->
6
  <property name="src" location="src"/>
7
  <property name="build" location="bin"/>
8
  <property name="dist"  location="dist"/>
9
  <property name="jar" value="cms"/>
10
  <!--property name="fmapdir" value="../FMAP"/-->
11
  <property name="targetDir1" location="../FMAP/lib"/>
12
  <property name="targetDir" location="../FMap 03/lib"/>
13
  <property name="targetDir2" location="."/>
14

  
15
  <target name="init">
16
    <!-- Create the time stamp -->
17
    <tstamp/>
18
    <!-- Create the build directory structure used by compile -->
19
    <mkdir dir="${build}"/>
20
  </target>
21

  
22
  <target name="compile" depends="init"
23
        description="compile the source " >
24
    <!-- Compile the java code from ${src} into ${build} 
25
    <javac srcdir="${src}" destdir="${build}"/>-->
26
  </target>
27

  
28
  <target name="dist" depends="compile"
29
        description="generate the distribution" >
30
    <!-- Create the distribution directory -->
31
    <mkdir dir="${dist}"/>
32

  
33
    <!-- Put everything in ${build} into the cms-${DSTAMP}.jar file --> 
34
    <jar jarfile="${dist}/${jar}.jar" basedir="${build}"/>
35
    <jar jarfile="${dist}/${jar}.jar" basedir="." includes = "images/*.gif" update="true" />
36
    <copy todir="${dist}">
37
    	<fileset dir="./lib" includes="*.jar"/>
38
    </copy>
39
    <copy todir="${targetDir1}/">
40
    	<fileset dir="${dist}" includes="**/**"/>
41
    </copy>
42
    <copy todir="${targetDir2}/">
43
    	<fileset dir="${dist}" includes="${jar}.jar"/>
44
    </copy>
45
    <move todir="${targetDir}/">
46
    	<fileset dir="${dist}" includes="**/**"/>
47
    </move>
48
  </target>
49

  
50
  <target name="clean"
51
        description="clean up" >
52
    <!-- Delete the ${build} and ${dist} directory trees -->
53
    <delete dir="${build}"/>
54
    <delete dir="${dist}"/>
55
  </target>
56
</project>
57

  
0 58

  
tags/Root_CqCMSGisPlanet/libraries/libCq CMS for java.old/src-test/org/cresques/io/raster/PruebaStackManager.java
1
package org.cresques.io.raster;
2

  
3
public class PruebaStackManager extends RasterFilterStackManager{
4
	
5
	public final static int		prueba = 4;
6
	
7
	public PruebaStackManager(RasterFilterStack filterStack){
8
		super(filterStack);
9
		addTypeFilter("prueba", PruebaStackManager.prueba, 3);
10
	}
11
	 
12
	/**
13
	 * Filtro de pruebas. 
14
	 */
15
	public void addPruebaFilter(){
16
		RasterFilter filtro = null;
17
		switch(filterStack.getDataTypeInFilter(PruebaStackManager.prueba)){
18
			case RasterBuf.TYPE_IMAGE:filtro = new PruebaImageFilter();break;
19
			case RasterBuf.TYPE_SHORT:
20
			case RasterBuf.TYPE_USHORT:
21
			case RasterBuf.TYPE_INT:filtro = new PruebaShortFilter();break;
22
		}
23
		filterStack.addFilter(PruebaStackManager.prueba, filtro);
24
		super.controlTypes();
25
	}
26
	
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff