Revision 35367
tags/v2_0_0_Build_2027/libjni-ecw/CMakeModules/ModuleInstall.cmake | ||
---|---|---|
1 |
# INSTALL and SOURCE_GROUP commands for OSG/OT/Producer Modules |
|
2 |
|
|
3 |
# Required Vars: |
|
4 |
# ${LIB_NAME} |
|
5 |
# ${LIB_PUBLIC_HEADERS} |
|
6 |
|
|
7 |
SET(INSTALL_INCDIR include) |
|
8 |
SET(INSTALL_BINDIR bin) |
|
9 |
IF(WIN32) |
|
10 |
SET(INSTALL_BINDIR .) |
|
11 |
SET(INSTALL_LIBDIR .) |
|
12 |
SET(INSTALL_ARCHIVEDIR lib) |
|
13 |
ELSE(WIN32) |
|
14 |
SET(INSTALL_BINDIR .) |
|
15 |
SET(INSTALL_LIBDIR .) |
|
16 |
SET(INSTALL_ARCHIVEDIR lib) |
|
17 |
ENDIF(WIN32) |
|
18 |
|
|
19 |
SET(HEADERS_GROUP "Header Files") |
|
20 |
|
|
21 |
SOURCE_GROUP( |
|
22 |
${HEADERS_GROUP} |
|
23 |
FILES ${LIB_PUBLIC_HEADERS} |
|
24 |
) |
|
25 |
|
|
26 |
|
|
27 |
INSTALL( |
|
28 |
TARGETS ${LIB_NAME} |
|
29 |
RUNTIME DESTINATION ${INSTALL_BINDIR} |
|
30 |
LIBRARY DESTINATION ${INSTALL_LIBDIR} |
|
31 |
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} |
|
32 |
) |
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
# FIXME: Do not run for OS X framework |
|
37 |
#INSTALL( |
|
38 |
# FILES ${LIB_PUBLIC_HEADERS} |
|
39 |
# DESTINATION ${INSTALL_INCDIR}/${LIB_NAME} |
|
40 |
#) |
tags/v2_0_0_Build_2027/libjni-ecw/CMakeModules/FindECW.cmake | ||
---|---|---|
1 |
# Locate ecw |
|
2 |
# This module defines |
|
3 |
# ECW_LIBRARY |
|
4 |
# ECW_FOUND, if false, do not try to link to gdal |
|
5 |
# ECW_INCLUDE_DIR, where to find the headers |
|
6 |
# |
|
7 |
# $ECW_DIR is an environment variable that would |
|
8 |
# correspond to the ./configure --prefix=$ECW_DIR |
|
9 |
# |
|
10 |
# Created by Robert Osfield. |
|
11 |
|
|
12 |
FIND_PATH(ECW_INCLUDE_DIR |
|
13 |
NAMES ECW.h NCSError.h NCSErrors.h |
|
14 |
PATHS |
|
15 |
${DEPMAN_PATH}/include |
|
16 |
${ECW_DIR}/include |
|
17 |
$ENV{ECW_DIR}/include |
|
18 |
$ENV{ECW_DIR} |
|
19 |
~/Library/Frameworks |
|
20 |
/Library/Frameworks |
|
21 |
/usr/local/include |
|
22 |
/usr/include |
|
23 |
/usr/include/ecw |
|
24 |
/sw/include # Fink |
|
25 |
/opt/local/include # DarwinPorts |
|
26 |
/opt/csw/include # Blastwave |
|
27 |
/opt/include |
|
28 |
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include |
|
29 |
/usr/freeware/include |
|
30 |
#"C:/libecwj2-3.3/Source/include" |
|
31 |
"C:/Archivos de programa/Earth Resource Mapping/ECW SDK/include" |
|
32 |
"C:/Earth Resource Mapping/ECW SDK/include" |
|
33 |
"C:/ECW SDK/include" |
|
34 |
"C:/ecw/include" |
|
35 |
) |
|
36 |
|
|
37 |
FIND_LIBRARY(ECW_LIBRARY |
|
38 |
NAMES NCSEcw |
|
39 |
PATHS |
|
40 |
${DEPMAN_PATH}/bin |
|
41 |
${DEPMAN_PATH}/lib |
|
42 |
${ECW_DIR}/lib |
|
43 |
$ENV{ECW_DIR}/lib |
|
44 |
$ENV{ECW_DIR} |
|
45 |
~/Library/Frameworks |
|
46 |
/Library/Frameworks |
|
47 |
/usr/local/lib |
|
48 |
/usr/lib |
|
49 |
/sw/lib |
|
50 |
/opt/local/lib |
|
51 |
/opt/csw/lib |
|
52 |
/opt/lib |
|
53 |
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib |
|
54 |
/usr/freeware/lib64 |
|
55 |
"C:/Archivos de programa/Earth Resource Mapping/ECW SDK/lib" |
|
56 |
"C:/Earth Resource Mapping/ECW SDK/lib" |
|
57 |
"C:/ECW SDK/lib/vc71" |
|
58 |
"C:/ECW SDK/lib" |
|
59 |
"C:/ecw/lib" |
|
60 |
) |
|
61 |
|
|
62 |
FIND_LIBRARY(ECW_LIBRARY2 |
|
63 |
NAMES NCSEcwC |
|
64 |
PATHS |
|
65 |
${DEPMAN_PATH}/bin |
|
66 |
${DEPMAN_PATH}/lib |
|
67 |
${ECW_DIR}/lib |
|
68 |
$ENV{ECW_DIR}/lib |
|
69 |
$ENV{ECW_DIR} |
|
70 |
~/Library/Frameworks |
|
71 |
/Library/Frameworks |
|
72 |
/usr/local/lib |
|
73 |
/usr/lib |
|
74 |
/sw/lib |
|
75 |
/opt/local/lib |
|
76 |
/opt/csw/lib |
|
77 |
/opt/lib |
|
78 |
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib |
|
79 |
/usr/freeware/lib64 |
|
80 |
"C:/Archivos de programa/Earth Resource Mapping/ECW SDK/lib" |
|
81 |
"C:/Earth Resource Mapping/ECW SDK/lib" |
|
82 |
"C:/ECW SDK/lib/vc71" |
|
83 |
"C:/ECW SDK/lib" |
|
84 |
"C:/ecw/lib" |
|
85 |
) |
|
86 |
|
|
87 |
FIND_LIBRARY(ECW_LIBRARY3 |
|
88 |
NAMES NCSUtil |
|
89 |
PATHS |
|
90 |
${DEPMAN_PATH}/bin |
|
91 |
${DEPMAN_PATH}/lib |
|
92 |
${ECW_DIR}/lib |
|
93 |
$ENV{ECW_DIR}/lib |
|
94 |
$ENV{ECW_DIR} |
|
95 |
~/Library/Frameworks |
|
96 |
/Library/Frameworks |
|
97 |
/usr/local/lib |
|
98 |
/usr/lib |
|
99 |
/sw/lib |
|
100 |
/opt/local/lib |
|
101 |
/opt/csw/lib |
|
102 |
/opt/lib |
|
103 |
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib |
|
104 |
/usr/freeware/lib64 |
|
105 |
"C:/Archivos de programa/Earth Resource Mapping/ECW SDK/lib" |
|
106 |
"C:/Earth Resource Mapping/ECW SDK/lib" |
|
107 |
"C:/ECW SDK/lib/vc71" |
|
108 |
"C:/ECW SDK/lib" |
|
109 |
"C:/ecw/lib" |
|
110 |
) |
|
111 |
|
|
112 |
FIND_LIBRARY(ECW_LIBRARY4 |
|
113 |
NAMES NCSCnet |
|
114 |
PATHS |
|
115 |
${DEPMAN_PATH}/bin |
|
116 |
${DEPMAN_PATH}/lib |
|
117 |
${ECW_DIR}/lib |
|
118 |
$ENV{ECW_DIR}/lib |
|
119 |
$ENV{ECW_DIR} |
|
120 |
~/Library/Frameworks |
|
121 |
/Library/Frameworks |
|
122 |
/usr/local/lib |
|
123 |
/usr/lib |
|
124 |
/sw/lib |
|
125 |
/opt/local/lib |
|
126 |
/opt/csw/lib |
|
127 |
/opt/lib |
|
128 |
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib |
|
129 |
/usr/freeware/lib64 |
|
130 |
) |
|
131 |
|
|
132 |
SET(ECW_FOUND "NO") |
|
133 |
IF(ECW_LIBRARY AND ECW_INCLUDE_DIR) |
|
134 |
SET(ECW_FOUND "YES") |
|
135 |
ENDIF(ECW_LIBRARY AND ECW_INCLUDE_DIR) |
|
136 |
|
tags/v2_0_0_Build_2027/libjni-ecw/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|
2 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<groupId>org.gvsig</groupId> |
|
6 |
<artifactId>org.gvsig.jecw</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<version>2.0.0-SNAPSHOT</version> |
|
9 |
<name>libjni-ecw Library</name> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>gvsig-base-library-jni-pom</artifactId> |
|
13 |
<version>2.0-SNAPSHOT</version> |
|
14 |
</parent> |
|
15 |
<properties> |
|
16 |
<build-dir>${basedir}/../build</build-dir> |
|
17 |
<eclipse.project.name>libjni-ecw</eclipse.project.name> |
|
18 |
</properties> |
|
19 |
<build> |
|
20 |
<plugins> |
|
21 |
<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION --> |
|
22 |
<plugin> |
|
23 |
<groupId>org.apache.maven.plugins</groupId> |
|
24 |
<artifactId>maven-surefire-plugin</artifactId> |
|
25 |
<configuration> |
|
26 |
<skipTests>true</skipTests> |
|
27 |
</configuration> |
|
28 |
</plugin> |
|
29 |
</plugins> |
|
30 |
</build> |
|
31 |
<profiles> |
|
32 |
<profile> |
|
33 |
<id>windows-profile</id> |
|
34 |
<activation> |
|
35 |
<os> |
|
36 |
<family>windows</family> |
|
37 |
</os> |
|
38 |
</activation> |
|
39 |
<properties> |
|
40 |
<!-- This hack is necessary to allow correct search in windows --> |
|
41 |
<build-dir>${basedir}\..\build</build-dir> |
|
42 |
</properties> |
|
43 |
<dependencies> |
|
44 |
<dependency> |
|
45 |
<groupId>com.ermapper</groupId> |
|
46 |
<artifactId>ecw</artifactId> |
|
47 |
<version>3.3.20070509</version> |
|
48 |
<classifier>${native-classifier}</classifier> |
|
49 |
<type>tar.gz</type> |
|
50 |
</dependency> |
|
51 |
<dependency> |
|
52 |
<groupId>com.microsoft</groupId> |
|
53 |
<artifactId>visualcppredist</artifactId> |
|
54 |
<version>2008</version> |
|
55 |
<classifier>${native-classifier}</classifier> |
|
56 |
<type>tar.gz</type> |
|
57 |
</dependency> |
|
58 |
</dependencies> |
|
59 |
</profile> |
|
60 |
<profile> |
|
61 |
<id>linux-profile</id> |
|
62 |
<activation> |
|
63 |
<os> |
|
64 |
<family>linux</family> |
|
65 |
</os> |
|
66 |
</activation> |
|
67 |
<dependencies> |
|
68 |
<dependency> |
|
69 |
<groupId>com.ermapper</groupId> |
|
70 |
<artifactId>ecw</artifactId> |
|
71 |
<version>3.3.20070509</version> |
|
72 |
<classifier>${native-classifier}</classifier> |
|
73 |
<type>tar.gz</type> |
|
74 |
</dependency> |
|
75 |
</dependencies> |
|
76 |
</profile> |
|
77 |
<profile> |
|
78 |
<id>mac-profile</id> |
|
79 |
<activation> |
|
80 |
<os> |
|
81 |
<family>mac</family> |
|
82 |
</os> |
|
83 |
</activation> |
|
84 |
<dependencies> |
|
85 |
<dependency> |
|
86 |
<groupId>com.ermapper</groupId> |
|
87 |
<artifactId>ecw</artifactId> |
|
88 |
<version>3.3.20070509</version> |
|
89 |
<classifier>${native-classifier}</classifier> |
|
90 |
<type>tar.gz</type> |
|
91 |
</dependency> |
|
92 |
</dependencies> |
|
93 |
</profile> |
|
94 |
</profiles> |
|
95 |
</project> |
|
96 |
|
tags/v2_0_0_Build_2027/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_2027/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_2027/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_2027/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_2027/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 |
|
3 |
// Decompiler options: packimports(3) |
|
4 |
// Source File Name: JNCSScreenPoint.java |
|
5 |
|
|
6 |
package com.ermapper.util; |
|
7 |
|
|
8 |
|
|
9 |
public class JNCSScreenPoint |
|
10 |
{ |
|
11 |
|
|
12 |
public JNCSScreenPoint() |
|
13 |
{ |
|
14 |
x = 0; |
|
15 |
y = 0; |
|
16 |
} |
|
17 |
|
|
18 |
public JNCSScreenPoint(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_2027/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_2027/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_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSError.java | ||
---|---|---|
1 |
package com.ermapper.ecw; |
|
2 |
|
|
3 |
/** |
|
4 |
* Representaci?n de errores como cadenas de texto |
|
5 |
*/ |
|
6 |
public class JNCSError{ |
|
7 |
|
|
8 |
public static String getError(int e){ |
|
9 |
|
|
10 |
switch(e){ |
|
11 |
case 0: return new String("No error"); /* NCS_SUCCESS */ |
|
12 |
/* NCS Raster Errors */ |
|
13 |
case 1: return new String("Queue node creation failed"); /* NCS_QUEUE_NODE_CREATE_FAILED */ |
|
14 |
case 2: return new String("Could not open file"); /* NCS_FILE_OPEN_FAILED */ |
|
15 |
case 3: return new String("The Image Web Server's licensed file limit has been reached "); /* NCS_FILE_LIMIT_REACHED (license name eg office) */ |
|
16 |
case 4: return new String("The requested file is larger than is permitted by the license on this Image Web Server ");/* NCS_FILE_SIZE_LIMIT_REACHED (license name eg office) */ |
|
17 |
case 5: return new String("Not enough memory for new file"); /* NCS_FILE_NO_MEMORY */ |
|
18 |
case 6: return new String("The Image Web Server's licensed client limit has been reached "); /* NCS_CLIENT_LIMIT_REACHED (license name eg enterprise) */ |
|
19 |
case 7: return new String("Detected duplicate open from net layer"); /* NCS_DUPLICATE_OPEN */ |
|
20 |
case 8: return new String("Packet request type not yet implemented"); /* NCS_PACKET_REQUEST_NYI (packet type num) */ |
|
21 |
case 9: return new String("Packet type is illegal"); /* NCS_PACKET_TYPE_ILLEGAL (packet type num) */ |
|
22 |
case 10: return new String("Client closed while requests outstanding"); /* NCS_DESTROY_CLIENT_DANGLING_REQUESTS */ |
|
23 |
|
|
24 |
/* NCS Network Errors */ |
|
25 |
case 11: return new String("Client UID unknown"); /* NCS_UNKNOWN_CLIENT_UID */ |
|
26 |
case 12: return new String("Could not create new client "); /* NCS_COULDNT_CREATE_CLIENT (reason) */ |
|
27 |
case 13: return new String("Could not resolve address of Image Web Server "); /* NCS_NET_COULDNT_RESOLVE_HOST (ip or hostname) */ |
|
28 |
case 14: return new String("Could not connect to host "); /* NCS_NET_COULDNT_CONNECT (reason) */ |
|
29 |
case 15: return new String("Receive timeout"); /* NCS_NET_RECV_TIMEOUT */ |
|
30 |
case 16: return new String("Error sending header "); /* NCS_NET_HEADER_SEND_FAILURE (reason) */ |
|
31 |
case 17: return new String("Error receiving header "); /* NCS_NET_HEADER_RECV_FAILURE (reason) */ |
|
32 |
case 18: return new String("Error sending packet"); /* NCS_NET_PACKET_SEND_FAILURE */ |
|
33 |
case 19: return new String("Error receiving packet"); /* NCS_NET_PACKET_RECV_FAILURE */ |
|
34 |
case 20: return new String("401 Unauthorised"); /* NCS_NET_401_UNAUTHORISED */ |
|
35 |
case 21: return new String("403 Forbidden"); /* NCS_NET_403_FORBIDDEN */ |
|
36 |
case 22: return new String("Is the host an Image Web Server?"); /* NCS_NET_404_NOT_FOUND */ |
|
37 |
case 23: return new String("Your HTTP proxy requires authentication,\nthis is presently unsupported by the Image Web Server control"); /* NCS_NET_407_PROXYAUTH */ |
|
38 |
case 24: return new String("Unexpected HTTP response "); /* NCS_NET_UNEXPECTED_RESPONSE (resonse # or string)*/ |
|
39 |
case 25: return new String("Bad HTTP response "); /* NCS_NET_BAD_RESPONSE (resonse # or string) */ |
|
40 |
case 26: return new String("Already connected"); /* NCS_NET_ALREADY_CONNECTED */ |
|
41 |
case 27: return new String("The connection is invalid"); /* NCS_INVALID_CONNECTION */ |
|
42 |
case 28: return new String("Windows sockets failure "); /* NCS_WINSOCK_FAILURE (reason (GetLastError()) or wininet version) */ |
|
43 |
|
|
44 |
/* NCS Symbol Errors */ |
|
45 |
case 29: return new String("Symbology error"); /* NCS_SYMBOL_ERROR */ |
|
46 |
case 30: return new String("Could not open database"); /* NCS_OPEN_DB_ERROR */ |
|
47 |
case 31: return new String("Could not execute the requested query on database"); /* NCS_DB_QUERY_FAILED */ |
|
48 |
case 32: return new String("SQL statement could not be executed"); /* NCS_DB_SQL_ERROR */ |
|
49 |
case 33: return new String("Open symbol layer failed"); /* NCS_GET_LAYER_FAILED */ |
|
50 |
case 34: return new String("The database is not open"); /* NCS_DB_NOT_OPEN */ |
|
51 |
case 35: return new String("This type of quad tree is not supported"); /* NCS_QT_TYPE_UNSUPPORTED */ |
|
52 |
|
|
53 |
/* Preference errors */ |
|
54 |
case 36: return new String("Invalid local user key name specified "); /* NCS_PREF_INVALID_USER_KEY (key name) */ |
|
55 |
case 37: return new String("Invalid local machine key name specified "); /* NCS_PREF_INVALID_MACHINE_KEY (local machine key) */ |
|
56 |
case 38: return new String("Failed to open registry key "); /* NCS_REGKEY_OPENEX_FAILED (key name) */ |
|
57 |
case 39: return new String("Registry query failed "); /* NCS_REGQUERY_VALUE_FAILED (reason) */ |
|
58 |
case 40: return new String("Type mismatch in registry variable"); /* NCS_INVALID_REG_TYPE */ |
|
59 |
|
|
60 |
/* Misc errors */ |
|
61 |
case 41: return new String("Invalid arguments passed to function "); /* NCS_INVALID_ARGUMENTS (function name) */ |
|
62 |
case 42: return new String("ECW error "); /* NCS_ECW_ERROR (reason) */ |
|
63 |
case 43: return new String("Server error "); /* NCS_SERVER_ERROR (reason) */ |
|
64 |
case 44: return new String("Unknown error "); /* NCS_UNKNOWN_ERROR (reason) */ |
|
65 |
case 45: return new String("Extent conversion failed"); /* NCS_EXTENT_ERROR */ |
|
66 |
case 46: return new String("Could not allocate enough memory "); /* NCS_COULDNT_ALLOC_MEMORY (what trying to malloc) [12]*/ |
|
67 |
case 47: return new String("An invalid parameter was used "); /* NCS_INVALID_PARAMETER (reason) */ |
|
68 |
|
|
69 |
/* Compress errors */ |
|
70 |
case 48: return new String("Could not perform Read/Write on file "); /* NCS_FILEIO_ERROR (filename) */ |
|
71 |
case 49: return new String("Could not open compression task "); /* NCS_COULDNT_OPEN_COMPRESSION (reason) */ |
|
72 |
case 50: return new String("Could not perform compression "); /* NCS_COULDNT_PERFORM_COMPRESSION (reason) */ |
|
73 |
case 51: return new String("Trying to generate too many output lines"); /* NCS_GENERATED_TOO_MANY_OUTPUT_LINES */ |
|
74 |
case 52: return new String("User cancelled compression"); /* NCS_USER_CANCELLED_COMPRESSION */ |
|
75 |
case 53: return new String("Could not read line from input image file"); /* NCS_COULDNT_READ_INPUT_LINE */ |
|
76 |
case 54: return new String("Input image size exceeded for this version"); /* NCS_INPUT_SIZE_EXCEEDED */ |
|
77 |
|
|
78 |
/* Decompression Errors */ |
|
79 |
case 55: return new String("Specified image region is outside image area"); /* NCS_REGION_OUTSIDE_FILE */ |
|
80 |
case 56: return new String("Supersampling not supported"); /* NCS_NO_SUPERSAMPLE */ |
|
81 |
case 57: return new String("Specified image region has a zero width or height"); /* NCS_ZERO_SIZE */ |
|
82 |
case 58: return new String("More bands specified than exist in this file ");/* NCS_TOO_MANY_BANDS (bands passed); bands in file) */ |
|
83 |
case 59: return new String("An invalid band number has been specified "); /* NCS_INVALID_BAND_NR (bandnr) */ |
|
84 |
|
|
85 |
/* New Compression Error */ |
|
86 |
case 60: return new String("Input image size is too small to compress"); /* NCS_INPUT_SIZE_TOO_SMALL */ |
|
87 |
/* NEW Network error */ |
|
88 |
case 61: return new String("The ECWP client version is incompatible with this server "); /* NCS_INCOMPATIBLE_PROTOCOL_VERSION (clientver, server ver) */ |
|
89 |
case 62: return new String("Windows Internet Client error "); /* NCS_WININET_FAILURE (reason) */ |
|
90 |
case 63: return new String("Could not load wininet.dll "); /* NCS_COULDNT_LOAD_WININET (reason) */ |
|
91 |
|
|
92 |
/* NCSFile && NCSRenderer class errors */ |
|
93 |
case 64: return new String("Invalid SetView parameters or SetView not called."); /* NCS_FILE_INVALID_SETVIEW */ |
|
94 |
case 65: return new String("There is no open ECW file."); /* NCS_FILE_NOT_OPEN */ |
|
95 |
|
|
96 |
/* NEW JNI Java Errors */ |
|
97 |
case 66: return new String("Class does not implement ECWProgressiveDisplay interface.");/* NCS_JNI_REFRESH_NOT_IMPLEMENTED */ |
|
98 |
|
|
99 |
/* NEW Coordinate Errors */ |
|
100 |
case 67: return new String("Incompatible coordinate systems"); /* NCS_INCOMPATIBLE_COORDINATE_SYSTEMS */ |
|
101 |
case 68: return new String("Incompatible coordinate datum types"); /* NCS_INCOMPATIBLE_COORDINATE_DATUM */ |
|
102 |
case 69: return new String("Incompatible coordinate projection types"); /* NCS_INCOMPATIBLE_COORDINATE_PROJECTION */ |
|
103 |
case 70: return new String("Incompatible coordinate units types"); /* NCS_INCOMPATIBLE_COORDINATE_UNITS */ |
|
104 |
case 71: return new String("Non-linear coordinate systems not supported"); /* NCS_COORDINATE_CANNOT_BE_TRANSFORMED */ |
|
105 |
case 72: return new String("GDT Error "); /* NCS_GDT_ERROR (reason) */ |
|
106 |
case 73: return new String("Zero length packet : "); /* NCS_NET_PACKET_RECV_ZERO_LENGTH (reason) */ /**[01]**/ |
|
107 |
case 74: return new String("Must use Japanese version of the ECW SDK"); /* NCS_UNSUPPORTEDLANGUAGE */ /**[02]**/ |
|
108 |
case 75: return new String("Lost of connection to server "); /* NCS_CONNECTION_LOST */ /**[03]**/ |
|
109 |
case 76: return new String("NCSGdt coordinate conversion failed "); /* NCS_COORD_CONVERT_ERROR */ |
|
110 |
case 77: return new String("Failed to open metabase "); /* NCS_METABASE_OPEN_FAILED*/ /**[04]**/ |
|
111 |
case 78: return new String("Failed to get value from metabase "); /* NCS_METABASE_GET_FAILED*/ /**[04]**/ |
|
112 |
case 79: return new String("Timeout sending header "); /* NCS_NET_HEADER_SEND_TIMEOUT*/ /**[05]**/ |
|
113 |
case 80: return new String("Java JNI error "); /* NCS_JNI_ERROR */ /**[06]**/ |
|
114 |
case 81: return new String("No data source passed"); /* NCS_DB_INVALID_NAME */ |
|
115 |
case 82: return new String("Could not resolve address of Image Web Server Symbol Server Extension"); /* NCS_SYMBOL_COULDNT_RESOLVE_HOST */ |
|
116 |
case 83: return new String("Invalid NCSError value!"); /* NCS_INVALID_ERROR_ENUM */ /**[08]**/ |
|
117 |
/* NCSFileIO errors [10] */ |
|
118 |
case 84: return new String("End Of File reached "); /* NCS_FILE_EOF [10] */ |
|
119 |
case 85: return new String("File not found "); /* NCS_FILE_NOT_FOUND [10] */ |
|
120 |
case 86: return new String("File is invalid or corrupt "); /* NCS_FILE_INVALID [10] */ |
|
121 |
case 87: return new String("Attempted to read, write or seek past file limits "); /* NCS_FILE_SEEK_ERROR [10] */ |
|
122 |
case 88: return new String("Permissions not available to access file "); /* NCS_FILE_NO_PERMISSIONS [10] */ |
|
123 |
case 89: return new String("File open error "); /* NCS_FILE_OPEN_ERROR [10] */ |
|
124 |
case 90: return new String("File close error "); /* NCS_FILE_CLOSE_ERROR [10] */ |
|
125 |
case 91: return new String("File IO error "); /* NCS_FILE_IO_ERROR [10] */ |
|
126 |
|
|
127 |
case 92: return new String("Illegal World Coordinates "); /* NCS_SET_EXTENTS_ERROR [13] */ |
|
128 |
|
|
129 |
case 93: return new String("Image projection doesn't match controlling layer "); /* NCS_FILE_PROJECTION_MISMATCH [14] */ |
|
130 |
|
|
131 |
/** 1.65 gdt errors [15]**/ |
|
132 |
case 94: return new String("Unknown map projection "); /*NCS_GDT_UNKNOWN_PROJECTION,*/ |
|
133 |
case 95: return new String("Unknown datum "); /*NCS_GDT_UNKNOWN_DATUM,*/ |
|
134 |
case 96: return new String("User specified Geographic Projection Database data server failed while loading . Please check your network connection and if the problem persists contact the website administrator."); /*NCS_GDT_USER_SERVER_FAILED*/ |
|
135 |
case 97: return new String("Remote Geographic Projection Database file downloading has been disable and no Geographic Projection Database data is locally available"); /*NCS_GDT_REMOTE_PATH_DISABLED*/ |
|
136 |
case 98: return new String("Invalid transform mode "); /*NCS_GDT_BAD_TRANSFORM_MODE, [17]**/ |
|
137 |
|
|
138 |
case 99: return new String("coordinate to be transformed is out of bounds "); /*NCS_GDT_TRANSFORM_OUT_OF_BOUNDS*/ |
|
139 |
|
|
140 |
case 100: return new String("Layer already exists with this name "); /*NCS_LAYER_DUPLICATE_LAYER_NAME*/ /**[17]**/ |
|
141 |
case 101: return new String("Layer does not contain this parameter "); /*NCS_LAYER_INVALID_PARAMETER*/ /**[18]**/ |
|
142 |
|
|
143 |
case 102: return new String("Failed to create pipe "); /*NCS_PIPE_CREATE_FAILED*/ /**[19]**/ |
|
144 |
/* Directory creation errors */ |
|
145 |
case 103: return new String("Directory already exists "); /*[20] NCS_FILE_MKDIR_EXISTS, Directory already exists */ |
|
146 |
case 104: return new String("The path was not found "); /*[20] NCS_FILE_MKDIR_PATH_NOT_FOUND, The path for the location of the new dir does not exist */ |
|
147 |
|
|
148 |
case 105: return new String("The read was cancelled"); |
|
149 |
case 106: return new String("Error reading georeferencing data from JPEG 2000 file "); /*[21] NCS_JP2_GEODATA_READ_ERROR*/ |
|
150 |
case 107: return new String("Error writing georeferencing data to JPEG 2000 file"); /*[21] NCS_JP2_GEODATA_READ_ERROR*/ |
|
151 |
case 108: return new String("JPEG 2000 file is not or should not be georeferenced"); /*[21] NCS_JP2_GEODATA_NOT_GEOREFERENCED*/ |
|
152 |
|
|
153 |
// Insert new errors before here! |
|
154 |
case 109: return new String("Max NCSError enum value!"); /* NCS_MAX_ERROR_NUMBER */ /**[08]**/ |
|
155 |
|
|
156 |
} |
|
157 |
return new String(""); |
|
158 |
} |
|
159 |
|
|
160 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/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 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/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 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSInvalidSetViewException.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: JNCSInvalidSetViewException.java |
|
5 |
|
|
6 |
package com.ermapper.ecw; |
|
7 |
|
|
8 |
|
|
9 |
// Referenced classes of package com.ermapper.ecw: |
|
10 |
// JNCSException |
|
11 |
|
|
12 |
public class JNCSInvalidSetViewException extends JNCSException |
|
13 |
{ |
|
14 |
|
|
15 |
public JNCSInvalidSetViewException() |
|
16 |
{ |
|
17 |
} |
|
18 |
|
|
19 |
public JNCSInvalidSetViewException(String s) |
|
20 |
{ |
|
21 |
super(s); |
|
22 |
} |
|
23 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSException.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: JNCSException.java |
|
5 |
|
|
6 |
package com.ermapper.ecw; |
|
7 |
|
|
8 |
|
|
9 |
public class JNCSException extends Exception |
|
10 |
{ |
|
11 |
|
|
12 |
public JNCSException() |
|
13 |
{ |
|
14 |
} |
|
15 |
|
|
16 |
public JNCSException(String s) |
|
17 |
{ |
|
18 |
super(s); |
|
19 |
} |
|
20 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/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 |
// [01] 01-Oct-2005 nbt New call to JNI function ECWOpenArray to convert name string to char array. |
|
6 |
|
|
7 |
package com.ermapper.ecw; |
|
8 |
|
|
9 |
import com.ermapper.util.JNCSDatasetPoint; |
|
10 |
import com.ermapper.util.JNCSWorldPoint; |
|
11 |
import java.io.FileInputStream; |
|
12 |
import java.io.PrintStream; |
|
13 |
import java.lang.reflect.Field; |
|
14 |
import java.lang.reflect.Method; |
|
15 |
import java.util.Properties; |
|
16 |
|
|
17 |
// Referenced classes of package com.ermapper.ecw: |
|
18 |
// JNCSNativeLibraryException, JNCSFileOpenFailedException, JNCSInvalidSetViewException, JNCSException, |
|
19 |
// JNCSFileNotOpenException, JNCSProgressiveUpdate |
|
20 |
|
|
21 |
/** |
|
22 |
* Clase que representa a un fichero Ecw |
|
23 |
*/ |
|
24 |
|
|
25 |
public class JNCSFile |
|
26 |
implements JNCSProgressiveUpdate |
|
27 |
{ |
|
28 |
|
|
29 |
private native int ECWOpen(String s, boolean flag); |
|
30 |
|
|
31 |
private native int ECWOpenArray(String s, boolean flag, byte[] b); |
|
32 |
|
|
33 |
private native void ECWClose(boolean flag); |
|
34 |
|
|
35 |
private native int ECWSetView(int i, int ai[], int j, int k, int l, int i1, double d, double d1, double d2, double d3, |
|
36 |
int j1, int k1); |
|
37 |
|
|
38 |
private native int ECWReadLineRGBA(int ai[]); |
|
39 |
|
|
40 |
private native int ECWReadImageRGBA(int ai[], int i, int j); |
|
41 |
|
|
42 |
private native short ECWGetPercentComplete(); |
|
43 |
|
|
44 |
private static native String ECWGetErrorString(int i); |
|
45 |
|
|
46 |
private static native int NCSJNIInit(); |
|
47 |
|
|
48 |
private static native String ECWGetLibVersion(); |
|
49 |
|
|
50 |
/** |
|
51 |
* Carga la libreria libecw.so que contiene el wrapper y llama a la |
|
52 |
* funci�n de inicializaci�n |
|
53 |
* @throws JNCSNativeLibraryException |
|
54 |
*/ |
|
55 |
|
|
56 |
static void initClass() |
|
57 |
throws JNCSNativeLibraryException |
|
58 |
{ |
|
59 |
boolean flag = false; |
|
60 |
boolean flag1 = false; |
|
61 |
|
|
62 |
|
|
63 |
try |
|
64 |
{ |
|
65 |
System.loadLibrary("jecw2.0.0"); |
|
66 |
bUseNativeMethods = true; |
|
67 |
bUnsatisfiedLink = false; |
|
68 |
int i = NCSJNIInit(); |
|
69 |
if(i != 0) |
|
70 |
{ |
|
71 |
System.err.println("JNCSFile classes found on PATH failed to initialize correctly. Attempting to locate other libecw.so...."); |
|
72 |
} |
|
73 |
} |
|
74 |
catch(Exception e) |
|
75 |
{ |
|
76 |
e.printStackTrace(); |
|
77 |
} |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Constructor |
|
82 |
* @throws JNCSException |
|
83 |
*/ |
|
84 |
|
|
85 |
public JNCSFile() |
|
86 |
throws JNCSException |
|
87 |
{ |
|
88 |
bSetViewIsWorld = false; |
|
89 |
progImageClient = null; |
|
90 |
initClass(); |
|
91 |
cellSizeUnits = 0; |
|
92 |
bIsOpen = false; |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* Constructor con open del fichero. |
|
97 |
* @throws JNCSException |
|
98 |
*/ |
|
99 |
|
|
100 |
public JNCSFile(String s, boolean flag) |
|
101 |
throws JNCSException |
|
102 |
{ |
|
103 |
bSetViewIsWorld = false; |
|
104 |
progImageClient = null; |
|
105 |
initClass(); |
|
106 |
open(s, flag); |
|
107 |
} |
|
108 |
|
|
109 |
/** |
|
110 |
* Llama al close del ecw para liberar la memoria de C. |
|
111 |
* @throws Throwable |
|
112 |
*/ |
|
113 |
|
|
114 |
protected void finalize() |
|
115 |
throws Throwable |
|
116 |
{ |
|
117 |
if(bIsOpen) |
|
118 |
ECWClose(false); |
|
119 |
super.finalize(); |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* Abre el fichero de imagen. |
|
124 |
* @throws JNCSFileOpenFailedException |
|
125 |
*/ |
|
126 |
|
|
127 |
public int open(String s, boolean flag) |
|
128 |
throws JNCSFileOpenFailedException |
|
129 |
{ |
|
130 |
if(s == null) |
|
131 |
throw new IllegalArgumentException(); |
|
132 |
|
|
133 |
//int i = ECWOpen(s, flag); |
|
134 |
int i = ECWOpenArray(s, flag, s.getBytes()); |
|
135 |
|
|
136 |
if(i != 0) |
|
137 |
{ |
|
138 |
bIsOpen = false; |
|
139 |
String s1 = JNCSError.getError(i); |
|
140 |
throw new JNCSFileOpenFailedException(s1); |
|
141 |
} else |
|
142 |
{ |
|
143 |
bIsOpen = true; |
|
144 |
progressive = flag; |
|
145 |
return 0; |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 |
/** |
|
150 |
* Cierra el fichero de imagen. |
|
151 |
* @param flag par�metro para la funci�n NCScbmCloseFileViewEx |
|
152 |
*/ |
|
153 |
|
|
154 |
public void close(boolean flag) |
|
155 |
{ |
|
156 |
ECWClose(flag); |
|
157 |
if(!flag); |
|
158 |
} |
|
159 |
|
|
160 |
public void addProgressiveUpdateListener(JNCSProgressiveUpdate jncsprogressiveupdate) |
|
161 |
{ |
|
162 |
progImageClient = jncsprogressiveupdate; |
|
163 |
} |
|
164 |
|
|
165 |
public void refreshUpdate(int i, int j, double d, double d1, double d2, double d3) |
|
166 |
{ |
|
167 |
if(progImageClient != null) |
|
168 |
progImageClient.refreshUpdate(i, j, d, d1, d2, d3); |
|
169 |
} |
|
170 |
|
|
171 |
public void refreshUpdate(int i, int j, int k, int l, int i1, int j1) |
|
172 |
{ |
|
173 |
if(progImageClient != null) |
|
174 |
progImageClient.refreshUpdate(i, j, k, l, i1, j1); |
|
175 |
} |
|
176 |
|
|
177 |
/** |
|
178 |
* Crea una vista en un fichero ecw abierto dando las coordenadas de la vista |
|
179 |
* @param nBands N�mero de bandas en bandList |
|
180 |
* @param bandList Array de �ndices de bandas |
|
181 |
* @param width ancho de la vista en pixels |
|
182 |
* @param height alto de la vista en pixels |
|
183 |
* @param tlx coordenada X arriba-izquierda de la vista |
|
184 |
* @param tly coordenada Y arriba-izquierda de la vista |
|
185 |
* @param brx coordenada X abajo-derecha de la vista |
|
186 |
* @param bry coordenada Y abajo-derecha de la vista |
|
187 |
* @throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
188 |
*/ |
|
189 |
|
|
190 |
public int setView(int i, int ai[], int j, int k, int l, int i1, int j1, |
|
191 |
int k1) |
|
192 |
throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
193 |
{ |
|
194 |
if(!bIsOpen) |
|
195 |
throw new JNCSFileNotOpenException("File not open"); |
|
196 |
|
|
197 |
if (ai == null) |
|
198 |
throw new JNCSInvalidSetViewException("Wrong parameter value"); |
|
199 |
|
|
200 |
|
|
201 |
int l1 = ECWSetView(i, ai, j, k, l, i1, 0.0D, 0.0D, 0.0D, 0.0D, j1, k1); |
|
202 |
if(l1 != 0) |
|
203 |
{ |
|
204 |
//String s = ECWGetErrorString(l1); |
|
205 |
String s = JNCSError.getError(l1); |
|
206 |
throw new JNCSInvalidSetViewException(s); |
|
207 |
} else |
|
208 |
{ |
|
209 |
bSetViewIsWorld = false; |
|
210 |
return 0; |
|
211 |
} |
|
212 |
} |
|
213 |
|
|
214 |
/** |
|
215 |
* Asigna la vista pasando por par�metros los pixeles de inicio y fin y coordenadas de georreferenciaci�n solicitadas- |
|
216 |
* El cliente de esta funci�n tendr� que convertir las coordenadas reales en pixeles. |
|
217 |
*/ |
|
218 |
public int setView(int nBands, int posBands[], int iniX, int iniY, int endX, int endY, double tlX, double tlY, double brX, double brY, |
|
219 |
int bufW, int bufH)throws JNCSFileNotOpenException, JNCSInvalidSetViewException{ |
|
220 |
|
|
221 |
if(!bIsOpen) |
|
222 |
throw new JNCSFileNotOpenException("File not open"); |
|
223 |
|
|
224 |
if (posBands == null) |
|
225 |
throw new JNCSInvalidSetViewException("Wrong parameter value"); |
|
226 |
|
|
227 |
int l = ECWSetView(nBands, posBands, iniX, iniY, endX, endY, tlX, tlY, brX, brY, bufW, bufH); |
|
228 |
if(l != 0){ |
|
229 |
String s = JNCSError.getError(l); |
|
230 |
throw new JNCSInvalidSetViewException(s); |
|
231 |
}else{ |
|
232 |
bSetViewIsWorld = true; |
|
233 |
return 0; |
|
234 |
} |
|
235 |
|
|
236 |
} |
|
237 |
|
|
238 |
/** |
|
239 |
* Crea una vista en un fichero ecw abierto. |
|
240 |
* |
|
241 |
* @param nBands N�mero de bandas en bandList |
|
242 |
* @param bandList Array de �ndices de bandas |
|
243 |
* @param width ancho de la vista en pixels |
|
244 |
* @param height alto de la vista en pixels |
|
245 |
* @param dWorldTLX coordenada X arriba-izquierda) |
|
246 |
* @param dWorldTLY coordenada Y arriba-izquierda |
|
247 |
* @param dWorldBRX coordenada X abajo-derecha) |
|
248 |
* @param dWorldBRY coordenada Y abajo-derecha |
|
249 |
* @throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
250 |
*/ |
|
251 |
|
|
252 |
public int setView(int i, int ai[], double d, double d1, double d2, double d3, int j, int k) |
|
253 |
throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
254 |
{ |
|
255 |
if(!bIsOpen) |
|
256 |
throw new JNCSFileNotOpenException("File not open"); |
|
257 |
|
|
258 |
if (ai == null) |
|
259 |
throw new JNCSInvalidSetViewException("Wrong parameter value"); |
|
260 |
JNCSDatasetPoint jncsdatasetpoint = convertWorldToDataset(d, d1); |
|
261 |
JNCSDatasetPoint jncsdatasetpoint1 = convertWorldToDataset(d2, d3); |
|
262 |
int l = ECWSetView(i, ai, jncsdatasetpoint.x, jncsdatasetpoint.y, jncsdatasetpoint1.x - 1, jncsdatasetpoint1.y - 1, d, d1, d2, d3, j, k); |
|
263 |
if(l != 0) |
|
264 |
{ |
|
265 |
//String s = ECWGetErrorString(l); |
|
266 |
String s = JNCSError.getError(l); |
|
267 |
throw new JNCSInvalidSetViewException(s); |
|
268 |
} else |
|
269 |
{ |
|
270 |
bSetViewIsWorld = true; |
|
271 |
return 0; |
|
272 |
} |
|
273 |
} |
|
274 |
|
|
275 |
/** |
|
276 |
* Lee una l�nea del fichero Ecw |
|
277 |
* @param buffer Buffer donde se almacenan los datos de la l�nea |
|
278 |
* @throws JNCSException |
|
279 |
*/ |
|
280 |
|
|
281 |
public int readLineRGBA(int ai[]) |
|
282 |
throws JNCSException |
|
283 |
{ |
|
284 |
if(!bIsOpen) |
|
285 |
throw new JNCSFileNotOpenException("File not open"); |
|
286 |
int i = ECWReadLineRGBA(ai); |
|
287 |
if(i != 0) |
|
288 |
{ |
|
289 |
String s = JNCSError.getError(i); |
|
290 |
throw new JNCSException(s); |
|
291 |
} else |
|
292 |
{ |
|
293 |
return 0; |
|
294 |
} |
|
295 |
} |
|
296 |
|
|
297 |
public int readLineBGRA(int ai[]) |
|
298 |
throws JNCSException |
|
299 |
{ |
|
300 |
throw new JNCSException("Not Yet Implemented!"); |
|
301 |
} |
|
302 |
|
|
303 |
public int readLineBIL(int ai[]) |
|
304 |
throws JNCSException |
|
305 |
{ |
|
306 |
throw new JNCSException("Not Yet Implemented!"); |
|
307 |
} |
|
308 |
|
|
309 |
public int readLineBIL(double ad[]) |
|
310 |
throws JNCSException |
|
311 |
{ |
|
312 |
throw new JNCSException("Not Yet Implemented!"); |
|
313 |
} |
|
314 |
|
|
315 |
public int readImageRGBA(int ai[], int i, int j) |
|
316 |
throws JNCSException |
|
317 |
{ |
|
318 |
if(!bIsOpen) |
|
319 |
throw new JNCSFileNotOpenException("File not open"); |
|
320 |
int k = ECWReadImageRGBA(ai, i, j); |
|
321 |
if(k != 0) |
|
322 |
{ |
|
323 |
String s = JNCSError.getError(k); |
|
324 |
throw new JNCSException(s); |
|
325 |
} else |
|
326 |
{ |
|
327 |
return 0; |
|
328 |
} |
|
329 |
} |
|
330 |
|
|
331 |
/** |
|
332 |
* Obtiene una cadena que corresponde a un error a trav�s del entero que lo representa |
|
333 |
* @return String Cadena de error |
|
334 |
* @param error Entero que representa el error |
|
335 |
*/ |
|
336 |
|
|
337 |
public String getLastErrorText(int i) |
|
338 |
{ |
|
339 |
return JNCSError.getError(i); |
|
340 |
} |
|
341 |
|
|
342 |
/** |
|
343 |
* Convierte una coordenada del mundo real a coordenadas de la vista |
|
344 |
* @return JNCSDatasetPoint Clase que representa a un punto en la imagen |
|
345 |
* @param x Coordenada X del mundo real |
|
346 |
* @param y Coordenada Y del mundo real |
|
347 |
* @throws JNCSFileNotOpenException |
|
348 |
*/ |
|
349 |
|
|
350 |
public JNCSDatasetPoint convertWorldToDataset(double d, double d1) |
|
351 |
throws JNCSFileNotOpenException |
|
352 |
{ |
|
353 |
int i; |
|
354 |
int j; |
|
355 |
if(bIsOpen) |
|
356 |
{ |
|
357 |
i = (int)Math.round((d - originX) / cellIncrementX); |
|
358 |
j = (int)Math.round((d1 - originY) / cellIncrementY); |
|
359 |
} else |
|
360 |
{ |
|
361 |
throw new JNCSFileNotOpenException(); |
|
362 |
} |
|
363 |
return new JNCSDatasetPoint(i, j); |
|
364 |
} |
|
365 |
|
|
366 |
/** |
|
367 |
* Convierte una coordenada de la vista a coordenadas del mundo real |
|
368 |
* @return JNCSWorldPoint Clase que representa una coordenada del mundo real |
|
369 |
* @param x Coordenada X de la imagen |
|
370 |
* @param y Coordenada Y de la imagen |
|
371 |
* @throws JNCSFileNotOpenException |
|
372 |
*/ |
|
373 |
|
|
374 |
public JNCSWorldPoint convertDatasetToWorld(int i, int j) |
|
375 |
throws JNCSFileNotOpenException |
|
376 |
{ |
|
377 |
double d; |
|
378 |
double d1; |
|
379 |
if(bIsOpen) |
|
380 |
{ |
|
381 |
d = originX + (double)i * cellIncrementX; |
|
382 |
d1 = originY + (double)j * cellIncrementY; |
|
383 |
} else |
|
384 |
{ |
|
385 |
throw new JNCSFileNotOpenException(); |
|
386 |
} |
|
387 |
return new JNCSWorldPoint(d, d1); |
|
388 |
} |
|
389 |
|
|
390 |
public short getPercentComplete() |
|
391 |
{ |
|
392 |
return ECWGetPercentComplete(); |
|
393 |
} |
|
394 |
|
|
395 |
/** |
|
396 |
* Obtiene una cadena con la versi�n de la libreria |
|
397 |
* @return versi�n |
|
398 |
*/ |
|
399 |
|
|
400 |
public static String getLibVersion() |
|
401 |
{ |
|
402 |
return ECWGetLibVersion(); |
|
403 |
} |
|
404 |
|
|
405 |
private static void debug(String s) |
|
406 |
{ |
|
407 |
if(debug) |
|
408 |
System.out.println(s); |
|
409 |
} |
|
410 |
|
|
411 |
private static boolean bUseNativeMethods = false; |
|
412 |
private static boolean bSecurityError = false; |
|
413 |
private static boolean bUnsatisfiedLink = false; |
|
414 |
static boolean bHaveClassInit = false; |
|
415 |
static boolean debug = false; |
|
416 |
public static final int ECW_CELL_UNITS_INVALID = 0; |
|
417 |
public static final int ECW_CELL_UNITS_METERS = 1; |
|
418 |
public static final int ECW_CELL_UNITS_DEGREES = 2; |
|
419 |
public static final int ECW_CELL_UNITS_FEET = 3; |
|
420 |
public int numBands; |
|
421 |
public int width; |
|
422 |
public int height; |
|
423 |
public double originX; |
|
424 |
public double originY; |
|
425 |
public double cellIncrementX; |
|
426 |
public double cellIncrementY; |
|
427 |
public int cellSizeUnits; |
|
428 |
public double compressionRate; |
|
429 |
public boolean progressive; |
|
430 |
public String fileName; |
|
431 |
public String datum; |
|
432 |
public String projection; |
|
433 |
public boolean bIsOpen; |
|
434 |
private long nativeDataPointer; |
|
435 |
private static final boolean doGarbageCollectionOnClose = false; |
|
436 |
private static final int ECW_OK = 0; |
|
437 |
private int nFileSetViewDatasetTLX; |
|
438 |
private int nFileSetViewDatasetTLY; |
|
439 |
private int nFileSetViewDatasetBRX; |
|
440 |
private int nFileSetViewDatasetBRY; |
|
441 |
private int nFileSetViewWidth; |
|
442 |
private int nFileSetViewHeight; |
|
443 |
private double dFileSetViewWorldTLX; |
|
444 |
private double dFileSetViewWorldTLY; |
|
445 |
private double dFileSetViewWorldBRX; |
|
446 |
private double dFileSetViewWorldBRY; |
|
447 |
private boolean bSetViewIsWorld; |
|
448 |
protected JNCSProgressiveUpdate progImageClient; |
|
449 |
|
|
450 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSFileNotOpenException.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: JNCSFileNotOpenException.java |
|
5 |
|
|
6 |
package com.ermapper.ecw; |
|
7 |
|
|
8 |
|
|
9 |
// Referenced classes of package com.ermapper.ecw: |
|
10 |
// JNCSException |
|
11 |
|
|
12 |
public class JNCSFileNotOpenException extends JNCSException |
|
13 |
{ |
|
14 |
|
|
15 |
public JNCSFileNotOpenException() |
|
16 |
{ |
|
17 |
} |
|
18 |
|
|
19 |
public JNCSFileNotOpenException(String s) |
|
20 |
{ |
|
21 |
super(s); |
|
22 |
} |
|
23 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/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 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSFileOpenFailedException.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: JNCSFileOpenFailedException.java |
|
5 |
|
|
6 |
package com.ermapper.ecw; |
|
7 |
|
|
8 |
|
|
9 |
// Referenced classes of package com.ermapper.ecw: |
|
10 |
// JNCSException |
|
11 |
|
|
12 |
public class JNCSFileOpenFailedException extends JNCSException |
|
13 |
{ |
|
14 |
|
|
15 |
public JNCSFileOpenFailedException() |
|
16 |
{ |
|
17 |
} |
|
18 |
|
|
19 |
public JNCSFileOpenFailedException(String s) |
|
20 |
{ |
|
21 |
super(s); |
|
22 |
} |
|
23 |
} |
tags/v2_0_0_Build_2027/libjni-ecw/src/main/java/com/ermapper/ecw/JNCSRenderer.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: JNCSRenderer.java |
|
5 |
|
|
6 |
package com.ermapper.ecw; |
|
7 |
|
|
8 |
import com.ermapper.util.JNCSDatasetPoint; |
|
9 |
import com.ermapper.util.JNCSWorldPoint; |
|
10 |
import java.awt.*; |
|
11 |
import java.awt.image.*; |
|
12 |
import java.io.PrintStream; |
|
13 |
import java.util.StringTokenizer; |
|
14 |
|
|
15 |
// Referenced classes of package com.ermapper.ecw: |
|
16 |
// JNCSFile, JNCSException, JNCSFileOpenFailedException, JNCSFileNotOpenException, |
|
17 |
// JNCSInvalidSetViewException, JNCSProgressiveUpdate |
|
18 |
|
|
19 |
public class JNCSRenderer extends JNCSFile |
|
20 |
{ |
|
21 |
|
|
22 |
public JNCSRenderer() |
|
23 |
throws JNCSException |
|
24 |
{ |
|
25 |
pRGBArray = null; |
|
26 |
outputDeviceCoords = new double[4]; |
|
27 |
ecwImage = null; |
|
28 |
prevImageSizeX = -1; |
|
29 |
prevImageSizeY = -1; |
|
30 |
bHaveValidSetView = false; |
|
31 |
transparencyValue = 1.0F; |
|
32 |
alphaComposite = null; |
|
33 |
memImSource = null; |
|
34 |
} |
|
35 |
|
|
36 |
public JNCSRenderer(String s, boolean flag) |
|
37 |
throws JNCSFileOpenFailedException, JNCSException |
|
38 |
{ |
|
39 |
pRGBArray = null; |
|
40 |
outputDeviceCoords = new double[4]; |
|
41 |
ecwImage = null; |
|
42 |
prevImageSizeX = -1; |
|
43 |
prevImageSizeY = -1; |
|
44 |
bHaveValidSetView = false; |
|
45 |
transparencyValue = 1.0F; |
|
46 |
alphaComposite = null; |
|
47 |
memImSource = null; |
|
48 |
open(s, flag); |
|
49 |
} |
|
50 |
|
|
51 |
public void setTransparency(float f) |
|
52 |
{ |
|
53 |
transparencyValue = f; |
|
54 |
if(bHave1_2VM) |
|
55 |
alphaComposite = AlphaComposite.getInstance(3, transparencyValue); |
|
56 |
} |
|
57 |
|
|
58 |
public int setView(int i, int ai[], int j, int k, int l, int i1, int j1, |
|
59 |
int k1) |
|
60 |
throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
61 |
{ |
|
62 |
int l1 = j; |
|
63 |
int i2 = k; |
|
64 |
int j2 = l; |
|
65 |
int k2 = i1; |
|
66 |
if(j < 0) |
|
67 |
l1 = 0; |
|
68 |
if(k < 0) |
|
69 |
i2 = 0; |
|
70 |
if(l > super.width - 1) |
|
71 |
j2 = super.width - 1; |
|
72 |
if(i1 > super.height - 1) |
|
73 |
k2 = super.height - 1; |
|
74 |
int l2 = (int)Math.round(((double)(l1 - j) / (double)(l - j)) * (double)j1); |
|
75 |
int i3 = (int)Math.round(((double)(i2 - k) / (double)(i1 - k)) * (double)k1); |
|
76 |
int j3 = (int)Math.round(((double)(j2 - j) / (double)(l - j)) * (double)j1); |
|
77 |
int k3 = (int)Math.round(((double)(k2 - k) / (double)(i1 - k)) * (double)k1); |
|
78 |
super.setView(i, ai, l1, i2, j2, k2, j3 - l2, k3 - i3); |
|
79 |
bHaveValidSetView = true; |
|
80 |
if(!super.progressive) |
|
81 |
{ |
|
82 |
dRendererSetViewDatasetTLX = l1; |
|
83 |
dRendererSetViewDatasetTLY = l1; |
|
84 |
dRendererSetViewDatasetBRX = j2; |
|
85 |
dRendererSetViewDatasetBRY = k2; |
|
86 |
dRendererSetViewWidth = j3 - l2; |
|
87 |
dRendererSetViewHeight = k3 - i3; |
|
88 |
} |
|
89 |
return 0; |
|
90 |
} |
|
91 |
|
|
92 |
public int setView(int i, int ai[], double d, double d1, double d2, double d3, int j, int k) |
|
93 |
throws JNCSFileNotOpenException, JNCSInvalidSetViewException |
|
94 |
{ |
|
95 |
JNCSDatasetPoint jncsdatasetpoint = convertWorldToDataset(d, d1); |
|
96 |
JNCSDatasetPoint jncsdatasetpoint1 = convertWorldToDataset(d2, d3); |
|
97 |
double d4 = d; |
|
98 |
double d5 = d1; |
|
99 |
double d6 = d2; |
|
100 |
double d7 = d3; |
|
101 |
jncsdatasetpoint.x = (int)Math.floor((d4 - super.originX) / super.cellIncrementX); |
|
102 |
jncsdatasetpoint.y = (int)Math.floor((d5 - super.originY) / super.cellIncrementY); |
|
103 |
jncsdatasetpoint1.x = (int)Math.ceil((d6 - super.originX) / super.cellIncrementX); |
|
104 |
jncsdatasetpoint1.y = (int)Math.ceil((d7 - super.originY) / super.cellIncrementY); |
|
105 |
JNCSWorldPoint jncsworldpoint = convertDatasetToWorld(jncsdatasetpoint.x, jncsdatasetpoint.y); |
|
106 |
JNCSWorldPoint jncsworldpoint1 = convertDatasetToWorld(jncsdatasetpoint1.x, jncsdatasetpoint1.y); |
|
107 |
d4 = jncsworldpoint.x; |
|
108 |
d5 = jncsworldpoint.y; |
|
109 |
d6 = jncsworldpoint1.x; |
|
110 |
d7 = jncsworldpoint1.y; |
|
111 |
if(jncsdatasetpoint.x < 0) |
|
112 |
d4 = super.originX; |
|
113 |
if(jncsdatasetpoint.y < 0) |
|
114 |
d5 = super.originY; |
|
115 |
if(jncsdatasetpoint1.x > super.width - 1) |
|
116 |
d6 = super.originX + (double)(super.width - 1) * super.cellIncrementX; |
|
117 |
if(jncsdatasetpoint1.y > super.height - 1) |
|
118 |
d7 = super.originY + (double)(super.height - 1) * super.cellIncrementY; |
|
119 |
if(jncsdatasetpoint.x < 0 && jncsdatasetpoint1.x < 0 || jncsdatasetpoint.x > super.width - 1 && jncsdatasetpoint1.x > super.width - 1) |
|
120 |
{ |
|
121 |
bHaveValidSetView = false; |
|
122 |
return 1; |
|
123 |
} |
|
124 |
if(jncsdatasetpoint.y < 0 && jncsdatasetpoint1.y < 0 || jncsdatasetpoint.y > super.height - 1 && jncsdatasetpoint1.y > super.height - 1) |
|
125 |
{ |
|
126 |
bHaveValidSetView = false; |
|
127 |
return 1; |
|
128 |
} |
|
129 |
int l = (int)Math.round(((d4 - d) / (d2 - d)) * (double)j); |
|
130 |
int i1 = (int)Math.round(((d5 - d1) / (d3 - d1)) * (double)k); |
|
131 |
int j1 = (int)Math.round(((d6 - d) / (d2 - d)) * (double)j); |
|
132 |
int k1 = (int)Math.round(((d7 - d1) / (d3 - d1)) * (double)k); |
|
133 |
if(j1 - l > jncsdatasetpoint1.x - jncsdatasetpoint.x) |
|
134 |
{ |
|
135 |
j1 = jncsdatasetpoint1.x; |
|
136 |
l = jncsdatasetpoint.x; |
|
137 |
} |
|
138 |
if(k1 - i1 > jncsdatasetpoint1.y - jncsdatasetpoint.y) |
|
139 |
{ |
|
140 |
k1 = jncsdatasetpoint1.y; |
|
141 |
i1 = jncsdatasetpoint.y; |
|
142 |
} |
|
143 |
if(j1 - l < 1 || k1 - i1 < 1) |
|
144 |
{ |
|
145 |
bHaveValidSetView = false; |
|
146 |
return 1; |
|
147 |
} |
|
148 |
super.setView(i, ai, d4, d5, d6, d7, j1 - l, k1 - i1); |
|
149 |
bHaveValidSetView = true; |
|
150 |
if(!super.progressive) |
|
151 |
{ |
|
152 |
dRendererSetViewWorldTLX = d4; |
|
153 |
dRendererSetViewWorldTLY = d5; |
|
154 |
dRendererSetViewWorldBRX = d6; |
|
155 |
dRendererSetViewWorldBRY = d7; |
|
156 |
dRendererSetViewWidth = j1 - l; |
|
157 |
dRendererSetViewHeight = k1 - i1; |
|
158 |
} |
|
159 |
return 0; |
|
160 |
} |
|
161 |
|
|
162 |
public void refreshUpdate(int i, int j, double d, double d1, double d2, double d3) |
|
163 |
{ |
|
164 |
ecwReadImage(i, j, d, d1, d2, d3); |
|
165 |
if(super.progImageClient != null) |
|
166 |
super.progImageClient.refreshUpdate(i, j, d, d1, d2, d3); |
|
167 |
} |
|
168 |
|
|
169 |
public void refreshUpdate(int i, int j, int k, int l, double d, int i1) |
|
170 |
{ |
|
171 |
ecwReadImage(i, j, k, l, d, i1); |
|
172 |
if(super.progImageClient != null) |
|
173 |
super.progImageClient.refreshUpdate(i, j, k, l, d, i1); |
Also available in: Unified diff