Revision 1431

View differences:

trunk/libraries/libjni-ecwcompress/include/es_gva_cit_jecwcompress_NCSEcwCompressClient.h
18 18
/*
19 19
 * Class:     es_gva_cit_jecwcompress_NCSEcwCompressClient
20 20
 * Method:    NCSEcwCompressOpenNat
21
 * Signature: (JZ)V
21
 * Signature: (JZ)I
22 22
 */
23
JNIEXPORT void JNICALL Java_es_gva_cit_jecwcompress_NCSEcwCompressClient_NCSEcwCompressOpenNat
23
JNIEXPORT jint JNICALL Java_es_gva_cit_jecwcompress_NCSEcwCompressClient_NCSEcwCompressOpenNat
24 24
  (JNIEnv *, jobject, jlong, jboolean);
25 25

  
26 26
#ifdef __cplusplus
trunk/libraries/libjni-ecwcompress/src-test/TifToEcw.java
5 5
	public static void main(String[] args){
6 6
 
7 7
	  Gdal migdal=new Gdal();
8
	  NCSEcwCompressClient client;
8 9
	  
9 10
	  try{
10 11
	    if(args.length>0)
......
20 21
	  int nysize=0;
21 22
	  int rastercount=0;
22 23
	  String rasterband; 
23
	  GeoTransform gt;	  
24
	  GeoTransform gt=null;	  
24 25
	  
25 26
	  try{
26 27
	  	rastercount=migdal.getRasterCount();
......
45 46
			//...........
46 47
	  }
47 48
	  
48

  
49
	  try{
50
	  	client = new NCSEcwCompressClient();
51
	  	
52
	  	client.setOutputFilename(args[1]);  	
53
	  	client.setInputFilename(args[0]);
54
	    client.setTargetCompress(Double.parseDouble(args[2]));
55
	    client.setInOutSizeX(nxsize);
56
	    client.setInOutSizeY(nysize);
57
	    client.setInputBands(rastercount);
58
	    
59
		if(rastercount == 1) {
60
			client.setCompressFormat(CompressFormat.COMPRESS_UINT8);
61
		}
62
		else if(rastercount == 3) {
63
			client.setCompressFormat(CompressFormat.COMPRESS_RGB);
64
		}
65
		else {
66
			client.setCompressFormat(CompressFormat.COMPRESS_MULTI);
67
		}
68
		
69
		client.setCellIncrementX(gt.adfgeotransform[1]);
70
		client.setCellIncrementY(gt.adfgeotransform[5]);
71
		client.setOriginX(gt.adfgeotransform[0]);
72
		client.setOriginY(gt.adfgeotransform[3]);
73
		client.setCellSizeUnits(1);
74
		
75
	  	
76
	  }catch(EcwException e){
77
		e.printStackTrace();
78
		//...........
79
	  }
49 80
	  /*for(int iBand=0;iBand<rastercount;iBand++){
50 81
	  	
51 82
	  	int tipo=0;
trunk/libraries/libjni-ecwcompress/src/ncsecwcompressclient_wrapper.c
52 52
//								NCSEcwCompressOpen
53 53
/******************************************************************************/
54 54

  
55
JNIEXPORT void JNICALL Java_es_gva_cit_jecwcompress_NCSEcwCompressClient_NCSEcwCompressOpenNat
55
JNIEXPORT jint JNICALL Java_es_gva_cit_jecwcompress_NCSEcwCompressClient_NCSEcwCompressOpenNat
56 56
  (JNIEnv *env, jobject obj, jlong cPtr, jboolean bCalculateSizesOnly){
57 57
  	
58
  	
59
  }
58
  	NCSEcwCompressClient 	*pClient = (NCSEcwCompressClient *) 0 ;
59
  	NCSError 				eError;
60
  	jfieldID 				fid;
61
    jobject					obj_str;
62
    const char				*str;
63
    double d;
64
  	pClient = *(NCSEcwCompressClient **)&cPtr;
65
  	if(pClient!=NULL){
66
  		
67
  		//Asignamos los valores de los campos de NCSEcwCompress
68
  		
69
  		jclass clase = (*env)->GetObjectClass(env, obj);
70
  		  		
71
  		fid = (*env)->GetFieldID(env, clase, "inputFilename", "Ljava/lang/String;");
72
  		obj_str = (*env)->GetObjectField(env, obj, fid);
73
  		if(obj_str!=NULL){
74
			str = (*env)->GetStringUTFChars(env,obj_str,0);
75
	  		strcpy(pClient->szInputFilename,str);
76
	  		str=NULL;
77
	  		(*env)->ReleaseStringUTFChars(env, obj_str, str);
78
	  		printf("%s\n",pClient->szInputFilename);
79
  		}
80
  		
81
  		fid = (*env)->GetFieldID(env, clase, "outputFilename", "Ljava/lang/String;");
82
  		obj_str = (*env)->GetObjectField(env, obj, fid);
83
  		if(obj_str!=NULL){
84
			str = (*env)->GetStringUTFChars(env,obj_str,0);
85
	  		strcpy(pClient->szOutputFilename,str);
86
	  		str=NULL;
87
	  		(*env)->ReleaseStringUTFChars(env, obj_str, str);
88
	  		printf("%s\n",pClient->szOutputFilename);
89
  		}
90
  		  		
91
  		fid = (*env)->GetFieldID(env, clase, "targetCompression", "D");
92
  		pClient->fTargetCompression = (*env)->GetDoubleField(env, obj, fid);
93
  		printf("%f\n",pClient->fTargetCompression);
94
  		
95
  		fid = (*env)->GetFieldID(env, clase, "eCompressFormat", "I");
96
  		pClient->eCompressFormat = (*env)->GetIntField(env, obj, fid);
97
  		printf("%d\n",pClient->eCompressFormat);
98
  		  		
99
  		fid = (*env)->GetFieldID(env, clase, "eCompressHint", "I");
100
  		pClient->eCompressHint = (*env)->GetIntField(env, obj, fid);
101
  		printf("%d\n",pClient->eCompressHint);
102
  		
103
  		fid = (*env)->GetFieldID(env, clase, "nBlockSizeX", "I");
104
  		pClient->nBlockSizeX = (*env)->GetIntField(env, obj, fid);
105
  		printf("%d\n",pClient->nBlockSizeX);
106
  		
107
  		fid = (*env)->GetFieldID(env, clase, "nBlockSizeY", "I");
108
  		pClient->nBlockSizeY = (*env)->GetIntField(env, obj, fid);
109
  		printf("%d\n",pClient->nBlockSizeY);
110
  		
111
  		fid = (*env)->GetFieldID(env, clase, "nInOutSizeX", "I");
112
  		pClient->nInOutSizeX = (*env)->GetIntField(env, obj, fid);
113
  		printf("%d\n",pClient->nInOutSizeX);
114
  		
115
  		fid = (*env)->GetFieldID(env, clase, "nInOutSizeY", "I");
116
  		pClient->nInOutSizeY = (*env)->GetIntField(env, obj, fid);
117
  		printf("%d\n",pClient->nInOutSizeY);
118
  		
119
  		fid = (*env)->GetFieldID(env, clase, "nInputBands", "I");
120
  		pClient->nInputBands = (*env)->GetIntField(env, obj, fid);
121
  		printf("%d\n",pClient->nInputBands);
122
  		
123
  		fid = (*env)->GetFieldID(env, clase, "nOutputBands", "I");
124
  		pClient->nOutputBands = (*env)->GetIntField(env, obj, fid);
125
		printf("%d\n",pClient->nOutputBands);
126
		
127
  		fid = (*env)->GetFieldID(env, clase, "nInputSize", "J");
128
  		pClient->nInputSize = (*env)->GetLongField(env, obj, fid);
129
  		printf("%ld\n",pClient->nInputSize);
130
  		
131
  		fid = (*env)->GetFieldID(env, clase, "fCellIncrementX", "D");
132
  		pClient->fCellIncrementX = (*env)->GetDoubleField(env, obj, fid);
133
  		printf("%f\n",pClient->fCellIncrementX);
134
  		
135
  		fid = (*env)->GetFieldID(env, clase, "fCellIncrementY", "D");
136
  		pClient->fCellIncrementY = (*env)->GetDoubleField(env, obj, fid);
137
  		printf("%f\n",pClient->fCellIncrementY);
138
  		
139
  		fid = (*env)->GetFieldID(env, clase, "fOriginX", "D");
140
  		pClient->fOriginX = (*env)->GetDoubleField(env, obj, fid);
141
  		printf("%f\n",pClient->fOriginX);
142
  		
143
  		fid = (*env)->GetFieldID(env, clase, "fOriginY", "D");
144
  		pClient->fOriginY = (*env)->GetDoubleField(env, obj, fid);
145
  		printf("%f\n",pClient->fOriginY);
146
  		
147
  		fid = (*env)->GetFieldID(env, clase, "eCellSizeUnits", "I");
148
  		pClient->fActualCompression = (IEEE4)(*env)->GetIntField(env, obj, fid);
149
  		printf("%d\n",pClient->fActualCompression);
150
  		
151
  		fid = (*env)->GetFieldID(env, clase, "szDatum", "Ljava/lang/String;");
152
  		obj_str = (*env)->GetObjectField(env, obj, fid);
153
  		if(obj_str!=NULL){
154
			str = (*env)->GetStringUTFChars(env,obj_str,0);
155
	  		strcpy(pClient->szDatum,str);
156
	  		str=NULL;
157
	  		(*env)->ReleaseStringUTFChars(env, obj_str, str);
158
	  		printf("* %s\n",pClient->szDatum);
159
  		}
160
  		
161
  		fid = (*env)->GetFieldID(env, clase, "szProjection", "Ljava/lang/String;");
162
  		obj_str = (*env)->GetObjectField(env, obj, fid);
163
  		if(obj_str!=NULL){
164
			str = (*env)->GetStringUTFChars(env,obj_str,0);
165
	  		strcpy(pClient->szProjection,str);
166
	  		str=NULL;
167
	  		(*env)->ReleaseStringUTFChars(env, obj_str, str);
168
	  		printf("%s\n",pClient->szProjection);
169
  		}
170
  		
171
  		fid = (*env)->GetFieldID(env, clase, "fActualCompression", "D");
172
  		pClient->fActualCompression = (IEEE4)(*env)->GetDoubleField(env, obj, fid);
173
  		printf("%f\n",pClient->fActualCompression);
174
  		
175
  		fid = (*env)->GetFieldID(env, clase, "fCompressionSeconds", "D");
176
  		pClient->fCompressionSeconds = (*env)->GetDoubleField(env, obj, fid);
177
  		printf("%f\n",pClient->fCompressionSeconds);
178
  		
179
  		fid = (*env)->GetFieldID(env, clase, "fCompressionMBSec", "D");
180
  		pClient->fCompressionMBSec = (*env)->GetDoubleField(env, obj, fid);
181
  		printf("%f\n",pClient->fCompressionMBSec);
182
  		
183
  		fid = (*env)->GetFieldID(env, clase, "nOutputSize", "J");
184
  		pClient->nOutputSize = (*env)->GetLongField(env, obj, fid);
185
  		printf("%ld\n",pClient->nOutputSize);
186
  		  		
187
	  	eError = NCSEcwCompressOpen(pClient, ((bCalculateSizesOnly==0)? FALSE : TRUE));
188
	  	
189
		return eError;
190
		
191
  	}
192
  	return -1;
193
  }
194
  
195
  
196
  
trunk/libraries/libjni-ecwcompress/src/es/gva/cit/jecwcompress/CompressHint.java
35 35

  
36 36
public class CompressHint{
37 37
	
38
	public final int COMPRESS_HINT_NONE		= 0;
39
	public final int COMPRESS_HINT_FAST		= 1;
40
	public final int COMPRESS_HINT_BEST		= 2;
41
	public final int COMPRESS_HINT_INTERNET	= 3;
38
	public final static int COMPRESS_HINT_NONE		= 0;
39
	public final static int COMPRESS_HINT_FAST		= 1;
40
	public final static int COMPRESS_HINT_BEST		= 2;
41
	public final static int COMPRESS_HINT_INTERNET	= 3;
42 42
	 
43 43
}
trunk/libraries/libjni-ecwcompress/src/es/gva/cit/jecwcompress/CompressFormat.java
35 35

  
36 36
public class CompressFormat{
37 37
	
38
	 public final String COMPRESS_NONE    	= "NCSCS_NONE";
39
	 public final String COMPRESS_UINT8		= "NCSCS_GREYSCALE";
40
	 public final String COMPRESS_YUV		= "NCSCS_YUV";
41
	 public final String COMPRESS_MULTI		= "NCSCS_MULTIBAND";
42
	 public final String COMPRESS_RGB		= "NCSCS_sRGB";
38
	 public static final int COMPRESS_NONE    	= 0;
39
	 public static final int COMPRESS_UINT8		= 1;
40
	 public static final int COMPRESS_YUV		= 2;
41
	 public static final int COMPRESS_MULTI		= 3;
42
	 public static final int COMPRESS_RGB		= 4;
43 43
	 	
44 44
}
trunk/libraries/libjni-ecwcompress/src/es/gva/cit/jecwcompress/CellSizeUnits.java
35 35

  
36 36
public class CellSizeUnits{
37 37
	
38
	private final int ECW_CELL_UNITS_INVALID	=	0;
39
	private final int ECW_CELL_UNITS_METERS		=	1;
40
	private final int ECW_CELL_UNITS_DEGREES	=	2;
41
	private final int ECW_CELL_UNITS_FEET		=	3;
42
	private final int ECW_CELL_UNITS_UNKNOWN	=	4;
38
	private final static int ECW_CELL_UNITS_INVALID	=	0;
39
	private final static int ECW_CELL_UNITS_METERS		=	1;
40
	private final static int ECW_CELL_UNITS_DEGREES	=	2;
41
	private final static int ECW_CELL_UNITS_FEET		=	3;
42
	private final static int ECW_CELL_UNITS_UNKNOWN	=	4;
43 43
	
44 44
}
trunk/libraries/libjni-ecwcompress/src/es/gva/cit/jecwcompress/NCSEcwCompressClient.java
36 36
public class NCSEcwCompressClient extends JNIBase{
37 37

  
38 38
	private native long NCSEcwCompressClientNat();
39
	private native void NCSEcwCompressOpenNat(long cPtr, boolean bCalculateSizesOnly);
39
	private native int NCSEcwCompressOpenNat(long cPtr, boolean bCalculateSizesOnly);
40 40
	
41
	private String				inputFilename;			
42
	private	String 				outputFilename;	
43
	private double 				targetCompression;
44
	private String				eCompressFormat;
45
	private int					eCompressHint;
46
	private int					nBlockSizeX;
47
	private int					nBlockSizeY;
48
	private int					nInOutSizeX;
49
	private int					nInOutSizeY;
50
	private int					nInputBands;
51
	private int					nOutputBands;
52
	private long				nInputSize;
53
	private double				fCellIncrementX;
54
	private double				fCellIncrementY;
55
	private double				fOriginX;
56
	private double				fOriginY;
57
	private int					eCellSizeUnits;
58
	private String 				szDatum;
59
	private String 				szProjection;
60
	private double				fActualCompression;	
61
	private double				fCompressionSeconds;
62
	private double				fCompressionMBSec;
63
	private long				nOutputSize;
41
	private String				inputFilename=null;			
42
	private	String 				outputFilename=null;	
43
	private double 				targetCompression=0.0;
44
	private int					eCompressFormat=0;
45
	private int					eCompressHint=0;
46
	private int					nBlockSizeX=0;
47
	private int					nBlockSizeY=0;
48
	private int					nInOutSizeX=0;
49
	private int					nInOutSizeY=0;
50
	private int					nInputBands=0;
51
	private int					nOutputBands=0;
52
	private long				nInputSize=0;
53
	private double				fCellIncrementX=0.0;
54
	private double				fCellIncrementY=0.0;
55
	private double				fOriginX=0.0;
56
	private double				fOriginY=0.0;
57
	private int					eCellSizeUnits=0;
58
	private String 				szDatum=null;
59
	private String 				szProjection=null;
60
	private double				fActualCompression=0.0;	
61
	private double				fCompressionSeconds=0.0;
62
	private double				fCompressionMBSec=0.0;
63
	private long				nOutputSize=0;
64 64
	
65 65
	private byte[]				buffer;
66 66
	
......
78 78
	
79 79
	public NCSEcwCompressClient()throws EcwException{
80 80
		
81
		long cPtr = NCSEcwCompressClientNat();
81
		cPtr = NCSEcwCompressClientNat();
82 82
		
83 83
		if(cPtr<=0)
84 84
	    	throw new EcwException("Error en la creaci?n del objeto NCSEcwCompressClient");
......
93 93
		if(cPtr <= 0)
94 94
			throw new EcwException("Error en NCSEcwCompressOpen(). No hay una referencia v?lida al objeto NCSEcwCompressClient.");
95 95
		
96
		NCSEcwCompressOpenNat(cPtr, bCalculateSizesOnly);
96
		int error = NCSEcwCompressOpenNat(cPtr, bCalculateSizesOnly);
97
		
98
		if(error == -1)
99
			throw new EcwException("Error en NCSEcwCompressOpen(). No se ha podido obtener un objeto NCSEcwCompress valido");
100
		else if(error != 0)
101
			throw new EcwException("Error en NCSEcwCompressOpen(). La llamada nativa ha devuelto un error "+NCSError.ErrorToString(error));
97 102
		    	
98 103
	}
99 104
	
......
109 114
	 * COMPRESS_RGB		= NCSCS_sRGB
110 115
	 */
111 116
	
112
	public void setCompressFormat(String format){eCompressFormat=format;};
117
	public void setCompressFormat(int format){eCompressFormat=format;};
113 118
	
114 119
	/**
115 120
	 * COMPRESS_HINT_NONE	= 0,
......
119 124
	 */
120 125
	
121 126
	public void setCompressHint(int hint){eCompressHint=hint;};
122
	public void setNBlockSizeX(int n){nBlockSizeX=n;};
123
	public void setNBlockSizeY(int n){nBlockSizeY=n;};
124
	public void setNInOutSizeX(int n){nInOutSizeX=n;};
125
	public void setNInOutSizeY(int n){nInOutSizeY=n;};
126
	public void setNInputBands(int n){nInputBands=n;};
127
	public void setNOutputBands(int n){nOutputBands=n;};
128
	public void setNInputSize(long nis){nInputSize=nis;};
127
	public void setBlockSizeX(int n){nBlockSizeX=n;};
128
	public void setBlockSizeY(int n){nBlockSizeY=n;};
129
	public void setInOutSizeX(int n){nInOutSizeX=n;};
130
	public void setInOutSizeY(int n){nInOutSizeY=n;};
131
	public void setInputBands(int n){nInputBands=n;};
132
	public void setOutputBands(int n){nOutputBands=n;};
133
	public void setInputSize(long nis){nInputSize=nis;};
129 134
	public void setCellIncrementX(double x){fCellIncrementX=x;};
130 135
	public void setCellIncrementY(double y){fCellIncrementY=y;};
131 136
	public void setOriginX(double x){fOriginX=x;};
......
145 150
	public void setActualCompression(double comp){fActualCompression=comp;};
146 151
	public void setCompressionSeconds(double comp){fCompressionSeconds=comp;};
147 152
	public void setCompressionMBSec(double comp){fCompressionMBSec=comp;};
148
	public void setNOutputSize(long n){nOutputSize=n;};
153
	public void setOutputSize(long n){nOutputSize=n;};
149 154
}
trunk/libraries/libjni-ecwcompress/src/es/gva/cit/jecwcompress/NCSError.java
1
/**********************************************************************
2
 * $Id$
3
 *
4
 * Name:     NCSError.java
5
 * Project:  
6
 * Purpose:  
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/*Copyright (C) 2004  Nacho Brodin <brodin_ign@gva.es>
11

  
12
 This program is free software; you can redistribute it and/or
13
 modify it under the terms of the GNU General Public License
14
 as published by the Free Software Foundation; either version 2
15
 of the License, or (at your option) any later version.
16

  
17
 This program is distributed in the hope that it will be useful,
18
 but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 GNU General Public License for more details.
21

  
22
 You should have received a copy of the GNU General Public License
23
 along with this program; if not, write to the Free Software
24
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
 */
26

  
27

  
28
/**
29
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
30
 * @version 0.0
31
 * @link http://www.gvsig.gva.es
32
 */
33

  
34
package es.gva.cit.jecwcompress;
35

  
36
public class NCSError{
37
	
38
	public static String ErrorToString(int error){
39
	
40
		switch(error){
41
			case 0: return new String("NCS_SUCCESS");
42
			case 1: return new String("NCS_QUEUE_NODE_CREATE_FAILED");			/**< Queue node creation failed */
43
			case 2: return new String("NCS_FILE_OPEN_FAILED");					/**< File open failed */
44
			case 3: return new String("NCS_FILE_LIMIT_REACHED");					/**< The Image Web Server's licensed file limit has been reached */
45
			case 4: return new String("NCS_FILE_SIZE_LIMIT_REACHED");			/**< The requested file is larger than is permitted by the license on this Image Web Server */
46
			case 5: return new String("NCS_FILE_NO_MEMORY");						/**< Not enough memory for new file */
47
			case 6: return new String("NCS_CLIENT_LIMIT_REACHED");				/**< The Image Web Server's licensed client limit has been reached */
48
			case 7: return new String("NCS_DUPLICATE_OPEN");						/**< Detected duplicate open from net layer */
49
			case 8: return new String("NCS_PACKET_REQUEST_NYI");					/**< Packet request type not yet implemented */
50
			case 9: return new String("NCS_PACKET_TYPE_ILLEGAL");				/**< Packet type is illegal */
51
			case 10: return new String("NCS_DESTROY_CLIENT_DANGLING_REQUESTS");	/**< Client closed while requests outstanding */
52
			case 11: return new String("NCS_UNKNOWN_CLIENT_UID");					/**< Client UID unknown */
53
			case 12: return new String("NCS_COULDNT_CREATE_CLIENT");				/**< Could not create new client */
54
			case 13: return new String("NCS_NET_COULDNT_RESOLVE_HOST");			/**< Could not resolve address of Image Web Server */
55
			case 14: return new String("NCS_NET_COULDNT_CONNECT");				/**< Could not connect to host */
56
			case 15: return new String("NCS_NET_RECV_TIMEOUT");					/**< Receive timeout */
57
			case 16: return new String("NCS_NET_HEADER_SEND_FAILURE");			/**< Error sending header */
58
			case 17: return new String("NCS_NET_HEADER_RECV_FAILURE");			/**< Error receiving header */
59
			case 18: return new String("NCS_NET_PACKET_SEND_FAILURE");			/**< Error sending packet */
60
			case 19: return new String("NCS_NET_PACKET_RECV_FAILURE");			/**< Error receiving packet */
61
			case 20: return new String("NCS_NET_401_UNAUTHORISED");				/**< 401 Unauthorised: SDK doesn't do authentication so this suggests a misconfigured server */			
62
			case 21: return new String("NCS_NET_403_FORBIDDEN");					/**< 403 Forbidden: could be a 403.9 from IIS or PWS meaning that the maximum simultaneous request limit has been reached */
63
			case 22: return new String("NCS_NET_404_NOT_FOUND");					/**< 404 Not Found: this error suggests that the server hasn't got Image Web Server installed */
64
			case 23: return new String("NCS_NET_407_PROXYAUTH");					/**< 407 Proxy Authentication: the SDK doesn't do proxy authentication yet either, so this also suggests misconfiguration */
65
			case 24: return new String("NCS_NET_UNEXPECTED_RESPONSE");			/**< Unexpected HTTP response could not be handled */
66
			case 25: return new String("NCS_NET_BAD_RESPONSE");					/**< HTTP response received outside specification */
67
			case 26: return new String("NCS_NET_ALREADY_CONNECTED");				/**< Already connected */
68
			case 27: return new String("NCS_INVALID_CONNECTION");					/**< Connection is invalid */
69
			case 28: return new String("NCS_WINSOCK_FAILURE");					/**< A Windows sockets failure occurred */
70
			case 29: return new String("NCS_SYMBOL_ERROR");			/**< Symbology error */
71
			case 30: return new String("NCS_OPEN_DB_ERROR");			/**< Could not open database */
72
			case 31: return new String("NCS_DB_QUERY_FAILED");		/**< Could not execute the requested query on database */
73
			case 32: return new String("NCS_DB_SQL_ERROR");			/**< SQL statement could not be executed */
74
			case 33: return new String("NCS_GET_LAYER_FAILED");		/**< Open symbol layer failed */
75
			case 34: return new String("NCS_DB_NOT_OPEN");			/**< The database is not open */
76
			case 35: return new String("NCS_QT_TYPE_UNSUPPORTED");	/**< This type of quadtree is not supported */
77
			case 36: return new String("NCS_PREF_INVALID_USER_KEY");		/**< Invalid local user key name specified */
78
			case 37: return new String("NCS_PREF_INVALID_MACHINE_KEY");	/**< Invalid local machine key name specified */
79
			case 38: return new String("NCS_REGKEY_OPENEX_FAILED");		/**< Failed to open registry key */
80
			case 39: return new String("NCS_REGQUERY_VALUE_FAILED");		/**< Registry query failed */
81
			case 40: return new String("NCS_INVALID_REG_TYPE");			/**< Type mismatch in registry variable */
82
			case 41: return new String("NCS_INVALID_ARGUMENTS");		/**< Invalid arguments passed to function */
83
			case 42: return new String("NCS_ECW_ERROR");				/**< ECW error */
84
			case 43: return new String("NCS_SERVER_ERROR");			/**< Server error */
85
			case 44: return new String("NCS_UNKNOWN_ERROR");			/**< Unknown error */
86
			case 45: return new String("NCS_EXTENT_ERROR");			/**< Extent conversion failed */
87
			case 46: return new String("NCS_COULDNT_ALLOC_MEMORY");	/**< Could not allocate enough memory */
88
			case 47: return new String("NCS_INVALID_PARAMETER");		/**< An invalid parameter was used */
89
			case 48: return new String("NCS_FILEIO_ERROR");						/**< Error reading or writing file */
90
			case 49: return new String("NCS_COULDNT_OPEN_COMPRESSION");			/**< Compression task could not be initialised */
91
			case 50: return new String("NCS_COULDNT_PERFORM_COMPRESSION");		/**< Compression task could not be processed */
92
			case 51: return new String("NCS_GENERATED_TOO_MANY_OUTPUT_LINES");	/**< Trying to generate too many output lines */
93
			case 52: return new String("NCS_USER_CANCELLED_COMPRESSION");			/**< Compression task was cancelled by client application */
94
			case 53: return new String("NCS_COULDNT_READ_INPUT_LINE");			/**< Could not read line from input data */
95
			case 54: return new String("NCS_INPUT_SIZE_EXCEEDED");				/**< Input image size was exceeded for this version of the SDK */
96
			case 55: return new String("NCS_REGION_OUTSIDE_FILE");	/**< Specified image region is outside image extents */
97
			case 56: return new String("NCS_NO_SUPERSAMPLE");			/**< Supersampling is not supported by the SDK functions */
98
			case 57: return new String("NCS_ZERO_SIZE");				/**< Specified image region has a zero width or height */
99
			case 58: return new String("NCS_TOO_MANY_BANDS");			/**< More bands specified than exist in the input file */
100
			case 59: return new String("NCS_INVALID_BAND_NR");		/**< An invalid band number has been specified */
101
			case 60: return new String("NCS_INPUT_SIZE_TOO_SMALL");	/**< Input image size is too small to compress - for ECW compression there is a minimum output file size */
102
			case 61: return new String("NCS_INCOMPATIBLE_PROTOCOL_VERSION");	/**< The ECWP client version is incompatible with this server */
103
			case 62: return new String("NCS_WININET_FAILURE");				/**< Windows Internet Client error */
104
			case 63: return new String("NCS_COULDNT_LOAD_WININET");			/**< wininet.dll could not be loaded - usually indicates Internet Explorer should be upgraded */
105
			case 64: return new String("NCS_FILE_INVALID_SETVIEW");			/**< The parameters specified for setting a file view were invalid, or the view was not set */
106
			case 65: return new String("NCS_FILE_NOT_OPEN");					/**< No file is open */
107
			case 66: return new String("NCS_JNI_REFRESH_NOT_IMPLEMENTED");	/**< Class does not implement ECWProgressiveDisplay interface */
108
			case 67: return new String("NCS_INCOMPATIBLE_COORDINATE_SYSTEMS");	/**< Incompatible coordinate systems */
109
			case 68: return new String("NCS_INCOMPATIBLE_COORDINATE_DATUM");		/**< Incompatible coordinate datum types */
110
			case 69: return new String("NCS_INCOMPATIBLE_COORDINATE_PROJECTION");	/**< Incompatible coordinate projection types */
111
			case 70: return new String("NCS_INCOMPATIBLE_COORDINATE_UNITS");		/**< Incompatible coordinate units types */
112
			case 71: return new String("NCS_COORDINATE_CANNOT_BE_TRANSFORMED");	/**< Non-linear coordinate systems not supported */
113
			case 72: return new String("NCS_GDT_ERROR");							/**< Error involving the GDT database */
114
			case 73: return new String("NCS_NET_PACKET_RECV_ZERO_LENGTH");	/**< Zero length packet received */
115
			case 74: return new String("NCS_UNSUPPORTEDLANGUAGE");			/**< Must use Japanese version of the ECW SDK */
116
			case 75: return new String("NCS_CONNECTION_LOST");				/**< Connection to server was lost */
117
			case 76: return new String("NCS_COORD_CONVERT_ERROR");			/**< NCSGDT coordinate conversion failed */
118
			case 77: return new String("NCS_METABASE_OPEN_FAILED");			/**< Failed to open metabase */
119
			case 78: return new String("NCS_METABASE_GET_FAILED");			/**< Failed to get value from metabase */
120
			case 79: return new String("NCS_NET_HEADER_SEND_TIMEOUT");		/**< Timeout sending header */
121
			case 80: return new String("NCS_JNI_ERROR");						/**< Java JNI error */
122
			case 81: return new String("NCS_DB_INVALID_NAME");				/**< No data source passed */
123
			case 82: return new String("NCS_SYMBOL_COULDNT_RESOLVE_HOST");	/**< Could not resolve address of Image Web Server Symbol Server Extension */
124
			case 83: return new String("NCS_INVALID_ERROR_ENUM");			/**< The value of an NCSError error number was invalid! */
125
			case 84: return new String("NCS_FILE_EOF");						/**< End of file reached */
126
			case 85: return new String("NCS_FILE_NOT_FOUND");				/**< File not found */
127
			case 86: return new String("NCS_FILE_INVALID");					/**< File was invalid or corrupt */
128
			case 87: return new String("NCS_FILE_SEEK_ERROR");				/**< Attempted to read, write or seek past file limits */
129
			case 88: return new String("NCS_FILE_NO_PERMISSIONS");			/**< Permissions not available to access file */
130
			case 89: return new String("NCS_FILE_OPEN_ERROR");				/**< Error opengin file */
131
			case 90: return new String("NCS_FILE_CLOSE_ERROR");				/**< Error closing file */
132
			case 91: return new String("NCS_FILE_IO_ERROR");					/**< Miscellaneous error involving file input or output */
133
			case 92: return new String("NCS_SET_EXTENTS_ERROR");				/**< Illegal or invalid world coordinates supplied */
134
			case 93: return new String("NCS_FILE_PROJECTION_MISMATCH");		/**< Image projection does not match that of the controlling layer */
135
			case 94: return new String("NCS_GDT_UNKNOWN_PROJECTION");		/**< Unknown map projection */
136
			case 95: return new String("NCS_GDT_UNKNOWN_DATUM");				/**< Unknown geodetic datum */
137
			case 96: return new String("NCS_GDT_USER_SERVER_FAILED");		/**< User specified Geographic Projection Database data server failed */
138
			case 97: return new String("NCS_GDT_REMOTE_PATH_DISABLED");		/**< Remote Geographic Projection Database file downloading has been disabled and no local GDT data is available */
139
			case 98: return new String("NCS_GDT_BAD_TRANSFORM_MODE");		/**< Invalid mode of transform */
140
			case 99: return new String("NCS_GDT_TRANSFORM_OUT_OF_BOUNDS");	/**< Coordinate to be transformed is out of bounds */
141
			case 100: return new String("NCS_LAYER_DUPLICATE_LAYER_NAME");	/**< A layer already exists with the specified name */
142
			case 101: return new String("NCS_LAYER_INVALID_PARAMETER");		/**< The specified layer does not contain the specified parameter */
143
			case 102: return new String("NCS_PIPE_CREATE_FAILED");			/**< Failed to create pipe */
144
			case 103: return new String("NCS_FILE_MKDIR_EXISTS");				/**< Directory to be created already exists */ /*[20]*/
145
			case 104: return new String("NCS_FILE_MKDIR_PATH_NOT_FOUND");		/**< The path specified for directory creation does not exist */ /*[20]*/
146
			case 105: return new String("NCS_ECW_READ_CANCELLED");			/**< File read was cancelled */
147
			case 106: return new String("NCS_JP2_GEODATA_READ_ERROR");		/**< Error reading geodata from a JPEG 2000 file */ /*[21]*/
148
			case 107: return new String("NCS_JP2_GEODATA_WRITE_ERROR");    	/**< Error writing geodata to a JPEG 2000 file */	/*[21]*/
149
			case 108: return new String("NCS_JP2_GEODATA_NOT_GEOREFERENCED"); /**< JPEG 2000 file not georeferenced */			/*[21]*/
150
			case 109: return new String("NCS_MAX_ERROR_NUMBER");				/**< The maximum error value in this enumerated typ*/
151
		}
152
		return new String("");
153
	}
154
}
0 155

  

Also available in: Unified diff