Revision 35215
tags/v2_0_0_Build_2026/libjni-ecw/CMakeLists.txt | ||
---|---|---|
1 |
project(jecw) |
|
2 |
|
|
3 |
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) |
|
4 |
|
|
5 |
IF(WIN32) |
|
6 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR) |
|
7 |
ELSE(WIN32) |
|
8 |
IF(APPLE) |
|
9 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) |
|
10 |
ELSE(APPLE) |
|
11 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR) |
|
12 |
ENDIF(APPLE) |
|
13 |
ENDIF(WIN32) |
|
14 |
|
|
15 |
if(COMMAND cmake_policy) |
|
16 |
# Works around warnings libraries linked against that don't |
|
17 |
# have absolute paths (e.g. -lpthreads) |
|
18 |
cmake_policy(SET CMP0003 NEW) |
|
19 |
|
|
20 |
# Works around warnings about escaped quotes in ADD_DEFINITIONS |
|
21 |
# statements. |
|
22 |
cmake_policy(SET CMP0005 NEW) |
|
23 |
|
|
24 |
# cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names |
|
25 |
# quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below." |
|
26 |
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) |
|
27 |
cmake_policy(SET CMP0008 OLD) |
|
28 |
endif() |
|
29 |
endif() |
|
30 |
|
|
31 |
SET(JECW_VERSION_MAJOR "2") |
|
32 |
SET(JECW_VERSION_MINOR "0") |
|
33 |
SET(JECW_VERSION_PATCH "0") |
|
34 |
|
|
35 |
SET(VERSION "${JECW_VERSION_MAJOR}.${JECW_VERSION_MINOR}.${JECW_VERSION_PATCH}") |
|
36 |
|
|
37 |
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../build/CMakeModules;${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") |
|
38 |
|
|
39 |
IF(UNIX OR APPLE) |
|
40 |
SET(CMAKE_C_FLAGS "-DLINUX -DPOSIX") |
|
41 |
ENDIF() |
|
42 |
|
|
43 |
FIND_PACKAGE(DepMan REQUIRED) |
|
44 |
INCLUDE(GeneralMacros) |
|
45 |
|
|
46 |
CONFIGURE_DEFAULTS() |
|
47 |
|
|
48 |
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
|
49 |
SET(CMAKE_INSTALL_PREFIX |
|
50 |
${DEPMAN_PATH} CACHE PATH "depman path install prefix" FORCE |
|
51 |
) |
|
52 |
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
|
53 |
|
|
54 |
FIND_PACKAGE(JNI REQUIRED) |
|
55 |
FIND_PACKAGE(ECW REQUIRED) |
|
56 |
|
|
57 |
ADD_SUBDIRECTORY(src/main/native) |
|
58 |
|
|
59 |
CONFIGURE_END() |
|
60 |
|
tags/v2_0_0_Build_2026/libjni-ecw/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="src" path="src/main/java"/> |
|
4 |
<classpathentry kind="src" path="src/main/resources"/> |
|
5 |
<classpathentry kind="src" path="src/test/java"/> |
|
6 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
7 |
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> |
|
8 |
<classpathentry kind="output" path="bin"/> |
|
9 |
</classpath> |
tags/v2_0_0_Build_2026/libjni-ecw/depman.xml | ||
---|---|---|
1 |
<depman> |
|
2 |
<package> |
|
3 |
<group>org.gvsig</group> |
|
4 |
<artifact>org.gvsig.jecw</artifact> |
|
5 |
<version>2.0.0-SNAPSHOT</version> |
|
6 |
<libraryType>dynamic</libraryType> |
|
7 |
</package> |
|
8 |
<dependencies platform="win,mac,linux"> |
|
9 |
<dependency> |
|
10 |
<group>com.ermapper</group> |
|
11 |
<artifact>ecw</artifact> |
|
12 |
<version>3.3.20070509</version> |
|
13 |
<type>dynamic</type> |
|
14 |
</dependency> |
|
15 |
</dependencies> |
|
16 |
</depman> |
|
17 |
|
tags/v2_0_0_Build_2026/libjni-ecw/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>libjni-ecw</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
16 |
</natures> |
|
17 |
</projectDescription> |
tags/v2_0_0_Build_2026/libjni-ecw/src/test/java/com/ermapper/ecw/TestReadEcw.java | ||
---|---|---|
1 |
package com.ermapper.ecw; |
|
2 |
|
|
3 |
import junit.framework.TestCase; |
|
4 |
|
|
5 |
public class TestReadEcw extends TestCase{ |
|
6 |
|
|
7 |
private JNCSFile file = null; |
|
8 |
|
|
9 |
private String fileName = "miniraster30x30.jp2"; |
|
10 |
private String baseDir = "./test-images/"; |
|
11 |
private String file1 = baseDir + fileName; |
|
12 |
|
|
13 |
private int numBands = 0; |
|
14 |
private int width = 0; |
|
15 |
private int height = 0; |
|
16 |
private String projection = null; |
|
17 |
|
|
18 |
|
|
19 |
public void start(){ |
|
20 |
setUp(); |
|
21 |
testStack(); |
|
22 |
} |
|
23 |
|
|
24 |
public void setUp(){ |
|
25 |
try { |
|
26 |
System.out.println("***** TEST DE ACCESO A ECW *****"); |
|
27 |
System.out.println(" IMAGEN: " + fileName + "\n"); |
|
28 |
file = new JNCSFile(); |
|
29 |
file.open(file1, true); |
|
30 |
System.out.println("Acedo a algunos datos de la imagen: "); |
|
31 |
numBands = file.numBands; |
|
32 |
height = file.height; |
|
33 |
width = file.width; |
|
34 |
projection = file.projection; |
|
35 |
System.out.println("Número de bandas: " + numBands); |
|
36 |
System.out.println("Alto: " + height); |
|
37 |
System.out.println("Ancho: " + width); |
|
38 |
System.out.println("Proyección: " + projection); |
|
39 |
|
|
40 |
} catch (JNCSException e) { |
|
41 |
e.printStackTrace(); |
|
42 |
} |
|
43 |
} |
|
44 |
|
|
45 |
public void testStack(){ |
|
46 |
|
|
47 |
} |
|
48 |
|
|
49 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/test/java/com/ermapper/ecw/TestCompressImage.java | ||
---|---|---|
1 |
package com.ermapper.ecw; |
|
2 |
|
|
3 |
import junit.framework.TestCase; |
|
4 |
import es.gva.cit.jecwcompress.CompressFormat; |
|
5 |
import es.gva.cit.jecwcompress.EcwException; |
|
6 |
import es.gva.cit.jecwcompress.JniObject; |
|
7 |
import es.gva.cit.jecwcompress.NCSEcwCompressClient; |
|
8 |
import es.gva.cit.jecwcompress.ReadCallBack; |
|
9 |
|
|
10 |
public class TestCompressImage extends TestCase{ |
|
11 |
|
|
12 |
private JNCSFile file = null; |
|
13 |
|
|
14 |
private String fileName = "miniraster30x30.jp2"; |
|
15 |
private String outFileName = "compressTestOutput.jp2"; |
|
16 |
private String baseDir = "./test-images/"; |
|
17 |
private String file1 = baseDir + fileName; |
|
18 |
private String outFile = baseDir + outFileName; |
|
19 |
|
|
20 |
private NCSEcwCompressClient client = null; |
|
21 |
private Read lectura=null; |
|
22 |
|
|
23 |
private int numBands = 0; |
|
24 |
private int xSize = 0; |
|
25 |
private int ySize = 0; |
|
26 |
|
|
27 |
|
|
28 |
public void start(){ |
|
29 |
setUp(); |
|
30 |
testStack(); |
|
31 |
} |
|
32 |
|
|
33 |
public void setUp(){ |
|
34 |
try { |
|
35 |
file = new JNCSFile(); |
|
36 |
file.open(file1, true); |
|
37 |
numBands = file.numBands; |
|
38 |
xSize = file.width; |
|
39 |
ySize = file.height; |
|
40 |
} catch (JNCSException e) { |
|
41 |
} |
|
42 |
|
|
43 |
|
|
44 |
try{ |
|
45 |
client = new NCSEcwCompressClient(); |
|
46 |
|
|
47 |
client.setOutputFilename(outFile); |
|
48 |
client.setInputFilename(file1); |
|
49 |
client.setTargetCompress(10.0); |
|
50 |
client.setInOutSizeX(xSize); |
|
51 |
client.setInOutSizeY(ySize); |
|
52 |
client.setInputBands(numBands); |
|
53 |
|
|
54 |
client.setCompressFormat(CompressFormat.COMPRESS_NONE); |
|
55 |
|
|
56 |
client.setProjection("WGS84"); |
|
57 |
client.setCellIncrementX(file.cellIncrementX); |
|
58 |
client.setCellIncrementY(file.cellIncrementY); |
|
59 |
client.setOriginX(file.originX); |
|
60 |
client.setOriginY(file.originY); |
|
61 |
client.setCellSizeUnits(1); |
|
62 |
|
|
63 |
lectura = new Read(file, client, 0, ySize, xSize, ySize); |
|
64 |
client.NCSEcwCompressOpen(false); |
|
65 |
client.NCSEcwCompress(lectura); |
|
66 |
client.NCSEcwCompressClose(); |
|
67 |
|
|
68 |
}catch(EcwException e){ |
|
69 |
assertNotNull(client); |
|
70 |
} |
|
71 |
|
|
72 |
} |
|
73 |
|
|
74 |
public void testStack(){ |
|
75 |
|
|
76 |
} |
|
77 |
} |
|
78 |
|
|
79 |
/** |
|
80 |
* |
|
81 |
* Para la lectura hay que hacer una clase que extienda de JniObject e implemente ReadCallBack |
|
82 |
* . Esto obliga a crear un m?todo loadBuffer. En el hay que meter la funcionalidad para que |
|
83 |
* llene el buffer. El buffer esta en la clase cliente y tendr? una longitud de |
|
84 |
* ancho de una l?nea * n?mero de bandas |
|
85 |
*/ |
|
86 |
|
|
87 |
class Read extends JniObject implements ReadCallBack { |
|
88 |
|
|
89 |
private JNCSFile miecw=null; |
|
90 |
private NCSEcwCompressClient client=null; |
|
91 |
private int width, height; |
|
92 |
private int ulX, ulY; |
|
93 |
private int[] readBandsFromECW = null; |
|
94 |
private int[] inputRow = null; |
|
95 |
|
|
96 |
public Read(JNCSFile ecw, NCSEcwCompressClient client,int ulx, int uly, int width, int height){ |
|
97 |
this.miecw = ecw; |
|
98 |
this.client = client; |
|
99 |
this.width = width; |
|
100 |
this.height = height; |
|
101 |
this.ulX = ulx; |
|
102 |
this.ulY = uly; |
|
103 |
readBandsFromECW = new int[Math.max(miecw.numBands, 3)]; |
|
104 |
inputRow = new int[miecw.width]; |
|
105 |
} |
|
106 |
|
|
107 |
public void loadBuffer(){ |
|
108 |
try { |
|
109 |
readBandsFromECW = new int[]{0, 1, 2}; |
|
110 |
miecw.setView(miecw.numBands, readBandsFromECW, miecw.originX, miecw.originY + (miecw.cellIncrementY * nNextLine), |
|
111 |
miecw.originX + (miecw.cellIncrementX * miecw.width), |
|
112 |
miecw.originY + (miecw.cellIncrementY * (nNextLine + 1)), |
|
113 |
miecw.width, 1); |
|
114 |
|
|
115 |
miecw.readLineRGBA(inputRow); |
|
116 |
for(int col=0 ; col<inputRow.length ; col++){ |
|
117 |
client.buffer[col+(width*0)]=(byte)Math.abs(((inputRow[col] & 0x00ff0000) >> 16)); |
|
118 |
client.buffer[col+(width*1)]=(byte)Math.abs(((inputRow[col] & 0x0000ff00) >> 8)); |
|
119 |
client.buffer[col+(width*2)]=(byte)Math.abs((inputRow[col] & 0x000000ff)); |
|
120 |
} |
|
121 |
} catch (JNCSFileNotOpenException e) { |
|
122 |
} catch (JNCSInvalidSetViewException e) { |
|
123 |
} catch (JNCSException e) { |
|
124 |
} |
|
125 |
} |
|
126 |
|
|
127 |
public void updatePercent(){ |
|
128 |
System.out.println(client.getPercent()+"%"); |
|
129 |
} |
|
130 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/CompressHint.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: CompressHint.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: CompressHint.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
package es.gva.cit.jecwcompress; |
|
52 |
|
|
53 |
/** |
|
54 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
55 |
* @version 0.0 |
|
56 |
* @link http://www.gvsig.gva.es |
|
57 |
*/ |
|
58 |
public class CompressHint{ |
|
59 |
|
|
60 |
public final static int COMPRESS_HINT_NONE = 0; |
|
61 |
public final static int COMPRESS_HINT_FAST = 1; |
|
62 |
public final static int COMPRESS_HINT_BEST = 2; |
|
63 |
public final static int COMPRESS_HINT_INTERNET = 3; |
|
64 |
|
|
65 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/CompressFormat.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: CompressFormat.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: CompressFormat.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
package es.gva.cit.jecwcompress; |
|
55 |
|
|
56 |
/** |
|
57 |
* Clase que contiene las constantes para los tipos de compresi?n |
|
58 |
* |
|
59 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
60 |
* @version 0.0 |
|
61 |
* @link http://www.gvsig.gva.es |
|
62 |
*/ |
|
63 |
public class CompressFormat{ |
|
64 |
|
|
65 |
public static final int COMPRESS_NONE = 0; |
|
66 |
public static final int COMPRESS_UINT8 = 1; |
|
67 |
public static final int COMPRESS_YUV = 2; |
|
68 |
public static final int COMPRESS_MULTI = 3; |
|
69 |
public static final int COMPRESS_RGB = 4; |
|
70 |
|
|
71 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/JniObject.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: JniObject.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: JniObject.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
package es.gva.cit.jecwcompress; |
|
52 |
|
|
53 |
|
|
54 |
/** |
|
55 |
* Clase de la que debe heredar el servidor de datos creado por el cliente |
|
56 |
* |
|
57 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
58 |
* @version 0.0 |
|
59 |
* @link http://www.gvsig.gva.es |
|
60 |
*/ |
|
61 |
public class JniObject{ |
|
62 |
|
|
63 |
protected long cPtr; |
|
64 |
protected int nNextLine; |
|
65 |
|
|
66 |
/** |
|
67 |
* Obtiene la direcci?n de memoria |
|
68 |
*/ |
|
69 |
public long getPtro(){ |
|
70 |
return cPtr; |
|
71 |
} |
|
72 |
|
|
73 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/ReadCallBack.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: ReadCallBack.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: ReadCallBack.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 d/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
18 |
* |
|
19 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
20 |
* |
|
21 |
* This program is free software; you can redistribute it and/or |
|
22 |
* modify it under the terms of the GNU General Public License |
|
23 |
* as published by the Free Software Foundation; either version 2 |
|
24 |
* of the License, or (at your option) any later version. |
|
25 |
* |
|
26 |
* This program is distributed in the hope that it will be useful, |
|
27 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
28 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
29 |
* GNU General Public License for more details. |
|
30 |
* |
|
31 |
* You should have received a copy of the GNU General Public License |
|
32 |
* along with this program; if not, write to the Free Software |
|
33 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
34 |
* |
|
35 |
* For more information, contact: |
|
36 |
* |
|
37 |
* Generalitat Valenciana |
|
38 |
* Conselleria d'Infraestructures i Transport |
|
39 |
* Av. Blasco Ib??ez, 50 |
|
40 |
* 46010 VALENCIA |
|
41 |
* SPAIN |
|
42 |
* |
|
43 |
* +34 963862235 |
|
44 |
* gvsig@gva.es |
|
45 |
* www.gvsig.gva.es |
|
46 |
* |
|
47 |
* or |
|
48 |
* |
|
49 |
* IVER T.I. S.A |
|
50 |
* Salamanca 50 |
|
51 |
* 46005 Valencia |
|
52 |
* Spain |
|
53 |
* |
|
54 |
* +34 963163400 |
|
55 |
* dac@iver.es |
|
56 |
*/ |
|
57 |
|
|
58 |
package es.gva.cit.jecwcompress; |
|
59 |
|
|
60 |
/** |
|
61 |
* Interfaz que debe implementar el cliente de compresi?n para que se pueda hacer llamadas |
|
62 |
* a las funciones java que cargan los buffers, desde el espacio C. |
|
63 |
* |
|
64 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
65 |
* @version 0.0 |
|
66 |
* @link http://www.gvsig.gva.es |
|
67 |
*/ |
|
68 |
public interface ReadCallBack { |
|
69 |
|
|
70 |
/** |
|
71 |
* Funci?n para la carga de datos. En cada callback deber? llenarse el buffer |
|
72 |
* dentro de esta funci?n. |
|
73 |
*/ |
|
74 |
void loadBuffer(); |
|
75 |
|
|
76 |
/** |
|
77 |
* Funci?n que es llamada cada uno por cien que sea comprimido. En ella podemos |
|
78 |
* escribir el c?digo necesario para la actualizaci?n del porcentaje que llevamos |
|
79 |
* de compresi?n. |
|
80 |
*/ |
|
81 |
void updatePercent(); |
|
82 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/JNIBase.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: JNIBase.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: JNIBase.java |
|
5 |
* Project: |
|
6 |
* Purpose: Base class for classes that use JNI. |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib��ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
|
|
52 |
package es.gva.cit.jecwcompress; |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* Clase base para todas las funcionalidades jni. Contiene operaciones comunes para todas ellas. |
|
57 |
* |
|
58 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
59 |
* @version 0.0 |
|
60 |
* @link http://www.gvsig.gva.es |
|
61 |
*/ |
|
62 |
public class JNIBase{ |
|
63 |
|
|
64 |
protected long cPtr; |
|
65 |
|
|
66 |
//private native int getRasterBandXSizeNat(long cPtr); |
|
67 |
|
|
68 |
|
|
69 |
/** |
|
70 |
* Funci�n que sirve como base para funcionalidades de gdal que admiten como par�metro un entero y devuelven un entero. |
|
71 |
* |
|
72 |
* @throws GdalException. |
|
73 |
* @param msg1 Mensaje de error que se muestra cuando el puntero a objeto pasado es vacio. |
|
74 |
* @param msg2 Mensaje de error que se muestra cuando el resultado de la llamada a la funci�n de gdal es menor o igual que 0. |
|
75 |
*/ |
|
76 |
|
|
77 |
|
|
78 |
protected int baseSimpleFunctions(int n,String msg1,String msg2)throws EcwException{ |
|
79 |
|
|
80 |
int res = 0; |
|
81 |
if(cPtr == 0) |
|
82 |
throw new EcwException(msg1); |
|
83 |
|
|
84 |
switch(n){ |
|
85 |
case 0: /*res = getRasterBandXSizeNat(cPtr);*/break; |
|
86 |
} |
|
87 |
|
|
88 |
if(res<0) |
|
89 |
throw new EcwException(msg2); |
|
90 |
else return res; |
|
91 |
} |
|
92 |
|
|
93 |
public long getPtro(){return cPtr;} |
|
94 |
|
|
95 |
static{ |
|
96 |
System.loadLibrary("jecw2.0.0"); |
|
97 |
} |
|
98 |
|
|
99 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/CellSizeUnits.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: CellSizeUnits.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: CellSizeUnits.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
|
|
52 |
package es.gva.cit.jecwcompress; |
|
53 |
|
|
54 |
/** |
|
55 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
56 |
* @version 0.0 |
|
57 |
* @link http://www.gvsig.gva.es |
|
58 |
*/ |
|
59 |
public class CellSizeUnits{ |
|
60 |
|
|
61 |
private final static int ECW_CELL_UNITS_INVALID = 0; |
|
62 |
private final static int ECW_CELL_UNITS_METERS = 1; |
|
63 |
private final static int ECW_CELL_UNITS_DEGREES = 2; |
|
64 |
private final static int ECW_CELL_UNITS_FEET = 3; |
|
65 |
private final static int ECW_CELL_UNITS_UNKNOWN = 4; |
|
66 |
|
|
67 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/EcwException.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: EcwException.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: GdalException.java |
|
5 |
* Project: JGDAL. Interface java to gdal (Frank Warmerdam). |
|
6 |
* Purpose: Class for exceptions produced into gdal. |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
package es.gva.cit.jecwcompress; |
|
52 |
|
|
53 |
/** |
|
54 |
* Es generada cuando los c?digos de retorno de las funciones del compresor de Ecw significan que algo ha ido mal. |
|
55 |
* |
|
56 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
57 |
* @version 0.0 |
|
58 |
* @link http://www.gvsig.gva.es |
|
59 |
*/ |
|
60 |
|
|
61 |
|
|
62 |
public class EcwException extends Exception{ |
|
63 |
|
|
64 |
public EcwException(String msg){ |
|
65 |
super(msg); |
|
66 |
} |
|
67 |
|
|
68 |
|
|
69 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/NCSEcwCompressClient.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: NCSEcwCompressClient.java 4274 2006-03-06 07:32:00Z nacho $ |
|
3 |
* |
|
4 |
* Name: NCSEcwCompressClient.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib��ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
package es.gva.cit.jecwcompress; |
|
52 |
|
|
53 |
/** |
|
54 |
* Esta clase contiene las funciones para b�sicas para la compresi�n de Ecw. Para su uso |
|
55 |
* debe seguirse la secuencia de operaciones l�gica: |
|
56 |
* <UL> |
|
57 |
* <LI>Creaci�n de objeto de esta clase NCSEcwCompressClient</LI> |
|
58 |
* <LI>Asignaci�n de par�metros de compresi�n con las operaciones set</LI> |
|
59 |
* <LI>Crear una clase servidora de datos que implemente el interfaz ReadCallBack |
|
60 |
* y herede de JniObject</LI> |
|
61 |
* <LI>Hacer un open con NCSEcwCompressOpen</LI> |
|
62 |
* <LI>ejecutar el compresor con NCSEcwCompress y cerrar con NCSEcwCompressClose</LI> |
|
63 |
* </UL> |
|
64 |
* |
|
65 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
66 |
* @version 0.0 |
|
67 |
* @link http://www.gvsig.gva.es |
|
68 |
*/ |
|
69 |
public class NCSEcwCompressClient extends JNIBase{ |
|
70 |
|
|
71 |
private native long NCSEcwCompressClientNat(); |
|
72 |
private native int NCSEcwCompressOpenNat(long cPtr, boolean bCalculateSizesOnly); |
|
73 |
private native int NCSEcwCompressNat(long cPtr,ReadCallBack read); |
|
74 |
private native int NCSEcwCompressCloseNat(long cPtr); |
|
75 |
private native void NCSEcwCompressCancelNat(long cPtr); |
|
76 |
private native void finalizeNat(long cPtr); |
|
77 |
|
|
78 |
private String inputFilename=null; |
|
79 |
private String outputFilename=null; |
|
80 |
private double targetCompression=0.0; |
|
81 |
private int eCompressFormat=0; |
|
82 |
private int eCompressHint=0; |
|
83 |
private int nBlockSizeX=0; |
|
84 |
private int nBlockSizeY=0; |
|
85 |
private int nInOutSizeX=0; |
|
86 |
private int nInOutSizeY=0; |
|
87 |
private int nInputBands=0; |
|
88 |
private int nOutputBands=0; |
|
89 |
private long nInputSize=0; |
|
90 |
private double fCellIncrementX=0.0; |
|
91 |
private double fCellIncrementY=0.0; |
|
92 |
private double fOriginX=0.0; |
|
93 |
private double fOriginY=0.0; |
|
94 |
private int eCellSizeUnits=0; |
|
95 |
private String szDatum=null; |
|
96 |
private String szProjection=null; |
|
97 |
private double fActualCompression=0.0; |
|
98 |
private double fCompressionSeconds=0.0; |
|
99 |
private double fCompressionMBSec=0.0; |
|
100 |
private long nOutputSize=0; |
|
101 |
|
|
102 |
public byte[] buffer; |
|
103 |
private long readInfo; |
|
104 |
private int porcentaje; |
|
105 |
|
|
106 |
/** |
|
107 |
* Esta funci�n es llamada desde C para inicializar el buffer que contendr� 1 linea de datos |
|
108 |
*/ |
|
109 |
private void initialize(){ |
|
110 |
buffer=new byte[nInOutSizeX*nInputBands]; |
|
111 |
} |
|
112 |
|
|
113 |
/** |
|
114 |
* Esta funci�n es llamada desde C para asignar la direcci�n de memoria de la estructura readInfo |
|
115 |
*/ |
|
116 |
private void setReadInfo(long ptr){ |
|
117 |
readInfo=ptr; |
|
118 |
} |
|
119 |
|
|
120 |
/** |
|
121 |
* Esta funci�n es llamada desde C para recuperar la direcci�n de memoria de readInfo |
|
122 |
*/ |
|
123 |
private long getReadInfo(){ |
|
124 |
return readInfo; |
|
125 |
} |
|
126 |
|
|
127 |
/** |
|
128 |
* Devuelve la cantidad de imagen comprimida en tanto por cien. |
|
129 |
*/ |
|
130 |
public int getPercent(){ |
|
131 |
return porcentaje; |
|
132 |
} |
|
133 |
|
|
134 |
/** |
|
135 |
* Contructor |
|
136 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
137 |
*/ |
|
138 |
public NCSEcwCompressClient()throws EcwException{ |
|
139 |
|
|
140 |
cPtr = NCSEcwCompressClientNat(); |
|
141 |
|
|
142 |
if(cPtr==0) |
|
143 |
throw new EcwException("Error en la creaci�n del objeto NCSEcwCompressClient"); |
|
144 |
} |
|
145 |
|
|
146 |
/** |
|
147 |
* Inicializa el compresor |
|
148 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
149 |
*/ |
|
150 |
public void NCSEcwCompressOpen(boolean bCalculateSizesOnly)throws EcwException{ |
|
151 |
|
|
152 |
if(cPtr == 0) |
|
153 |
throw new EcwException("Error en NCSEcwCompressOpen(). No hay una referencia v�lida al objeto NCSEcwCompressClient."); |
|
154 |
|
|
155 |
int error = NCSEcwCompressOpenNat(cPtr, bCalculateSizesOnly); |
|
156 |
|
|
157 |
if(error == -1) |
|
158 |
throw new EcwException("Error en NCSEcwCompressOpen(). No se ha podido obtener un objeto NCSEcwCompress valido"); |
|
159 |
else if(error != 0) |
|
160 |
throw new EcwException("Error en NCSEcwCompressOpen(). La llamada nativa ha devuelto un error "+NCSError.ErrorToString(error)); |
|
161 |
|
|
162 |
} |
|
163 |
|
|
164 |
/** |
|
165 |
* Realiza la funci�n de compresi�n |
|
166 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
167 |
*/ |
|
168 |
public void NCSEcwCompress(ReadCallBack read)throws EcwException{ |
|
169 |
|
|
170 |
if(cPtr == 0) |
|
171 |
throw new EcwException("Error en NCSEcwCompress(). No hay una referencia v�lida al objeto NCSEcwCompressClient."); |
|
172 |
|
|
173 |
if(read == null) |
|
174 |
throw new EcwException("Error en NCSEcwCompress(). El par�metro ReadCallBack no puede ser nulo."); |
|
175 |
|
|
176 |
int error = NCSEcwCompressNat(cPtr, read); |
|
177 |
|
|
178 |
if(error == -1) |
|
179 |
throw new EcwException("Error en NCSEcwCompress(). No se ha podido obtener un objeto NCSEcwCompress valido"); |
|
180 |
else if(error != 0) |
|
181 |
throw new EcwException("Error en NCSEcwCompress(). La llamada nativa ha devuelto un error "+NCSError.ErrorToString(error)); |
|
182 |
} |
|
183 |
|
|
184 |
/** |
|
185 |
* Cierra el compresor |
|
186 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
187 |
*/ |
|
188 |
public void NCSEcwCompressClose()throws EcwException{ |
|
189 |
|
|
190 |
if(cPtr == 0) |
|
191 |
throw new EcwException("Error en NCSEcwCompress(). No hay una referencia v�lida al objeto NCSEcwCompressClient."); |
|
192 |
|
|
193 |
int error = NCSEcwCompressCloseNat(cPtr); |
|
194 |
|
|
195 |
if(error == -1) |
|
196 |
throw new EcwException("Error en NCSEcwCompress(). No se ha podido obtener un objeto NCSEcwCompress valido"); |
|
197 |
else if(error != 0) |
|
198 |
throw new EcwException("Error en NCSEcwCompress(). La llamada nativa ha devuelto un error "+NCSError.ErrorToString(error)); |
|
199 |
} |
|
200 |
|
|
201 |
/** |
|
202 |
* Cancela la compresi�n |
|
203 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
204 |
*/ |
|
205 |
public void NCSEcwCompressCancel()throws EcwException{ |
|
206 |
|
|
207 |
if(cPtr == 0) |
|
208 |
throw new EcwException("Error en NCSEcwCompress(). No hay una referencia v�lida al objeto NCSEcwCompressClient."); |
|
209 |
|
|
210 |
NCSEcwCompressCancelNat(cPtr); |
|
211 |
} |
|
212 |
|
|
213 |
/** |
|
214 |
* @throws EcwException Se produce cuando la llamada nativa devuelve un c�digo de error |
|
215 |
*/ |
|
216 |
public void finalize()throws EcwException{ |
|
217 |
|
|
218 |
if(cPtr == 0) |
|
219 |
throw new EcwException("Error en finalize(). No hay una referencia v�lida al objeto NCSEcwCompressClient y no se ha podido liberar la memoria."); |
|
220 |
|
|
221 |
//finalizeNat(cPtr); |
|
222 |
} |
|
223 |
|
|
224 |
/** |
|
225 |
* Asigna el nombre del fichero de entrada |
|
226 |
* @param filename Nombre del fichero |
|
227 |
*/ |
|
228 |
public void setInputFilename(String filename){inputFilename=filename;}; |
|
229 |
|
|
230 |
/** |
|
231 |
* Asigna el nombre del fichero de salida |
|
232 |
* @param filename Nombre del fichero |
|
233 |
*/ |
|
234 |
public void setOutputFilename(String filename){outputFilename=filename;}; |
|
235 |
|
|
236 |
/** |
|
237 |
* Asigna el nivel de compresi�n |
|
238 |
* @param compress nivel de compresi�n |
|
239 |
*/ |
|
240 |
public void setTargetCompress(double compress){targetCompression=compress;}; |
|
241 |
|
|
242 |
/** |
|
243 |
* Asigna el formato de compresi�n. |
|
244 |
* @param format formato de compresi�n. Los valores que puede tomar son: |
|
245 |
* <UL> |
|
246 |
* <LI>COMPRESS_NONE = NCSCS_NONE</LI> |
|
247 |
* <LI>COMPRESS_UINT8 = NCSCS_GREYSCALE</LI> |
|
248 |
* <LI>COMPRESS_YUV = NCSCS_YUV</LI> |
|
249 |
* <LI>COMPRESS_MULTI = NCSCS_MULTIBAND</LI> |
|
250 |
* <LI>COMPRESS_RGB = NCSCS_sRGB</LI> |
|
251 |
* </UL> |
|
252 |
*/ |
|
253 |
public void setCompressFormat(int format){eCompressFormat=format;}; |
|
254 |
|
|
255 |
/** |
|
256 |
* Asigna el Compress Hint. |
|
257 |
* @param Compress hint. Los valores que puede tomar son: |
|
258 |
* <UL> |
|
259 |
* <LI>COMPRESS_HINT_NONE = 0</LI> |
|
260 |
* <LI>COMPRESS_HINT_FAST = 1</LI> |
|
261 |
* </LI>COMPRESS_HINT_BEST = 2</LI> |
|
262 |
* <LI>COMPRESS_HINT_INTERNET = 3</LI> |
|
263 |
* </UL> |
|
264 |
*/ |
|
265 |
public void setCompressHint(int hint){eCompressHint=hint;}; |
|
266 |
|
|
267 |
/** |
|
268 |
* Asigna el tama�o de bloque en x |
|
269 |
* @param n tama�o de bloque en x |
|
270 |
*/ |
|
271 |
public void setBlockSizeX(int n){nBlockSizeX=n;}; |
|
272 |
|
|
273 |
/** |
|
274 |
* Asigna el tama�o de bloque en y |
|
275 |
* @param n tama�o de bloque en y |
|
276 |
*/ |
|
277 |
public void setBlockSizeY(int n){nBlockSizeY=n;}; |
|
278 |
|
|
279 |
/** |
|
280 |
* Asigna el tama�o de la imagen de salida en x |
|
281 |
* @param n tama�o de imagen de salida en x |
|
282 |
*/ |
|
283 |
public void setInOutSizeX(int n){nInOutSizeX=n;}; |
|
284 |
|
|
285 |
/** |
|
286 |
* Asigna el tama�o de la imagen de salida en y |
|
287 |
* @param n tama�o de imagen de salida en y |
|
288 |
*/ |
|
289 |
public void setInOutSizeY(int n){nInOutSizeY=n;}; |
|
290 |
|
|
291 |
/** |
|
292 |
* Asigna el n�mero de bandas de entrada |
|
293 |
* @param n N�mero de bandas de entrada |
|
294 |
*/ |
|
295 |
public void setInputBands(int n){nInputBands=n;}; |
|
296 |
|
|
297 |
/** |
|
298 |
* Asigna el n�mero de bandas de salida |
|
299 |
* @param n N�mero de bandas de salida |
|
300 |
*/ |
|
301 |
public void setOutputBands(int n){nOutputBands=n;}; |
|
302 |
|
|
303 |
public void setInputSize(long nis){nInputSize=nis;}; |
|
304 |
public void setCellIncrementX(double x){fCellIncrementX=x;}; |
|
305 |
public void setCellIncrementY(double y){fCellIncrementY=y;}; |
|
306 |
public void setOriginX(double x){fOriginX=x;}; |
|
307 |
public void setOriginY(double y){fOriginY=y;}; |
|
308 |
|
|
309 |
/** |
|
310 |
* Asigna el tama�o de celda |
|
311 |
* @param cellu tama�o de celda. Puede tomar un valor entre los siguientes: |
|
312 |
* <UL> |
|
313 |
* <LI>ECW_CELL_UNITS_INVALID = 0</LI> |
|
314 |
* <LI>ECW_CELL_UNITS_METERS = 1</LI> |
|
315 |
* <LI>ECW_CELL_UNITS_DEGREES = 2</LI> |
|
316 |
* <LI>ECW_CELL_UNITS_FEET = 3</LI> |
|
317 |
* <LI>ECW_CELL_UNITS_UNKNOWN = 4</LI> |
|
318 |
* </UL> |
|
319 |
*/ |
|
320 |
public void setCellSizeUnits(int cellu){eCellSizeUnits=cellu;}; |
|
321 |
|
|
322 |
/** |
|
323 |
* Asigna el datum |
|
324 |
* @param dat datum |
|
325 |
*/ |
|
326 |
public void setDatum(String dat){szDatum=dat;}; |
|
327 |
|
|
328 |
/** |
|
329 |
* Asigna la proyecci�n |
|
330 |
* @param proj Proyecci�n |
|
331 |
*/ |
|
332 |
public void setProjection(String proj){szProjection=proj;}; |
|
333 |
|
|
334 |
public void setActualCompression(double comp){fActualCompression=comp;}; |
|
335 |
public void setCompressionSeconds(double comp){fCompressionSeconds=comp;}; |
|
336 |
public void setCompressionMBSec(double comp){fCompressionMBSec=comp;}; |
|
337 |
public void setOutputSize(long n){nOutputSize=n;}; |
|
338 |
} |
|
339 |
|
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/es/gva/cit/jecwcompress/NCSError.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: NCSError.java 3538 2006-01-09 11:56:54Z nacho $ |
|
3 |
* |
|
4 |
* Name: NCSError.java |
|
5 |
* Project: |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
11 |
* |
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or |
|
15 |
* modify it under the terms of the GNU General Public License |
|
16 |
* as published by the Free Software Foundation; either version 2 |
|
17 |
* of the License, or (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
27 |
* |
|
28 |
* For more information, contact: |
|
29 |
* |
|
30 |
* Generalitat Valenciana |
|
31 |
* Conselleria d'Infraestructures i Transport |
|
32 |
* Av. Blasco Ib??ez, 50 |
|
33 |
* 46010 VALENCIA |
|
34 |
* SPAIN |
|
35 |
* |
|
36 |
* +34 963862235 |
|
37 |
* gvsig@gva.es |
|
38 |
* www.gvsig.gva.es |
|
39 |
* |
|
40 |
* or |
|
41 |
* |
|
42 |
* IVER T.I. S.A |
|
43 |
* Salamanca 50 |
|
44 |
* 46005 Valencia |
|
45 |
* Spain |
|
46 |
* |
|
47 |
* +34 963163400 |
|
48 |
* dac@iver.es |
|
49 |
*/ |
|
50 |
|
|
51 |
package es.gva.cit.jecwcompress; |
|
52 |
|
|
53 |
/** |
|
54 |
* Clase que realiza la conversi?n de los c?digos de error que devuelve las funciones C |
|
55 |
* en cadenas para que pueda ser mostrado el significado del error al usuario. |
|
56 |
* |
|
57 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
58 |
* @version 0.0 |
|
59 |
* @link http://www.gvsig.gva.es |
|
60 |
*/ |
|
61 |
public class NCSError{ |
|
62 |
|
|
63 |
/** |
|
64 |
* Conversi?n de un c?digo de error pasado por par?metro a cadena |
|
65 |
* @return cadena que representa el error producido |
|
66 |
*/ |
|
67 |
public static String ErrorToString(int error){ |
|
68 |
|
|
69 |
switch(error){ |
|
70 |
case 0: return new String("NCS_SUCCESS"); |
|
71 |
case 1: return new String("NCS_QUEUE_NODE_CREATE_FAILED"); /**< Queue node creation failed */ |
|
72 |
case 2: return new String("NCS_FILE_OPEN_FAILED"); /**< File open failed */ |
|
73 |
case 3: return new String("NCS_FILE_LIMIT_REACHED"); /**< The Image Web Server's licensed file limit has been reached */ |
|
74 |
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 */ |
|
75 |
case 5: return new String("NCS_FILE_NO_MEMORY"); /**< Not enough memory for new file */ |
|
76 |
case 6: return new String("NCS_CLIENT_LIMIT_REACHED"); /**< The Image Web Server's licensed client limit has been reached */ |
|
77 |
case 7: return new String("NCS_DUPLICATE_OPEN"); /**< Detected duplicate open from net layer */ |
|
78 |
case 8: return new String("NCS_PACKET_REQUEST_NYI"); /**< Packet request type not yet implemented */ |
|
79 |
case 9: return new String("NCS_PACKET_TYPE_ILLEGAL"); /**< Packet type is illegal */ |
|
80 |
case 10: return new String("NCS_DESTROY_CLIENT_DANGLING_REQUESTS"); /**< Client closed while requests outstanding */ |
|
81 |
case 11: return new String("NCS_UNKNOWN_CLIENT_UID"); /**< Client UID unknown */ |
|
82 |
case 12: return new String("NCS_COULDNT_CREATE_CLIENT"); /**< Could not create new client */ |
|
83 |
case 13: return new String("NCS_NET_COULDNT_RESOLVE_HOST"); /**< Could not resolve address of Image Web Server */ |
|
84 |
case 14: return new String("NCS_NET_COULDNT_CONNECT"); /**< Could not connect to host */ |
|
85 |
case 15: return new String("NCS_NET_RECV_TIMEOUT"); /**< Receive timeout */ |
|
86 |
case 16: return new String("NCS_NET_HEADER_SEND_FAILURE"); /**< Error sending header */ |
|
87 |
case 17: return new String("NCS_NET_HEADER_RECV_FAILURE"); /**< Error receiving header */ |
|
88 |
case 18: return new String("NCS_NET_PACKET_SEND_FAILURE"); /**< Error sending packet */ |
|
89 |
case 19: return new String("NCS_NET_PACKET_RECV_FAILURE"); /**< Error receiving packet */ |
|
90 |
case 20: return new String("NCS_NET_401_UNAUTHORISED"); /**< 401 Unauthorised: SDK doesn't do authentication so this suggests a misconfigured server */ |
|
91 |
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 */ |
|
92 |
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 */ |
|
93 |
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 */ |
|
94 |
case 24: return new String("NCS_NET_UNEXPECTED_RESPONSE"); /**< Unexpected HTTP response could not be handled */ |
|
95 |
case 25: return new String("NCS_NET_BAD_RESPONSE"); /**< HTTP response received outside specification */ |
|
96 |
case 26: return new String("NCS_NET_ALREADY_CONNECTED"); /**< Already connected */ |
|
97 |
case 27: return new String("NCS_INVALID_CONNECTION"); /**< Connection is invalid */ |
|
98 |
case 28: return new String("NCS_WINSOCK_FAILURE"); /**< A Windows sockets failure occurred */ |
|
99 |
case 29: return new String("NCS_SYMBOL_ERROR"); /**< Symbology error */ |
|
100 |
case 30: return new String("NCS_OPEN_DB_ERROR"); /**< Could not open database */ |
|
101 |
case 31: return new String("NCS_DB_QUERY_FAILED"); /**< Could not execute the requested query on database */ |
|
102 |
case 32: return new String("NCS_DB_SQL_ERROR"); /**< SQL statement could not be executed */ |
|
103 |
case 33: return new String("NCS_GET_LAYER_FAILED"); /**< Open symbol layer failed */ |
|
104 |
case 34: return new String("NCS_DB_NOT_OPEN"); /**< The database is not open */ |
|
105 |
case 35: return new String("NCS_QT_TYPE_UNSUPPORTED"); /**< This type of quadtree is not supported */ |
|
106 |
case 36: return new String("NCS_PREF_INVALID_USER_KEY"); /**< Invalid local user key name specified */ |
|
107 |
case 37: return new String("NCS_PREF_INVALID_MACHINE_KEY"); /**< Invalid local machine key name specified */ |
|
108 |
case 38: return new String("NCS_REGKEY_OPENEX_FAILED"); /**< Failed to open registry key */ |
|
109 |
case 39: return new String("NCS_REGQUERY_VALUE_FAILED"); /**< Registry query failed */ |
|
110 |
case 40: return new String("NCS_INVALID_REG_TYPE"); /**< Type mismatch in registry variable */ |
|
111 |
case 41: return new String("NCS_INVALID_ARGUMENTS"); /**< Invalid arguments passed to function */ |
|
112 |
case 42: return new String("NCS_ECW_ERROR"); /**< ECW error */ |
|
113 |
case 43: return new String("NCS_SERVER_ERROR"); /**< Server error */ |
|
114 |
case 44: return new String("NCS_UNKNOWN_ERROR"); /**< Unknown error */ |
|
115 |
case 45: return new String("NCS_EXTENT_ERROR"); /**< Extent conversion failed */ |
|
116 |
case 46: return new String("NCS_COULDNT_ALLOC_MEMORY"); /**< Could not allocate enough memory */ |
|
117 |
case 47: return new String("NCS_INVALID_PARAMETER"); /**< An invalid parameter was used */ |
|
118 |
case 48: return new String("NCS_FILEIO_ERROR"); /**< Error reading or writing file */ |
|
119 |
case 49: return new String("NCS_COULDNT_OPEN_COMPRESSION"); /**< Compression task could not be initialised */ |
|
120 |
case 50: return new String("NCS_COULDNT_PERFORM_COMPRESSION"); /**< Compression task could not be processed */ |
|
121 |
case 51: return new String("NCS_GENERATED_TOO_MANY_OUTPUT_LINES"); /**< Trying to generate too many output lines */ |
|
122 |
case 52: return new String("NCS_USER_CANCELLED_COMPRESSION"); /**< Compression task was cancelled by client application */ |
|
123 |
case 53: return new String("NCS_COULDNT_READ_INPUT_LINE"); /**< Could not read line from input data */ |
|
124 |
case 54: return new String("NCS_INPUT_SIZE_EXCEEDED"); /**< Input image size was exceeded for this version of the SDK */ |
|
125 |
case 55: return new String("NCS_REGION_OUTSIDE_FILE"); /**< Specified image region is outside image extents */ |
|
126 |
case 56: return new String("NCS_NO_SUPERSAMPLE"); /**< Supersampling is not supported by the SDK functions */ |
|
127 |
case 57: return new String("NCS_ZERO_SIZE"); /**< Specified image region has a zero width or height */ |
|
128 |
case 58: return new String("NCS_TOO_MANY_BANDS"); /**< More bands specified than exist in the input file */ |
|
129 |
case 59: return new String("NCS_INVALID_BAND_NR"); /**< An invalid band number has been specified */ |
|
130 |
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 */ |
|
131 |
case 61: return new String("NCS_INCOMPATIBLE_PROTOCOL_VERSION"); /**< The ECWP client version is incompatible with this server */ |
|
132 |
case 62: return new String("NCS_WININET_FAILURE"); /**< Windows Internet Client error */ |
|
133 |
case 63: return new String("NCS_COULDNT_LOAD_WININET"); /**< wininet.dll could not be loaded - usually indicates Internet Explorer should be upgraded */ |
|
134 |
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 */ |
|
135 |
case 65: return new String("NCS_FILE_NOT_OPEN"); /**< No file is open */ |
|
136 |
case 66: return new String("NCS_JNI_REFRESH_NOT_IMPLEMENTED"); /**< Class does not implement ECWProgressiveDisplay interface */ |
|
137 |
case 67: return new String("NCS_INCOMPATIBLE_COORDINATE_SYSTEMS"); /**< Incompatible coordinate systems */ |
|
138 |
case 68: return new String("NCS_INCOMPATIBLE_COORDINATE_DATUM"); /**< Incompatible coordinate datum types */ |
|
139 |
case 69: return new String("NCS_INCOMPATIBLE_COORDINATE_PROJECTION"); /**< Incompatible coordinate projection types */ |
|
140 |
case 70: return new String("NCS_INCOMPATIBLE_COORDINATE_UNITS"); /**< Incompatible coordinate units types */ |
|
141 |
case 71: return new String("NCS_COORDINATE_CANNOT_BE_TRANSFORMED"); /**< Non-linear coordinate systems not supported */ |
|
142 |
case 72: return new String("NCS_GDT_ERROR"); /**< Error involving the GDT database */ |
|
143 |
case 73: return new String("NCS_NET_PACKET_RECV_ZERO_LENGTH"); /**< Zero length packet received */ |
|
144 |
case 74: return new String("NCS_UNSUPPORTEDLANGUAGE"); /**< Must use Japanese version of the ECW SDK */ |
|
145 |
case 75: return new String("NCS_CONNECTION_LOST"); /**< Connection to server was lost */ |
|
146 |
case 76: return new String("NCS_COORD_CONVERT_ERROR"); /**< NCSGDT coordinate conversion failed */ |
|
147 |
case 77: return new String("NCS_METABASE_OPEN_FAILED"); /**< Failed to open metabase */ |
|
148 |
case 78: return new String("NCS_METABASE_GET_FAILED"); /**< Failed to get value from metabase */ |
|
149 |
case 79: return new String("NCS_NET_HEADER_SEND_TIMEOUT"); /**< Timeout sending header */ |
|
150 |
case 80: return new String("NCS_JNI_ERROR"); /**< Java JNI error */ |
|
151 |
case 81: return new String("NCS_DB_INVALID_NAME"); /**< No data source passed */ |
|
152 |
case 82: return new String("NCS_SYMBOL_COULDNT_RESOLVE_HOST"); /**< Could not resolve address of Image Web Server Symbol Server Extension */ |
|
153 |
case 83: return new String("NCS_INVALID_ERROR_ENUM"); /**< The value of an NCSError error number was invalid! */ |
|
154 |
case 84: return new String("NCS_FILE_EOF"); /**< End of file reached */ |
|
155 |
case 85: return new String("NCS_FILE_NOT_FOUND"); /**< File not found */ |
|
156 |
case 86: return new String("NCS_FILE_INVALID"); /**< File was invalid or corrupt */ |
|
157 |
case 87: return new String("NCS_FILE_SEEK_ERROR"); /**< Attempted to read, write or seek past file limits */ |
|
158 |
case 88: return new String("NCS_FILE_NO_PERMISSIONS"); /**< Permissions not available to access file */ |
|
159 |
case 89: return new String("NCS_FILE_OPEN_ERROR"); /**< Error opengin file */ |
|
160 |
case 90: return new String("NCS_FILE_CLOSE_ERROR"); /**< Error closing file */ |
|
161 |
case 91: return new String("NCS_FILE_IO_ERROR"); /**< Miscellaneous error involving file input or output */ |
|
162 |
case 92: return new String("NCS_SET_EXTENTS_ERROR"); /**< Illegal or invalid world coordinates supplied */ |
|
163 |
case 93: return new String("NCS_FILE_PROJECTION_MISMATCH"); /**< Image projection does not match that of the controlling layer */ |
|
164 |
case 94: return new String("NCS_GDT_UNKNOWN_PROJECTION"); /**< Unknown map projection */ |
|
165 |
case 95: return new String("NCS_GDT_UNKNOWN_DATUM"); /**< Unknown geodetic datum */ |
|
166 |
case 96: return new String("NCS_GDT_USER_SERVER_FAILED"); /**< User specified Geographic Projection Database data server failed */ |
|
167 |
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 */ |
|
168 |
case 98: return new String("NCS_GDT_BAD_TRANSFORM_MODE"); /**< Invalid mode of transform */ |
|
169 |
case 99: return new String("NCS_GDT_TRANSFORM_OUT_OF_BOUNDS"); /**< Coordinate to be transformed is out of bounds */ |
|
170 |
case 100: return new String("NCS_LAYER_DUPLICATE_LAYER_NAME"); /**< A layer already exists with the specified name */ |
|
171 |
case 101: return new String("NCS_LAYER_INVALID_PARAMETER"); /**< The specified layer does not contain the specified parameter */ |
|
172 |
case 102: return new String("NCS_PIPE_CREATE_FAILED"); /**< Failed to create pipe */ |
|
173 |
case 103: return new String("NCS_FILE_MKDIR_EXISTS"); /**< Directory to be created already exists */ /*[20]*/ |
|
174 |
case 104: return new String("NCS_FILE_MKDIR_PATH_NOT_FOUND"); /**< The path specified for directory creation does not exist */ /*[20]*/ |
|
175 |
case 105: return new String("NCS_ECW_READ_CANCELLED"); /**< File read was cancelled */ |
|
176 |
case 106: return new String("NCS_JP2_GEODATA_READ_ERROR"); /**< Error reading geodata from a JPEG 2000 file */ /*[21]*/ |
|
177 |
case 107: return new String("NCS_JP2_GEODATA_WRITE_ERROR"); /**< Error writing geodata to a JPEG 2000 file */ /*[21]*/ |
|
178 |
case 108: return new String("NCS_JP2_GEODATA_NOT_GEOREFERENCED"); /**< JPEG 2000 file not georeferenced */ /*[21]*/ |
|
179 |
case 109: return new String("NCS_MAX_ERROR_NUMBER"); /**< The maximum error value in this enumerated typ*/ |
|
180 |
} |
|
181 |
return new String(""); |
|
182 |
} |
|
183 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/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 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/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 |
} |
tags/v2_0_0_Build_2026/libjni-ecw/src/main/java/com/ermapper/util/JNCSScreenPoint.java | ||
---|---|---|
1 |
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. |
|
2 |
// Jad home page: http://www.kpdus.com/jad.html |
Also available in: Unified diff