Revision 1414
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/prepare-workspace.xml | ||
---|---|---|
1 |
<project name="org.gvsig.initial.build" default="prepare-workspace"> |
|
2 |
|
|
3 |
<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" /> |
|
4 |
|
|
5 |
<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." /> |
|
6 |
<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" /> |
|
7 |
<property name="build.jar.version" value="1.0.8-SNAPSHOT" /> |
|
8 |
<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" /> |
|
9 |
|
|
10 |
<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" /> |
|
11 |
|
|
12 |
<target name="check-maven-base-build-available"> |
|
13 |
<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" /> |
|
14 |
</target> |
|
15 |
|
|
16 |
<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available"> |
|
17 |
<!-- Unzip de build jar file from the maven repository into the workspace root folder --> |
|
18 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
19 |
<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}"> |
|
20 |
<patternset> |
|
21 |
<exclude name="META-INF/**" /> |
|
22 |
</patternset> |
|
23 |
</zipfileset> |
|
24 |
</copy> |
|
25 |
</target> |
|
26 |
|
|
27 |
<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available"> |
|
28 |
<mkdir dir="target" /> |
|
29 |
|
|
30 |
<!-- Download the build jar file --> |
|
31 |
<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" /> |
|
32 |
|
|
33 |
<!-- Unzip de build jar file into the workspace root folder --> |
|
34 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
35 |
<zipfileset src="target/${build.jar.file}"> |
|
36 |
<patternset> |
|
37 |
<exclude name="META-INF/**" /> |
|
38 |
</patternset> |
|
39 |
</zipfileset> |
|
40 |
</copy> |
|
41 |
|
|
42 |
</target> |
|
43 |
|
|
44 |
<target name="find.depends.natives.file"> |
|
45 |
<condition property="depends.natives.file.exists"> |
|
46 |
<available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/> |
|
47 |
</condition> |
|
48 |
</target> |
|
49 |
|
|
50 |
<target name="find.gvsig.platform.properties.file" |
|
51 |
depends="find.depends.natives.file" |
|
52 |
if="depends.natives.file.exists"> |
|
53 |
<condition property="gvsig.platform.exists"> |
|
54 |
<available file="${user.home}/.gvsig.platform.properties"/> |
|
55 |
</condition> |
|
56 |
</target> |
|
57 |
|
|
58 |
<target name="check.gvsig.platform.properties" |
|
59 |
depends="find.gvsig.platform.properties.file"> |
|
60 |
<fail if="depends.natives.file.exists" unless="gvsig.platform.exists"> |
|
61 |
ERROR!! |
|
62 |
|
|
63 |
You have to define your gvSIG platform properties, |
|
64 |
by creating the file: ${user.home}/.gvsig.platform.properties |
|
65 |
with the following content: |
|
66 |
|
|
67 |
native_platform=linux |
|
68 |
native_distribution=all |
|
69 |
native_compiler=gcc4 |
|
70 |
native_arch=i386 |
|
71 |
native_libraryType=dynamic |
|
72 |
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType} |
|
73 |
|
|
74 |
Replace the fifth initial variables values with the ones appropiate |
|
75 |
to your platform. |
|
76 |
|
|
77 |
If you use maven in the command line, you can use the previous file also |
|
78 |
to define the MAVEN_OPTS environment variable, by adding to your |
|
79 |
.bash_rc file something like this: |
|
80 |
|
|
81 |
if [ -f "${HOME}/.gvsig.platform.properties" ] |
|
82 |
then |
|
83 |
. ${HOME}/.gvsig.platform.properties |
|
84 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}" |
|
85 |
else |
|
86 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m" |
|
87 |
fi |
|
88 |
|
|
89 |
It will work if you use the bash shell. In any other case or platform, you'll |
|
90 |
have to define your MAVEN_OPTS environment variable and set the |
|
91 |
"native-classifier" parameter directly. |
|
92 |
</fail> |
|
93 |
|
|
94 |
</target> |
|
95 |
|
|
96 |
<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties"> |
|
97 |
|
|
98 |
<mkdir dir="target" /> |
|
99 |
|
|
100 |
<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" /> |
|
101 |
|
|
102 |
<!-- Copy the maven launchers to the workspace metadata folder --> |
|
103 |
<copy todir="${workspace.basedir}/.metadata"> |
|
104 |
<fileset dir="${build.basedir}/eclipse-launchers"> |
|
105 |
<exclude name="**/org.eclipse.jdt.core.prefs" /> |
|
106 |
<exclude name="**/org.eclipse.core.variables.prefs" /> |
|
107 |
</fileset> |
|
108 |
</copy> |
|
109 |
|
|
110 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true"> |
|
111 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" /> |
|
112 |
</concat> |
|
113 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true"> |
|
114 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" /> |
|
115 |
</concat> |
|
116 |
|
|
117 |
<!-- Configure the eclipse workspace --> |
|
118 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
|
119 |
|
|
120 |
<!-- Configure the gvSIG profile --> |
|
121 |
<ant antfile="${build.basedir}/check-gvsig-profile.xml" /> |
|
122 |
|
|
123 |
<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
|
124 |
|
|
125 |
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> |
|
126 |
<classpath> |
|
127 |
<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" /> |
|
128 |
</classpath> |
|
129 |
</taskdef> |
|
130 |
|
|
131 |
<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
|
132 |
<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" /> |
|
133 |
</xmltask> |
|
134 |
|
|
135 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
136 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
137 |
|
|
138 |
<!-- Compile, install and generate eclipse projects --> |
|
139 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
|
140 |
|
|
141 |
<echo>INFORMATION!!!</echo> |
|
142 |
<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
|
143 |
|
|
144 |
<!-- TODO: copiar al proyecto de configuración general --> |
|
145 |
</target> |
|
146 |
|
|
147 |
<target name="clean"> |
|
148 |
<delete dir="target" /> |
|
149 |
</target> |
|
150 |
|
|
151 |
</project> |
|
0 | 152 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.raster.lizardtech</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>2.0.0-SNAPSHOT</version> |
|
7 |
<name>org.gvsig.raster.lizardtech</name> |
|
8 |
<description>Lizardtech SDK data provider for gvSIG</description> |
|
9 |
<inceptionYear>2011</inceptionYear> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>gvsig-base-pom</artifactId> |
|
13 |
<version>2.0-SNAPSHOT</version> |
|
14 |
</parent> |
|
15 |
<scm> |
|
16 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.app/trunk/org.gvsig.raster.app</connection> |
|
17 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.app/trunk/org.gvsig.raster.app</developerConnection> |
|
18 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.lizardtech/trunk/org.gvsig.raster.lizardtech</url> |
|
19 |
</scm> |
|
20 |
<developers> |
|
21 |
<developer> |
|
22 |
<id>nbrodin</id> |
|
23 |
<name>Nacho Brodin</name> |
|
24 |
<email>nachobrodin@gmail.com</email> |
|
25 |
<roles> |
|
26 |
<role>Architect</role> |
|
27 |
<role>Developer</role> |
|
28 |
</roles> |
|
29 |
</developer> |
|
30 |
</developers> |
|
31 |
<properties> |
|
32 |
<build-dir>${basedir}/../build</build-dir> |
|
33 |
</properties> |
|
34 |
<modules> |
|
35 |
<module>org.gvsig.raster.lizardtech.io</module> |
|
36 |
<module>org.gvsig.raster.lizardtech.app</module> |
|
37 |
</modules> |
|
38 |
</project> |
|
0 | 39 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/src/main/java/org/gvsig/raster/lizardtech/app/LizardTechExtension.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.raster.lizardtech.app; |
|
23 |
|
|
24 |
import org.gvsig.andami.plugins.Extension; |
|
25 |
|
|
26 |
/** |
|
27 |
* Entry point for this extension |
|
28 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
29 |
*/ |
|
30 |
public class LizardTechExtension extends Extension { |
|
31 |
|
|
32 |
public void execute(String actionCommand) { |
|
33 |
} |
|
34 |
|
|
35 |
public void initialize() { |
|
36 |
} |
|
37 |
|
|
38 |
public boolean isEnabled() { |
|
39 |
return false; |
|
40 |
} |
|
41 |
|
|
42 |
public boolean isVisible() { |
|
43 |
return false; |
|
44 |
} |
|
45 |
|
|
46 |
} |
|
0 | 47 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/src/main/resources/install/install.xml | ||
---|---|---|
1 |
<project name="org.gvsig.plugin1" default="main" basedir="."> |
|
2 |
<target name="main" depends="copy_files, link"/> |
|
3 |
<target name="copy_files"> |
|
4 |
<copy todir="${gvsig_dir}"> |
|
5 |
<fileset dir="./files" includes="**"/> |
|
6 |
</copy> |
|
7 |
</target> |
|
8 |
<target name="link" depends="checkos" if="linuxos"> |
|
9 |
<exec executable="ln" > |
|
10 |
<arg value="-s"/> |
|
11 |
<arg value="${gvsig_dir}/native/libNCSCnet.so.0"/> |
|
12 |
<arg value="${gvsig_dir}/native/libNCSCnet.so"/> |
|
13 |
</exec> |
|
14 |
<exec executable="ln" > |
|
15 |
<arg value="-s"/> |
|
16 |
<arg value="${gvsig_dir}/native/libNCSEcwC.so.0"/> |
|
17 |
<arg value="${gvsig_dir}/native/libNCSEcwC.so"/> |
|
18 |
</exec> |
|
19 |
<exec executable="ln" > |
|
20 |
<arg value="-s"/> |
|
21 |
<arg value="${gvsig_dir}/native/libNCSEcw.so.0"/> |
|
22 |
<arg value="${gvsig_dir}/native/libNCSEcw.so"/> |
|
23 |
</exec> |
|
24 |
<exec executable="ln" > |
|
25 |
<arg value="-s"/> |
|
26 |
<arg value="${gvsig_dir}/native/libNCSUtil.so.0"/> |
|
27 |
<arg value="${gvsig_dir}/native/libNCSUtil.so"/> |
|
28 |
</exec> |
|
29 |
</target> |
|
30 |
<target name="checkos"> |
|
31 |
<condition property="linuxos"> |
|
32 |
<os family="unix" /> |
|
33 |
</condition> |
|
34 |
</target> |
|
35 |
</project> |
|
0 | 36 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/src/main/resources/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<depends plugin-name="org.gvsig.app" /> |
|
4 |
<depends plugin-name="org.gvsig.raster.tilecache.app" /> |
|
5 |
<libraries library-dir="lib"/> |
|
6 |
<resourceBundle name="text"/> |
|
7 |
<extensions> |
|
8 |
<extension class-name="org.gvsig.raster.lizardtech.app.LizardTechExtension" |
|
9 |
description="" |
|
10 |
active="true" |
|
11 |
priority="1"> |
|
12 |
</extension> |
|
13 |
</extensions> |
|
14 |
</plugin-config> |
|
0 | 15 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.raster.lizardtech.app</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>Formats: MrSID file format support</name> |
|
9 |
<description>Lizardtech data provider (MrSID) for gvSIG</description> |
|
10 |
<version>2.0.0-SNAPSHOT</version> |
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.maven.base.extension.pom</artifactId> |
|
14 |
<version>1.0.8-SNAPSHOT</version> |
|
15 |
</parent> |
|
16 |
<dependencies> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.andami</artifactId> |
|
20 |
<version>2.0-SNAPSHOT</version> |
|
21 |
<scope>compile</scope> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>org.gvsig</groupId> |
|
25 |
<artifactId>org.gvsig.raster.lizardtech.io</artifactId> |
|
26 |
<version>2.0.0-SNAPSHOT</version> |
|
27 |
<scope>runtime</scope> |
|
28 |
</dependency> |
|
29 |
</dependencies> |
|
30 |
<profiles> |
|
31 |
<profile> |
|
32 |
<id>gvsig-install</id> |
|
33 |
<activation> |
|
34 |
<activeByDefault>true</activeByDefault> |
|
35 |
</activation> |
|
36 |
<properties> |
|
37 |
<!--Default gvSIG installation folder relative to the current workspace--> |
|
38 |
<gvsig.install.dir>${basedir}/../../build/product</gvsig.install.dir> |
|
39 |
</properties> |
|
40 |
</profile> |
|
41 |
<profile> |
|
42 |
<id>linux-profile</id> |
|
43 |
<activation> |
|
44 |
<property> |
|
45 |
<name>native-platform</name> |
|
46 |
<value>linux</value> |
|
47 |
</property> |
|
48 |
</activation> |
|
49 |
<properties> |
|
50 |
<package.info.categories>Raster</package.info.categories> |
|
51 |
<package.info.operatingSystem>lin</package.info.operatingSystem> |
|
52 |
<package.info.architecture>x86</package.info.architecture> |
|
53 |
<extension.distribution.file>distribution/distribution-lin.xml</extension.distribution.file> |
|
54 |
<package.info.dependencies>required: org.gvsig.raster.tilecache.app -ge 2</package.info.dependencies> |
|
55 |
</properties> |
|
56 |
</profile> |
|
57 |
<profile> |
|
58 |
<id>windows-profile</id> |
|
59 |
<activation> |
|
60 |
<property> |
|
61 |
<name>native-platform</name> |
|
62 |
<value>win</value> |
|
63 |
</property> |
|
64 |
</activation> |
|
65 |
<properties> |
|
66 |
<package.info.categories>Raster, Formats</package.info.categories> |
|
67 |
<package.info.operatingSystem>win</package.info.operatingSystem> |
|
68 |
<package.info.architecture>x86</package.info.architecture> |
|
69 |
<extension.distribution.file>distribution/distribution-win.xml</extension.distribution.file> |
|
70 |
<package.info.dependencies>required: org.gvsig.raster.tilecache.app -ge 2</package.info.dependencies> |
|
71 |
</properties> |
|
72 |
</profile> |
|
73 |
</profiles> |
|
74 |
<properties> |
|
75 |
<package.info.state>testing</package.info.state> |
|
76 |
<package.info.baseDownloadURL>http://devel.gvsig.org/download/projects/Raster/pool/org.gvsig.raster.lizardtech.app</package.info.baseDownloadURL> |
|
77 |
</properties> |
|
78 |
</project> |
|
0 | 79 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/distribution/distribution-win.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Estructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>src/main/resources</directory> |
|
10 |
<outputDirectory>${extension.install.dir.name} |
|
11 |
</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
</fileSets> |
|
14 |
<files> |
|
15 |
<file> |
|
16 |
<source>package.info</source> |
|
17 |
<outputDirectory>${extension.install.dir.name}</outputDirectory> |
|
18 |
</file> |
|
19 |
<file> |
|
20 |
<source>${user.home}/.depman/bin/jmrsid2.0.0.dll</source> |
|
21 |
<outputDirectory>${extension.install.dir.name}/install/files</outputDirectory> |
|
22 |
</file> |
|
23 |
<file> |
|
24 |
<source>${user.home}/.depman/bin/lti_dsdk_cdll.dll</source> |
|
25 |
<outputDirectory>${extension.install.dir.name}/install/files</outputDirectory> |
|
26 |
</file> |
|
27 |
<file> |
|
28 |
<source>${user.home}/.depman/bin/lti_dsdk_dll.dll</source> |
|
29 |
<outputDirectory>${extension.install.dir.name}/install/files</outputDirectory> |
|
30 |
</file> |
|
31 |
</files> |
|
32 |
<dependencySets> |
|
33 |
<dependencySet> |
|
34 |
<useProjectAttachments>true</useProjectAttachments> |
|
35 |
<outputDirectory>${extension.install.dir.name}/lib |
|
36 |
</outputDirectory> |
|
37 |
<includes> |
|
38 |
<include>org.gvsig:org.gvsig.raster.lizardtech.app:jar</include> |
|
39 |
<include>org.gvsig:org.gvsig.raster.lizardtech.io:jar</include> |
|
40 |
<include>org.gvsig:org.gvsig.jmrsid:jar</include> |
|
41 |
</includes> |
|
42 |
</dependencySet> |
|
43 |
</dependencySets> |
|
44 |
</assembly> |
|
0 | 45 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/distribution/distribution-lin.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Estructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>src/main/resources</directory> |
|
10 |
<outputDirectory>${extension.install.dir.name} |
|
11 |
</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
</fileSets> |
|
14 |
<files> |
|
15 |
<file> |
|
16 |
<source>package.info</source> |
|
17 |
<outputDirectory>${extension.install.dir.name}</outputDirectory> |
|
18 |
</file> |
|
19 |
<file> |
|
20 |
<source>${user.home}/.depman/lib/libjmrsid2.0.0.so</source> |
|
21 |
<outputDirectory>${extension.install.dir.name}/install/files/native</outputDirectory> |
|
22 |
</file> |
|
23 |
</files> |
|
24 |
<dependencySets> |
|
25 |
<dependencySet> |
|
26 |
<useProjectAttachments>true</useProjectAttachments> |
|
27 |
<outputDirectory>${extension.install.dir.name}/lib |
|
28 |
</outputDirectory> |
|
29 |
<includes> |
|
30 |
<include>org.gvsig:org.gvsig.raster.lizardtech.app:jar</include> |
|
31 |
<include>org.gvsig:org.gvsig.raster.lizardtech.io:jar</include> |
|
32 |
<include>org.gvsig:org.gvsig.jmrsid:jar</include> |
|
33 |
</includes> |
|
34 |
</dependencySet> |
|
35 |
</dependencySets> |
|
36 |
</assembly> |
|
0 | 37 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.app/buildNumber.properties | ||
---|---|---|
1 |
#maven.buildNumber.plugin properties file |
|
2 |
#Thu Jan 24 08:54:29 CET 2013 |
|
3 |
buildNumber=25 |
|
0 | 4 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/LTIImage.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: LTIImage.java 8460 2006-10-31 16:26:34Z nacho $ |
|
3 |
* |
|
4 |
* Name: LTIImage.java |
|
5 |
* Project: JMRSID. Interface java to mrsid (Lizardtech). |
|
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.jmrsid; |
|
52 |
|
|
53 |
|
|
54 |
/** |
|
55 |
* Clase base que representa a una im�gen. |
|
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 LTIImage extends JNIBase{ |
|
62 |
|
|
63 |
private int[] magsize=new int[2]; |
|
64 |
private native long getMetadataNat(long cPtr); |
|
65 |
private native int getDimsAtMagWidthNat(long cPtr, double mag); |
|
66 |
private native int getDimsAtMagHeightNat(long cPtr, double mag); |
|
67 |
private native long getPixelPropsNat(long cPtr); |
|
68 |
private native long getBackgroundPixelNat(long cPtr); |
|
69 |
private native long getNoDataPixelNat(long cPtr); |
|
70 |
private native int getGeoCoordNat(long cPtr, LTIGeoCoord geocoord); |
|
71 |
private native void FreeLTIImageNat(long cPtr); |
|
72 |
private native double getMinMagnificationNat(long cPtr); |
|
73 |
private native double getMaxMagnificationNat(long cPtr); |
|
74 |
|
|
75 |
LTIGeoCoord geocoord=null; |
|
76 |
|
|
77 |
public LTIImage(){} |
|
78 |
|
|
79 |
/** |
|
80 |
* Constructor |
|
81 |
* @param cPtr direcci�n de memoria al objeto LTIImage de C. |
|
82 |
*/ |
|
83 |
public LTIImage(long cPtr){ |
|
84 |
this.cPtr=cPtr; |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* Destructor |
|
89 |
*/ |
|
90 |
protected void finalize(){ |
|
91 |
if(cPtr != 0){ |
|
92 |
FreeLTIImageNat(cPtr); |
|
93 |
cPtr = -1; |
|
94 |
} |
|
95 |
} |
|
96 |
|
|
97 |
|
|
98 |
/** |
|
99 |
* Inicializa el objeto im�gen. |
|
100 |
* @throws MrSIDException, IOException |
|
101 |
*/ |
|
102 |
public void initialize()throws MrSIDException{ |
|
103 |
|
|
104 |
String msg1="Error en initialize. El Open del MrSID no tuvo �xito"; |
|
105 |
String msg2="La llamada nativa a initialize ha devuelto un c�digo de error"; |
|
106 |
int codigo = 0;//super.baseSimpleFunction(1,msg1,msg2); |
|
107 |
|
|
108 |
if( codigo > 0) |
|
109 |
throw new MrSIDException("La llamada nativa a initialize ha devuelto el c�digo de error "+codigo); |
|
110 |
|
|
111 |
} |
|
112 |
|
|
113 |
|
|
114 |
/** |
|
115 |
* Obtiene los metadatos de la im�gen. |
|
116 |
* @throws MrSIDException, IOException |
|
117 |
* @return Objeto LTIMetadataDatabase que contiene los metadatos de la im�gen |
|
118 |
*/ |
|
119 |
public LTIMetadataDatabase getMetadata()throws MrSIDException{ |
|
120 |
|
|
121 |
if(cPtr == 0) |
|
122 |
throw new MrSIDException("Error en getMetadataDatabase. El Open del MrSID no tuvo �xito"); |
|
123 |
|
|
124 |
LTIMetadataDatabase metadata = new LTIMetadataDatabase(getMetadataNat(cPtr)); |
|
125 |
|
|
126 |
if(metadata==null) |
|
127 |
throw new MrSIDException("Objeto LTIMetadataDatabase nulo"); |
|
128 |
|
|
129 |
return metadata; |
|
130 |
} |
|
131 |
|
|
132 |
/** |
|
133 |
* Obtiene el ancho de la im�gen. |
|
134 |
* |
|
135 |
* @throws MrSIDException |
|
136 |
* @return entero con el ancho de la im�gen |
|
137 |
*/ |
|
138 |
public int getWidth()throws MrSIDException{ |
|
139 |
|
|
140 |
String msg1="Error en getNumLevels. No se ha obtenido un puntero valido a LTIImage"; |
|
141 |
String msg2="La llamada nativa a getNumLevels ha devuelto un c�digo de error"; |
|
142 |
return baseSimpleFunction(3,msg1,msg2); |
|
143 |
|
|
144 |
} |
|
145 |
|
|
146 |
/** |
|
147 |
* Obtiene el alto de la im�gen. |
|
148 |
* |
|
149 |
* @throws MrSIDException |
|
150 |
* @return alto de la im�gen |
|
151 |
*/ |
|
152 |
public int getHeight()throws MrSIDException{ |
|
153 |
|
|
154 |
String msg1="Error en getNumLevels. No se ha obtenido un puntero valido a LTIImage"; |
|
155 |
String msg2="La llamada nativa a getNumLevels ha devuelto un c�digo de error"; |
|
156 |
return baseSimpleFunction(4,msg1,msg2); |
|
157 |
|
|
158 |
} |
|
159 |
|
|
160 |
/** |
|
161 |
* Obtiene el n�mero de bandas. |
|
162 |
* |
|
163 |
* @throws MrSIDException |
|
164 |
* @return n�mero de bandas |
|
165 |
*/ |
|
166 |
public int getNumBands()throws MrSIDException{ |
|
167 |
|
|
168 |
String msg1="Error en getNumBands. No se ha obtenido un puntero valido a LTIImage"; |
|
169 |
String msg2="La llamada nativa a getNumBands ha devuelto un c�digo de error"; |
|
170 |
return baseSimpleFunction(6,msg1,msg2); |
|
171 |
|
|
172 |
} |
|
173 |
|
|
174 |
/** |
|
175 |
* Obtiene el tipo de espacio de color usado en la im�gen. |
|
176 |
* |
|
177 |
* @throws MrSIDException |
|
178 |
* @return entero que representa una constante de la clase LTIColorSpace. |
|
179 |
*/ |
|
180 |
public int getColorSpace()throws MrSIDException{ |
|
181 |
|
|
182 |
String msg1="Error en getColorSpace. No se ha obtenido un puntero valido a LTIImage"; |
|
183 |
String msg2="La llamada nativa a getColorSpace ha devuelto un c�digo de error"; |
|
184 |
return baseSimpleFunction(7,msg1,msg2); |
|
185 |
|
|
186 |
} |
|
187 |
|
|
188 |
/** |
|
189 |
* Obtiene el tipo de datos usado en la im�gen. |
|
190 |
* |
|
191 |
* @throws MrSIDException |
|
192 |
* @return entero que representa una constante de la clase LTIDataType. |
|
193 |
*/ |
|
194 |
public int getDataType()throws MrSIDException{ |
|
195 |
|
|
196 |
String msg1="Error en getDataType. No se ha obtenido un puntero valido a LTIImage"; |
|
197 |
String msg2="La llamada nativa a getDataType ha devuelto un c�digo de error"; |
|
198 |
return baseSimpleFunction(8,msg1,msg2); |
|
199 |
|
|
200 |
} |
|
201 |
|
|
202 |
|
|
203 |
/** |
|
204 |
* Obtiene el ancho y alto de la im�gen a partir de una valor de ampliaci�n dado. |
|
205 |
* |
|
206 |
* @throws MrSIDException |
|
207 |
* @return el ancho y alto de la im�gen |
|
208 |
*/ |
|
209 |
public int[] getDimsAtMag(double mag)throws MrSIDException{ |
|
210 |
|
|
211 |
if(cPtr == 0) |
|
212 |
throw new MrSIDException("Error en getDimsAtMag. El Open del MrSID no tuvo �xito"); |
|
213 |
|
|
214 |
magsize[0]=getDimsAtMagWidthNat(cPtr,mag); |
|
215 |
magsize[1]=getDimsAtMagHeightNat(cPtr,mag); |
|
216 |
|
|
217 |
if(magsize[0] < 0 || magsize[1] < 0) |
|
218 |
throw new MrSIDException("Error en getDimsAtMag. El Open del MrSID no tuvo �xito"); |
|
219 |
|
|
220 |
return magsize; |
|
221 |
} |
|
222 |
|
|
223 |
/** |
|
224 |
* Obtiene las propiedades del pixel de la im�gen. |
|
225 |
* @throws MrSIDException |
|
226 |
* @return un objeto de tipo LTIPixel conteniendo las propiedades |
|
227 |
*/ |
|
228 |
public LTIPixel getPixelProps()throws MrSIDException{ |
|
229 |
|
|
230 |
if(cPtr == 0) |
|
231 |
throw new MrSIDException("Error en getPixelProps. El Open del MrSID no tuvo �xito"); |
|
232 |
|
|
233 |
LTIPixel props=new LTIPixel(getPixelPropsNat(cPtr)); |
|
234 |
|
|
235 |
if(props == null) |
|
236 |
throw new MrSIDException("Error en getPixelProps. No se ha podido obtener LTIPixel"); |
|
237 |
|
|
238 |
return props; |
|
239 |
|
|
240 |
} |
|
241 |
|
|
242 |
/** |
|
243 |
* Obtiene la informaci�n de georeferenciaci�n de la im�gen si la tiene. |
|
244 |
* @throws MrSIDException |
|
245 |
* @return un objeto de tipo LTIGeoCoord con la informaci�n de georeferenciaci�n |
|
246 |
*/ |
|
247 |
public LTIGeoCoord getGeoCoord()throws MrSIDException{ |
|
248 |
|
|
249 |
int res=0; |
|
250 |
|
|
251 |
if(cPtr == 0) |
|
252 |
throw new MrSIDException("Error en getGeoCoord. El Open del MrSID no tuvo �xito"); |
|
253 |
|
|
254 |
if(geocoord == null){ |
|
255 |
geocoord= new LTIGeoCoord(); |
|
256 |
res = getGeoCoordNat(cPtr,geocoord); |
|
257 |
} |
|
258 |
|
|
259 |
if(res < 0) |
|
260 |
throw new MrSIDException("Error en getGeoCoord. No se ha podido obtener un LTIGeoCoord valido"); |
|
261 |
|
|
262 |
return geocoord; |
|
263 |
|
|
264 |
} |
|
265 |
|
|
266 |
/** |
|
267 |
* Obtiene el valor del fondo del pixel. Si devuelve null es que no ha sido definido un valor para |
|
268 |
* el fondo. |
|
269 |
* @throws MrSIDException |
|
270 |
* @return un objeto del tipo LTIPixel con los valores del fondo del pixel |
|
271 |
*/ |
|
272 |
public LTIPixel getBackgroundPixel()throws MrSIDException{ |
|
273 |
|
|
274 |
if(cPtr == 0) |
|
275 |
throw new MrSIDException("Error en getBackgroundPixel. El Open del MrSID no tuvo �xito"); |
|
276 |
|
|
277 |
LTIPixel pixel=new LTIPixel(getBackgroundPixelNat(cPtr)); |
|
278 |
|
|
279 |
if(pixel.getPtr() == 0)return null; |
|
280 |
else return pixel; |
|
281 |
|
|
282 |
} |
|
283 |
|
|
284 |
/** |
|
285 |
* Obtiene los valores de transparencia de un pixel. Si devuelve null es que la im�gen no tiene |
|
286 |
* definido un valor de transparencia. |
|
287 |
* @throws MrSIDException |
|
288 |
* @return un objeto de tipo LTIPixel |
|
289 |
*/ |
|
290 |
public LTIPixel getNoDataPixel()throws MrSIDException{ |
|
291 |
|
|
292 |
if(cPtr == 0) |
|
293 |
throw new MrSIDException("Error en getNoData. El Open del MrSID no tuvo �xito"); |
|
294 |
|
|
295 |
LTIPixel pixel = new LTIPixel(getNoDataPixelNat(cPtr)); |
|
296 |
|
|
297 |
if(pixel.getPtr() == 0)return null; |
|
298 |
else return pixel; |
|
299 |
|
|
300 |
} |
|
301 |
|
|
302 |
/** |
|
303 |
* This function returns the minimum magnification of the image. |
|
304 |
* Images that do not support "zooming out" will return 1.0; images that contain "overviews" |
|
305 |
* |
|
306 |
* @throws MrSIDException |
|
307 |
* @return the minimum magnification |
|
308 |
*/ |
|
309 |
public double getMinMagnification()throws MrSIDException{ |
|
310 |
|
|
311 |
if(cPtr == 0) |
|
312 |
throw new MrSIDException("Error en getMinMagnification(). El Open del MrSID no tuvo �xito"); |
|
313 |
|
|
314 |
return this.getMinMagnificationNat(cPtr); |
|
315 |
|
|
316 |
} |
|
317 |
|
|
318 |
/** |
|
319 |
* This function returns the minimum magnification of the image. |
|
320 |
* Images that do not support "zooming out" will return 1.0; images that contain "overviews" |
|
321 |
* |
|
322 |
* @throws MrSIDException |
|
323 |
* @return the minimum magnification |
|
324 |
*/ |
|
325 |
public double getMaxMagnification()throws MrSIDException{ |
|
326 |
|
|
327 |
if(cPtr == 0) |
|
328 |
throw new MrSIDException("Error en getMaxMagnification(). El Open del MrSID no tuvo �xito"); |
|
329 |
|
|
330 |
return this.getMaxMagnificationNat(cPtr); |
|
331 |
|
|
332 |
} |
|
333 |
|
|
334 |
|
|
335 |
} |
|
0 | 336 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/MrSIDException.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: MrSIDException.java 3539 2006-01-09 12:23:20Z nacho $ |
|
3 |
* |
|
4 |
* Name: GdalException.java |
|
5 |
* Project: JGDAL. Interface java to gdal (Frank Warmerdam). |
|
6 |
* Purpose: Class for exceptions produced into mrsid. |
|
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.jmrsid; |
|
52 |
|
|
53 |
/** |
|
54 |
* Es generada cuando los c?digos de retorno de las funciones de Mrsid 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 |
public class MrSIDException extends Exception{ |
|
61 |
|
|
62 |
MrSIDException(String msg){ |
|
63 |
super(msg); |
|
64 |
} |
|
65 |
|
|
66 |
} |
|
0 | 67 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/MrSIDImageReaderBase.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: MrSIDImageReaderBase.java 3539 2006-01-09 12:23:20Z nacho $ |
|
3 |
* |
|
4 |
* Name: MrSIDImageReaderBase.java |
|
5 |
* Project: JMRSID. Interfaz java to MrSID (Lizardtech). |
|
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 |
package es.gva.cit.jmrsid; |
|
51 |
|
|
52 |
/** |
|
53 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
54 |
* @version 0.0 |
|
55 |
* @link http://www.gvsig.gva.es |
|
56 |
*/ |
|
57 |
public class MrSIDImageReaderBase extends LTIImageReader{ |
|
58 |
|
|
59 |
private native void FreeMrSIDImageReaderBaseNat(long cPtr); |
|
60 |
|
|
61 |
public MrSIDImageReaderBase(){} |
|
62 |
|
|
63 |
/** |
|
64 |
* Constructor |
|
65 |
* @param cPtr direcci?n de memoria |
|
66 |
*/ |
|
67 |
|
|
68 |
public MrSIDImageReaderBase(long cPtr){ |
|
69 |
this.cPtr=cPtr; |
|
70 |
} |
|
71 |
|
|
72 |
/** |
|
73 |
* Destructor |
|
74 |
*/ |
|
75 |
|
|
76 |
protected void finalize(){ |
|
77 |
this.close(); |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Cierra el MrSIDImageReader |
|
82 |
* |
|
83 |
*/ |
|
84 |
public void close(){ |
|
85 |
if(cPtr != 0){ |
|
86 |
FreeMrSIDImageReaderBaseNat(cPtr); |
|
87 |
cPtr = 0; |
|
88 |
} |
|
89 |
} |
|
90 |
} |
|
0 | 91 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/LTISceneBuffer.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: LTISceneBuffer.java 3539 2006-01-09 12:23:20Z nacho $ |
|
3 |
* |
|
4 |
* Name: LTISceneBuffer.java |
|
5 |
* Project: JMRSID. Interface java to mrsid (Lizardtech). |
|
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.jmrsid; |
|
52 |
|
|
53 |
|
|
54 |
/** |
|
55 |
* Buffer que contiene los datos de una escena. |
|
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 LTISceneBuffer extends JNIBase{ |
|
62 |
|
|
63 |
private native long LTISceneBufferNat(long pixel,int tamx,int tamy, int flag); |
|
64 |
private native long LTISceneBuffer1Nat(long pixel, int totalNumCols, int totalNumRows, int colOffset, int rowOffset, int windowNumCols, int windowNumRows, int flag); |
|
65 |
private native long LTISceneBuffer2Nat(long pixel, double x, double y, double w, double h, double mag, int totalNumCols, int totalNumRows, int flag); |
|
66 |
private native void FreeLTISceneBufferNat(long cPtr_LTISceneBuffer, long cPtr_tbuffer); |
|
67 |
|
|
68 |
public int size; |
|
69 |
public byte buf1[]; |
|
70 |
public byte buf2[]; |
|
71 |
public byte buf3[]; |
|
72 |
public long cPtrbuffer; |
|
73 |
public boolean flag; |
|
74 |
|
|
75 |
/** |
|
76 |
* Constructor |
|
77 |
* |
|
78 |
* @param pixel propiedades del pixel que ser�n usadas en el buffer |
|
79 |
* @param totalNumCols ancho del buffer |
|
80 |
* @param totalNumRows alto del buffer |
|
81 |
* @param flag Pone a null el puntero de datos si es false y llena el buffer si es true |
|
82 |
* @throws MrSIDException |
|
83 |
*/ |
|
84 |
public LTISceneBuffer(int totalNumCols, int totalNumRows, boolean flag)throws MrSIDException{ |
|
85 |
|
|
86 |
if(totalNumCols < 0 || totalNumRows < 0) |
|
87 |
throw new MrSIDException("Valores no validos para el tama�o de ventana."); |
|
88 |
|
|
89 |
this.cPtrbuffer = -1; |
|
90 |
this.flag = flag; |
|
91 |
|
|
92 |
//Si el flag es true reservamos memoria para el buffer |
|
93 |
|
|
94 |
if(flag==true) { |
|
95 |
size = totalNumCols * totalNumRows; |
|
96 |
buf1 = new byte[size]; |
|
97 |
buf2 = new byte[size]; |
|
98 |
buf3 = new byte[size]; |
|
99 |
} |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* Constructor |
|
104 |
* |
|
105 |
* @param pixel propiedades del pixel que ser�n usadas en el buffer |
|
106 |
* @param totalNumCols ancho del buffer |
|
107 |
* @param totalNumRows alto del buffer |
|
108 |
* @param flag Pone a null el puntero de datos si es false y llena el buffer si es true |
|
109 |
* @throws MrSIDException |
|
110 |
*/ |
|
111 |
public LTISceneBuffer(LTIPixel pixel, double x, double y, double w, double h, double magnification, int totalNumCols, int totalNumRows, boolean flag)throws MrSIDException{ |
|
112 |
|
|
113 |
if(totalNumCols < 0 || totalNumRows < 0 || pixel == null) |
|
114 |
throw new MrSIDException("Valores no validos para el tama�o de ventana."); |
|
115 |
|
|
116 |
this.cPtrbuffer = -1; |
|
117 |
this.flag = flag; |
|
118 |
|
|
119 |
//Si el flag es true reservamos memoria para el buffer |
|
120 |
|
|
121 |
if(flag==true) { |
|
122 |
size = totalNumCols * totalNumRows; |
|
123 |
buf1 = new byte[size]; |
|
124 |
buf2 = new byte[size]; |
|
125 |
buf3 = new byte[size]; |
|
126 |
} |
|
127 |
|
|
128 |
if(flag) |
|
129 |
cPtr = LTISceneBuffer2Nat(pixel.cPtr, x, y, w, h, magnification, totalNumCols, totalNumRows, 1); |
|
130 |
else |
|
131 |
cPtr = LTISceneBuffer2Nat(pixel.cPtr, x, y, w, h, magnification, totalNumCols, totalNumRows, 0); |
|
132 |
|
|
133 |
if(cPtr == 0) |
|
134 |
throw new MrSIDException("Error en el constructor nativo LTIScene."); |
|
135 |
} |
|
136 |
|
|
137 |
/** |
|
138 |
* Constructor |
|
139 |
* |
|
140 |
* @param pixel propiedades del pixel que ser�n usadas en el buffer |
|
141 |
* @param totalNumCols ancho del buffer |
|
142 |
* @param totalNumRows alto del buffer |
|
143 |
* @param flag Pone a null el puntero de datos si es false y llena el buffer si es true |
|
144 |
* @throws MrSIDException |
|
145 |
*/ |
|
146 |
public LTISceneBuffer(LTIPixel pixel, int totalNumCols, int totalNumRows, boolean flag)throws MrSIDException{ |
|
147 |
|
|
148 |
if(totalNumCols<0 || totalNumRows<0 || pixel==null) |
|
149 |
throw new MrSIDException("Valores no validos para el tama�o de ventana."); |
|
150 |
|
|
151 |
this.cPtrbuffer=-1; |
|
152 |
this.flag=flag; |
|
153 |
|
|
154 |
//Si el flag es true reservamos memoria para el buffer |
|
155 |
|
|
156 |
if(flag==true){ |
|
157 |
size=totalNumCols*totalNumRows; |
|
158 |
buf1=new byte[size]; |
|
159 |
buf2=new byte[size]; |
|
160 |
buf3=new byte[size]; |
|
161 |
|
|
162 |
} |
|
163 |
|
|
164 |
if(flag)cPtr=LTISceneBufferNat(pixel.cPtr, totalNumCols, totalNumRows, 1); |
|
165 |
else cPtr=LTISceneBufferNat(pixel.cPtr, totalNumCols, totalNumRows, 0); |
|
166 |
|
|
167 |
if(cPtr == 0) |
|
168 |
throw new MrSIDException("Error en el constructor nativo LTIScene."); |
|
169 |
} |
|
170 |
|
|
171 |
/** |
|
172 |
* Constructor |
|
173 |
* |
|
174 |
* @param pixel propiedades del pixel que ser�n usadas en el buffer |
|
175 |
* @param totalNumCols ancho del buffer |
|
176 |
* @param totalNumRows alto del buffer |
|
177 |
* @param colOffset posici�n X de la ventana |
|
178 |
* @param rowOffset posici�n Y de la ventana |
|
179 |
* @param windowNumCols Ancho de la ventana |
|
180 |
* @param windowNumRows Alto de la ventana |
|
181 |
* @param flag Pone a null el puntero de datos si es false y llena el buffer si es true |
|
182 |
* @throws MrSIDException |
|
183 |
*/ |
|
184 |
public LTISceneBuffer(LTIPixel pixel, int totalNumCols, int totalNumRows, int colOffset, int rowOffset, int windowNumCols, int windowNumRows, boolean flag)throws MrSIDException{ |
|
185 |
|
|
186 |
/*if ((colOffset < 0) || (rowOffset < 0) || (colOffset > baseSimpleFunction(3, "", "")) || (colOffset > baseSimpleFunction(4, "", ""))) |
|
187 |
throw new MrSIDException("Posicion inicial de la escena no valida"); |
|
188 |
|
|
189 |
if ((windowNumCols < 1) || (windowNumRows < 1) || (windowNumCols > baseSimpleFunction(3, "", "")) || (windowNumRows > baseSimpleFunction(4, "", ""))) |
|
190 |
throw new MrSIDException("Tama�o de la escena no valido"); |
|
191 |
|
|
192 |
if (((colOffset + windowNumCols) > baseSimpleFunction(3, "", "")) || ((rowOffset + windowNumRows) > baseSimpleFunction(4, "", ""))) |
|
193 |
throw new MrSIDException("Valores de la escena no validos"); |
|
194 |
|
|
195 |
if(totalNumCols<0 || totalNumRows<0 || pixel==null) |
|
196 |
throw new MrSIDException("Valores no validos para el tama�o de ventana."); |
|
197 |
*/ |
|
198 |
this.cPtrbuffer=-1; |
|
199 |
this.flag=flag; |
|
200 |
|
|
201 |
//Si el flag es 1 reservamos memoria para el buffer |
|
202 |
|
|
203 |
if(flag==true){ |
|
204 |
size=totalNumCols*totalNumRows; |
|
205 |
buf1=new byte[size]; |
|
206 |
buf2=new byte[size]; |
|
207 |
buf3=new byte[size]; |
|
208 |
|
|
209 |
} |
|
210 |
|
|
211 |
if(flag)cPtr=LTISceneBuffer1Nat(pixel.cPtr, totalNumCols, totalNumRows, colOffset, rowOffset, windowNumCols, windowNumRows, 1); |
|
212 |
else cPtr=LTISceneBuffer1Nat(pixel.cPtr, totalNumCols, totalNumRows, colOffset, rowOffset, windowNumCols, windowNumRows, 0); |
|
213 |
|
|
214 |
if(cPtr == 0) |
|
215 |
throw new MrSIDException("Error en el constructor nativo LTIScene."); |
|
216 |
} |
|
217 |
|
|
218 |
/** |
|
219 |
* Destructor |
|
220 |
*/ |
|
221 |
public void finalize(){ |
|
222 |
//System.out.println("Finalizando LTIsceneBuffer ..."+cPtrbuffer); |
|
223 |
if(cPtr != 0) |
|
224 |
FreeLTISceneBufferNat(cPtr, cPtrbuffer); |
|
225 |
} |
|
226 |
|
|
227 |
} |
|
0 | 228 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/LTIColorSpace.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: LTIColorSpace.java 3539 2006-01-09 12:23:20Z nacho $ |
|
3 |
* |
|
4 |
* Name: LTIColorSpace.java |
|
5 |
* Project: JMRSID. Interface java to mrsid (Lizardtech). |
|
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.jmrsid; |
|
52 |
|
|
53 |
import java.io.*; |
|
54 |
|
|
55 |
/** |
|
56 |
* Clase con las constantes que representan el espacio de color utilizado |
|
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 LTIColorSpace{ |
|
63 |
|
|
64 |
public static final int LTI_COLORSPACE_INVALID=0; |
|
65 |
public static final int LTI_COLORSPACE_RGB=1; |
|
66 |
public static final int LTI_COLORSPACE_RGBK=2; |
|
67 |
public static final int LTI_COLORSPACE_CMYK=3; |
|
68 |
public static final int LTI_COLORSPACE_GRAYSCALE=4; |
|
69 |
public static final int LTI_COLORSPACE_PALETTE=5; |
|
70 |
public static final int LTI_COLORSPACE_YIQ=6; |
|
71 |
public static final int LTI_COLORSPACE_YIQK=7; |
|
72 |
public static final int LTI_COLORSPACE_MULTISPECTRAL=8; |
|
73 |
|
|
74 |
} |
|
0 | 75 |
org.gvsig.raster.lizardtech/tags/buildNumber_25/org.gvsig.raster.lizardtech/org.gvsig.raster.lizardtech.jni/src/main/java/es/gva/cit/jmrsid/MrSIDImageReader.java | ||
---|---|---|
1 |
/********************************************************************** |
|
2 |
* $Id: MrSIDImageReader.java 8460 2006-10-31 16:26:34Z nacho $ |
|
3 |
* |
|
4 |
* Name: MrSIDImageReader.java |
|
5 |
* Project: JMRSID. Interfaz java to MrSID (Lizardtech). |
|
6 |
* Purpose: |
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es |
|
8 |
* |
|
9 |
**********************************************************************/ |
|
10 |
/*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es> |
|
11 |
|
|
12 |
This program is free software; you can redistribute it and/or |
|
13 |
modify it under the terms of the GNU General Public License |
|
14 |
as published by the Free Software Foundation; either version 2 |
|
15 |
of the License, or (at your option) any later version. |
|
16 |
|
|
17 |
This program is distributed in the hope that it will be useful, |
|
18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
GNU General Public License for more details. |
|
21 |
|
|
22 |
You should have received a copy of the GNU General Public License |
|
23 |
along with this program; if not, write to the Free Software |
|
24 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
25 |
|
|
26 |
|
|
27 |
[01] 01-Oct-2005 nbt New call to JNI function MrSIDImageReaderArrayNat to convert name string to char array. |
|
28 |
|
|
29 |
*/ |
|
30 |
|
|
31 |
package es.gva.cit.jmrsid; |
|
32 |
|
|
33 |
import java.io.File; |
|
34 |
import java.io.IOException; |
|
35 |
|
|
36 |
|
|
37 |
/** |
|
38 |
* |
|
39 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es |
|
40 |
* @version 0.0 |
|
41 |
* @link http://www.gvsig.gva.es |
|
42 |
*/ |
|
43 |
public class MrSIDImageReader extends MrSIDImageReaderBase{ |
|
44 |
|
|
45 |
private native long MrSIDImageReaderNat(String pszFilename); |
|
46 |
private native long MrSIDImageReaderArrayNat(byte[] b); |
|
47 |
private native void FreeMrSIDImageReaderNat(long cPtr); |
|
48 |
|
|
49 |
public MrSIDImageReader(){} |
|
50 |
|
|
51 |
/** |
|
52 |
* Constructor |
|
53 |
* @param cPtr direcci?n de memoria al objeto MrSIDImageReader de C. |
|
54 |
*/ |
|
55 |
|
|
56 |
public MrSIDImageReader(long cPtr){ |
|
57 |
this.cPtr=cPtr; |
|
58 |
} |
|
59 |
|
|
60 |
/** |
|
61 |
* Destructor |
|
62 |
*/ |
|
63 |
|
|
64 |
protected void finalize(){ |
|
65 |
if (cPtr != 0) |
|
66 |
this.close(); |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* Cierra el MrSIDImageReader |
|
71 |
* |
|
72 |
*/ |
|
73 |
public void close(){ |
|
74 |
if(cPtr != 0){ |
|
75 |
FreeMrSIDImageReaderNat(cPtr); |
|
76 |
cPtr = 0; |
|
77 |
} |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Constructor |
|
82 |
* |
|
83 |
* @param pszFilename Nombre del fichero |
|
84 |
* @throws MrSIDException, IOException |
Also available in: Unified diff