Revision 11593
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/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 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.raster.gdal.app</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.raster.gdal</artifactId> |
|
11 |
<version>2.2.108</version> |
|
12 |
</parent> |
|
13 |
|
|
14 |
<modules> |
|
15 |
<module>org.gvsig.raster.gdal.app.mainplugin</module> |
|
16 |
</modules> |
|
17 |
|
|
18 |
</project> |
|
19 |
|
|
0 | 20 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/org.gvsig.raster.gdal.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Thu May 14 15:05:36 CEST 2020 |
|
2 |
buildNumber=161 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/org.gvsig.raster.gdal.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<depends plugin-name="org.gvsig.gdal.app.mainplugin" /> |
|
4 |
<depends plugin-name="org.gvsig.raster.mainplugin" /> |
|
5 |
<depends plugin-name="org.gvsig.raster.tilecache.app" optional="true" /> |
|
6 |
<libraries library-dir="lib"/> |
|
7 |
<resourceBundle name="text"/> |
|
8 |
<extensions> |
|
9 |
<extension class-name="org.gvsig.raster.gdal.app.GdalExtension" |
|
10 |
description="" |
|
11 |
active="true" |
|
12 |
priority="1"> |
|
13 |
</extension> |
|
14 |
</extensions> |
|
15 |
</plugin-config> |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/org.gvsig.raster.gdal.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
|
|
3 |
gvSIG. Desktop Geographic Information System. |
|
4 |
|
|
5 |
Copyright (C) 2007-2013 gvSIG Association. |
|
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
|
8 |
modify it under the terms of the GNU General Public License |
|
9 |
as published by the Free Software Foundation; either version 3 |
|
10 |
of the License, or (at your option) any later version. |
|
11 |
|
|
12 |
This program is distributed in the hope that it will be useful, |
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 |
GNU General Public License for more details. |
|
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
|
18 |
along with this program; if not, write to the Free Software |
|
19 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
20 |
MA 02110-1301, USA. |
|
21 |
|
|
22 |
For any additional information, do not hesitate to contact us |
|
23 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
24 |
|
|
25 |
--> |
|
26 |
<assembly> |
|
27 |
<id>gvsig-plugin-package</id> |
|
28 |
<formats> |
|
29 |
<format>zip</format> |
|
30 |
</formats> |
|
31 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
32 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
33 |
<files> |
|
34 |
<file> |
|
35 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
36 |
<outputDirectory>lib</outputDirectory> |
|
37 |
</file> |
|
38 |
<file> |
|
39 |
<source>target/package.info</source> |
|
40 |
</file> |
|
41 |
</files> |
|
42 |
|
|
43 |
<fileSets> |
|
44 |
<fileSet> |
|
45 |
<directory>src/main/resources-plugin</directory> |
|
46 |
<outputDirectory>.</outputDirectory> |
|
47 |
</fileSet> |
|
48 |
</fileSets> |
|
49 |
|
|
50 |
|
|
51 |
<dependencySets> |
|
52 |
<dependencySet> |
|
53 |
<useProjectArtifact>false</useProjectArtifact> |
|
54 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
55 |
<outputDirectory>lib</outputDirectory> |
|
56 |
<includes> |
|
57 |
<include>org.gvsig:org.gvsig.raster.gdal.io:jar</include> |
|
58 |
</includes> |
|
59 |
</dependencySet> |
|
60 |
</dependencySets> |
|
61 |
|
|
62 |
</assembly> |
|
63 |
|
|
64 |
|
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/org.gvsig.raster.gdal.app.mainplugin/src/main/java/org/gvsig/raster/gdal/app/GdalExtension.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.gdal.app; |
|
23 |
|
|
24 |
import org.gvsig.andami.plugins.Extension; |
|
25 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
26 |
import org.gvsig.fmap.dal.coverage.util.ProviderServices; |
|
27 |
import org.gvsig.installer.lib.api.InstallerLocator; |
|
28 |
import org.gvsig.installer.lib.api.InstallerManager; |
|
29 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
30 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
31 |
import org.slf4j.LoggerFactory; |
|
32 |
|
|
33 |
/** |
|
34 |
* Extension to add Gdal library support |
|
35 |
* |
|
36 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
37 |
*/ |
|
38 |
public class GdalExtension extends Extension { |
|
39 |
|
|
40 |
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GdalExtension.class); |
|
41 |
|
|
42 |
@Override |
|
43 |
public void execute(String actionCommand) { |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
public void postInitialize() { |
|
48 |
try { |
|
49 |
InstallerManager installerManager = InstallerLocator.getInstallerManager(); |
|
50 |
PackageInfo[] pkgs = installerManager.getInstalledPackages(); |
|
51 |
boolean needECW = true; |
|
52 |
boolean needMrSID = true; |
|
53 |
for (PackageInfo pkg : pkgs) { |
|
54 |
if( "org.gvsig.raster.ermapper.app".equalsIgnoreCase(pkg.getCode() )) { |
|
55 |
needECW = false; |
|
56 |
} |
|
57 |
if( "org.gvsig.raster.lizardtech.app".equalsIgnoreCase(pkg.getCode() )) { |
|
58 |
needMrSID = false; |
|
59 |
} |
|
60 |
} |
|
61 |
ProviderServices providerServices = RasterLocator.getManager().getProviderServices(); |
|
62 |
if( needECW ) { |
|
63 |
providerServices.addFormat("ecw", GdalProvider.class); |
|
64 |
providerServices.addFormat("jp2", GdalProvider.class); |
|
65 |
} |
|
66 |
if( needMrSID ) { |
|
67 |
providerServices.addFormat("mrsid", GdalProvider.class); |
|
68 |
} |
|
69 |
} catch (Exception ex) { |
|
70 |
logger.warn("Can't determine the use of gdal drivers for ecw, jp2 and mrsid",ex); |
|
71 |
} |
|
72 |
} |
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
@Override |
|
77 |
public void initialize() { |
|
78 |
} |
|
79 |
|
|
80 |
@Override |
|
81 |
public boolean isEnabled() { |
|
82 |
return false; |
|
83 |
} |
|
84 |
|
|
85 |
@Override |
|
86 |
public boolean isVisible() { |
|
87 |
return false; |
|
88 |
} |
|
89 |
|
|
90 |
} |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.app/org.gvsig.raster.gdal.app.mainplugin/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" 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 |
<artifactId>org.gvsig.raster.gdal.app.mainplugin</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>GDAL raster data provider for gvSIG: jpeg, tiff, png, gif.</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.raster.gdal.app</artifactId> |
|
12 |
<version>2.2.108</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<dependencies> |
|
16 |
<dependency> |
|
17 |
<groupId>org.gvsig</groupId> |
|
18 |
<artifactId>org.gvsig.andami</artifactId> |
|
19 |
<scope>compile</scope> |
|
20 |
</dependency> |
|
21 |
<dependency> |
|
22 |
<groupId>org.gvsig</groupId> |
|
23 |
<artifactId>org.gvsig.raster.gdal.io</artifactId> |
|
24 |
<scope>compile</scope> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.gvsig</groupId> |
|
28 |
<artifactId>org.gvsig.raster.lib.api</artifactId> |
|
29 |
<scope>compile</scope> |
|
30 |
</dependency> |
|
31 |
</dependencies> |
|
32 |
|
|
33 |
<properties> |
|
34 |
<svn.tags.folder>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.gdal/tags/</svn.tags.folder> |
|
35 |
|
|
36 |
<gvsig.package.info.name>Formats: GDAL raster file formats support</gvsig.package.info.name> |
|
37 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
38 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
39 |
<gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem> |
|
40 |
<gvsig.package.info.architecture>all</gvsig.package.info.architecture> |
|
41 |
<gvsig.package.info.categories>Raster, Formats</gvsig.package.info.categories> |
|
42 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool/</gvsig.package.info.poolURL> |
|
43 |
<gvsig.package.info.codealias>org.gvsig.raster.gdal.app</gvsig.package.info.codealias> |
|
44 |
<gvsig.package.info.description>${project.parent.description}</gvsig.package.info.description> |
|
45 |
<gvsig.package.info.dependencies>required: org.gvsig.gdal.app.mainplugin -ge 1, required: org.gvsig.raster.tilecache.app -ge 2</gvsig.package.info.dependencies> |
|
46 |
|
|
47 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
48 |
<gvsig.install.plugin.package>true</gvsig.install.plugin.package> |
|
49 |
|
|
50 |
</properties> |
|
51 |
|
|
52 |
<build> |
|
53 |
<plugins> |
|
54 |
|
|
55 |
<plugin> |
|
56 |
<!-- Skip compilation tests --> |
|
57 |
<groupId>org.apache.maven.plugins</groupId> |
|
58 |
<artifactId>maven-compiler-plugin</artifactId> |
|
59 |
<executions> |
|
60 |
<execution> |
|
61 |
<id>default-testCompile</id> |
|
62 |
<phase>process-test-sources</phase> |
|
63 |
<goals> |
|
64 |
<goal>testCompile</goal> |
|
65 |
</goals> |
|
66 |
<configuration> |
|
67 |
<skip>true</skip> |
|
68 |
</configuration> |
|
69 |
</execution> |
|
70 |
</executions> |
|
71 |
</plugin> |
|
72 |
|
|
73 |
<plugin> |
|
74 |
<!-- Skip test execution --> |
|
75 |
<groupId>org.apache.maven.plugins</groupId> |
|
76 |
<artifactId>maven-surefire-plugin</artifactId> |
|
77 |
<configuration> |
|
78 |
<skipTests>true</skipTests> |
|
79 |
</configuration> |
|
80 |
</plugin> |
|
81 |
|
|
82 |
</plugins> |
|
83 |
</build> |
|
84 |
|
|
85 |
</project> |
|
0 | 86 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/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.gdal</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>2.2.108</version> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>GDAL raster data provider for gvSIG</description> |
|
9 |
<inceptionYear>2011</inceptionYear> |
|
10 |
|
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.desktop</artifactId> |
|
14 |
<version>2.0.282</version> |
|
15 |
</parent> |
|
16 |
|
|
17 |
<properties> |
|
18 |
<!-- El plugin versions:use-latest-versions falla con scope import --> |
|
19 |
<!-- asi que toca usar el versions:update-properties que si que funciona --> |
|
20 |
<org.gvsig.gdal.version>1.0.91</org.gvsig.gdal.version> |
|
21 |
<org.gvsig.raster.version>2.2.120</org.gvsig.raster.version> |
|
22 |
</properties> |
|
23 |
|
|
24 |
<repositories> |
|
25 |
<repository> |
|
26 |
<id>gvsig-public-http-repository</id> |
|
27 |
<name>gvSIG maven public HTTP repository</name> |
|
28 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
29 |
<releases> |
|
30 |
<enabled>true</enabled> |
|
31 |
<updatePolicy>daily</updatePolicy> |
|
32 |
<checksumPolicy>warn</checksumPolicy> |
|
33 |
</releases> |
|
34 |
<snapshots> |
|
35 |
<enabled>true</enabled> |
|
36 |
<updatePolicy>daily</updatePolicy> |
|
37 |
<checksumPolicy>warn</checksumPolicy> |
|
38 |
</snapshots> |
|
39 |
</repository> |
|
40 |
</repositories> |
|
41 |
|
|
42 |
<scm> |
|
43 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108</connection> |
|
44 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108</developerConnection> |
|
45 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108</url> |
|
46 |
</scm> |
|
47 |
|
|
48 |
<build> |
|
49 |
<plugins> |
|
50 |
<plugin> |
|
51 |
<groupId>org.apache.maven.plugins</groupId> |
|
52 |
<artifactId>maven-release-plugin</artifactId> |
|
53 |
<configuration> |
|
54 |
<tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.gdal/tags/</tagBase> |
|
55 |
<goals>deploy</goals> |
|
56 |
</configuration> |
|
57 |
</plugin> |
|
58 |
</plugins> |
|
59 |
</build> |
|
60 |
|
|
61 |
<developers> |
|
62 |
<developer> |
|
63 |
<id>nbrodin</id> |
|
64 |
<name>Nacho Brodin</name> |
|
65 |
<email>nachobrodin@gmail.com</email> |
|
66 |
<roles> |
|
67 |
<role>Architect</role> |
|
68 |
<role>Developer</role> |
|
69 |
</roles> |
|
70 |
</developer> |
|
71 |
</developers> |
|
72 |
|
|
73 |
<dependencyManagement> |
|
74 |
<dependencies> |
|
75 |
<dependency> |
|
76 |
<groupId>org.gvsig</groupId> |
|
77 |
<artifactId>org.gvsig.raster</artifactId> |
|
78 |
<version>${org.gvsig.raster.version}</version> |
|
79 |
<type>pom</type> |
|
80 |
<scope>import</scope> |
|
81 |
</dependency> |
|
82 |
|
|
83 |
<dependency> |
|
84 |
<groupId>org.gvsig</groupId> |
|
85 |
<artifactId>org.gvsig.gdal</artifactId> |
|
86 |
<version>${org.gvsig.gdal.version}</version> |
|
87 |
<type>pom</type> |
|
88 |
<scope>import</scope> |
|
89 |
</dependency> |
|
90 |
|
|
91 |
<dependency> |
|
92 |
<groupId>org.gvsig</groupId> |
|
93 |
<artifactId>org.gvsig.raster.gdal.app.common</artifactId> |
|
94 |
<version>2.2.14-SNAPSHOT</version> |
|
95 |
<type>zip</type> |
|
96 |
</dependency> |
|
97 |
|
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId>org.gvsig.raster.gdal.io</artifactId> |
|
101 |
<version>2.2.108</version> |
|
102 |
</dependency> |
|
103 |
|
|
104 |
</dependencies> |
|
105 |
</dependencyManagement> |
|
106 |
|
|
107 |
<modules> |
|
108 |
<module>org.gvsig.raster.gdal.io</module> |
|
109 |
<module>org.gvsig.raster.gdal.app</module> |
|
110 |
</modules> |
|
111 |
|
|
112 |
</project> |
|
113 |
|
|
0 | 114 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.raster.gdal.io.DefaultGdalIOLibrary |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/overview/GdalOverviewBuilder.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.gdal.overview; |
|
23 |
|
|
24 |
import org.gvsig.addo.BuildingOverviewsException; |
|
25 |
import org.gvsig.addo.IOverviewIncrement; |
|
26 |
import org.gvsig.addo.Jaddo; |
|
27 |
import org.gvsig.addo.WritingException; |
|
28 |
import org.gvsig.fmap.dal.coverage.exception.OverviewException; |
|
29 |
import org.gvsig.fmap.dal.coverage.process.BaseIncrementableTask; |
|
30 |
import org.gvsig.fmap.dal.coverage.process.overview.OverviewBuilder; |
|
31 |
|
|
32 |
/** |
|
33 |
* Servicios ofrecidos por el proceso de construcci?n de overviews. Esta |
|
34 |
* implementaci?n usa gdal para construir las overviews. |
|
35 |
* |
|
36 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
37 |
*/ |
|
38 |
public class GdalOverviewBuilder implements OverviewBuilder { |
|
39 |
private Jaddo build = new Jaddo(); |
|
40 |
private int value = 0; |
|
41 |
|
|
42 |
/** |
|
43 |
* Bindings between an IOverviewIncrement and a BaseIncrementableTask |
|
44 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
45 |
*/ |
|
46 |
class ProcessBinding implements IOverviewIncrement { |
|
47 |
private BaseIncrementableTask task = null; |
|
48 |
|
|
49 |
public ProcessBinding(BaseIncrementableTask task) { |
|
50 |
this.task = task; |
|
51 |
} |
|
52 |
|
|
53 |
public int getPercent() { |
|
54 |
return task.getPercent(); |
|
55 |
} |
|
56 |
|
|
57 |
public void setPercent(int value) { |
|
58 |
task.setPercent(value); |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
/* |
|
63 |
* (non-Javadoc) |
|
64 |
* @see org.gvsig.fmap.dal.coverage.process.overview.OverviewBuilder#buildOverviews(int, java.lang.String, int[]) |
|
65 |
*/ |
|
66 |
public void buildOverviews(int resamplingAlg, String file, int[] overviews) |
|
67 |
throws OverviewException { |
|
68 |
try { |
|
69 |
build.buildOverviews(resamplingAlg, file, overviews); |
|
70 |
} catch (BuildingOverviewsException e) { |
|
71 |
throw new OverviewException("Error building overviews", e); |
|
72 |
} catch (WritingException e) { |
|
73 |
throw new OverviewException("Error writing overviews", e); |
|
74 |
} |
|
75 |
} |
|
76 |
|
|
77 |
/* |
|
78 |
* (non-Javadoc) |
|
79 |
* @see org.gvsig.fmap.dal.coverage.process.overview.OverviewBuilder#getPercent() |
|
80 |
*/ |
|
81 |
public int getPercent() { |
|
82 |
return value; |
|
83 |
} |
|
84 |
|
|
85 |
/* |
|
86 |
* (non-Javadoc) |
|
87 |
* @see org.gvsig.fmap.dal.coverage.process.overview.OverviewBuilder#setIncrementListener(org.gvsig.addo.IOverviewIncrement) |
|
88 |
*/ |
|
89 |
public void setIncrementListener(BaseIncrementableTask incr) { |
|
90 |
build.setIncrementListener(new ProcessBinding(incr)); |
|
91 |
} |
|
92 |
|
|
93 |
/* |
|
94 |
* (non-Javadoc) |
|
95 |
* @see org.gvsig.fmap.dal.coverage.process.overview.OverviewBuilder#setPercent(int) |
|
96 |
*/ |
|
97 |
public void setPercent(int value) { |
|
98 |
this.value = value; |
|
99 |
} |
|
100 |
} |
|
0 | 101 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/DefaultGdalIOLibrary.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.gdal.io; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.DALFileLibrary; |
|
25 |
import org.gvsig.fmap.dal.DALLibrary; |
|
26 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
27 |
import org.gvsig.raster.gdal.overview.GdalOverviewBuilder; |
|
28 |
import org.gvsig.raster.gdal.util.DefaultCRSUtils; |
|
29 |
import org.gvsig.raster.impl.store.AbstractNewRasterStoreParameters; |
|
30 |
import org.gvsig.tools.ToolsLibrary; |
|
31 |
import org.gvsig.tools.library.AbstractLibrary; |
|
32 |
import org.gvsig.tools.library.Library; |
|
33 |
import org.gvsig.tools.library.LibraryException; |
|
34 |
/** |
|
35 |
* |
|
36 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
37 |
*/ |
|
38 |
public class DefaultGdalIOLibrary extends AbstractLibrary { |
|
39 |
|
|
40 |
public DefaultGdalIOLibrary() { |
|
41 |
super(DefaultGdalIOLibrary.class,Library.TYPE.IMPL); |
|
42 |
require(ToolsLibrary.class); |
|
43 |
require(DALLibrary.class); |
|
44 |
require(DALFileLibrary.class); |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
protected void doInitialize() throws LibraryException { |
|
49 |
//RasterLibrary.wakeUp(); |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
protected void doPostInitialize() throws LibraryException { |
|
54 |
//AbstractRasterFileDataParameters.registerDynClass(); |
|
55 |
AbstractNewRasterStoreParameters.registerDynClass(); |
|
56 |
|
|
57 |
// Registro de los drivers de lectura |
|
58 |
GdalProvider.register(); |
|
59 |
|
|
60 |
// Registro de los drivers de escritura |
|
61 |
GdalWriter.register(); |
|
62 |
JpegWriter.register(); |
|
63 |
PngWriter.register(); |
|
64 |
GdalDataParameters.registerDynClass(); |
|
65 |
|
|
66 |
//Register GdalOverviewBuilder |
|
67 |
RasterLocator.getManager().getProviderServices().registerOverviewBuilderImplementation( |
|
68 |
"GDAL", |
|
69 |
new GdalOverviewBuilder()); |
|
70 |
|
|
71 |
//Register CRSUtils |
|
72 |
RasterLocator.getManager().getProviderServices().registerCRSUtilImplementation( |
|
73 |
new DefaultCRSUtils()); |
|
74 |
} |
|
75 |
} |
|
0 | 76 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/IDRISIFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
25 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
26 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
27 |
/** |
|
28 |
* Caracteristicas del formato RST de IDRISI para escritura. |
|
29 |
* Soporta tipos de datos enteros en 8, 16 y 32 bits y coma flotante en 32 bits |
|
30 |
* Genera un fichero RDC con la descripci?n de la imagen |
|
31 |
* |
|
32 |
* @version 04/06/2007 |
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
34 |
*/ |
|
35 |
public class IDRISIFeatures extends WriteFileFormatFeatures { |
|
36 |
|
|
37 |
public IDRISIFeatures() { |
|
38 |
super(GdalProvider.FORMAT_RST, "rst", new int[] { -1 }, new int[] { 0, 1, 2, 3, 4 }, GdalWriter.class); |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* Carga los par?metros de este driver. |
|
43 |
*/ |
|
44 |
public void loadParams() { |
|
45 |
super.loadParams(); |
|
46 |
} |
|
47 |
} |
|
0 | 48 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/PngFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.raster.gdal.io.PngWriter; |
|
25 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
26 |
/** |
|
27 |
* Caracteristicas del formato Png para escritura. |
|
28 |
* La georreferenciaci?n puede hacerse mediante un fichero .wld. |
|
29 |
* |
|
30 |
* @version 14/12/2007 |
|
31 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
32 |
*/ |
|
33 |
public class PngFeatures extends WriteFileFormatFeatures { |
|
34 |
|
|
35 |
public PngFeatures() { |
|
36 |
super("Png", "png", new int[] { 4 }, null, PngWriter.class); |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* Carga los par?metros de este driver. |
|
41 |
*/ |
|
42 |
public void loadParams() { |
|
43 |
super.loadParams(); |
|
44 |
} |
|
45 |
} |
|
0 | 46 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/RMFFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato Raster Matrix Format |
|
30 |
* Soporta tipos de datos enteros en 16 bits y coma flotante en 64 bits. |
|
31 |
* ?Ojo! en la documentaci?n de gdal pone 32 bits en flotante pero no se lo traga. |
|
32 |
* |
|
33 |
* @version 04/06/2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
public class RMFFeatures extends WriteFileFormatFeatures { |
|
37 |
|
|
38 |
public RMFFeatures() { |
|
39 |
super(GdalProvider.FORMAT_RMF, "rmf", new int[]{-1}, new int[]{0, 1, 3, 5}, GdalWriter.class); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Carga los par?metros de este driver. |
|
44 |
*/ |
|
45 |
public void loadParams() { |
|
46 |
super.loadParams(); |
|
47 |
|
|
48 |
driverParams.setParam("Mtw", |
|
49 |
new Integer(1), |
|
50 |
Params.CHOICE, |
|
51 |
new String[]{"ON", "OFF"}); |
|
52 |
driverParams.setParam("Tile Width", |
|
53 |
new Integer(3), |
|
54 |
Params.CHOICE, |
|
55 |
new String[]{"32", "64", "128", "256", "512"}); |
|
56 |
driverParams.setParam("Tile Height", |
|
57 |
new Integer(3), |
|
58 |
Params.CHOICE, |
|
59 |
new String[]{"32", "64", "128", "256", "512"}); |
|
60 |
} |
|
61 |
} |
|
0 | 62 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/ILWIS_MprFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
25 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
26 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
27 |
/** |
|
28 |
* Caracteristicas del formato ILWIS para escritura. |
|
29 |
* Soporta tipos de datos enteros en 8, 16 y 32 bits y coma flotante en 32 y 64 bits |
|
30 |
* Genera un fichero .mpl con la informaci?n de contenido (ficheros), un fichero .grf con la |
|
31 |
* georreferenciaci?n, y dos ficheros por banda. Un .mpr con la informaci?n referente a los |
|
32 |
* datos de la banda y un .mp# con los datos de la banda |
|
33 |
* |
|
34 |
* @version 04/06/2007 |
|
35 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
36 |
*/ |
|
37 |
public class ILWIS_MprFeatures extends WriteFileFormatFeatures { |
|
38 |
|
|
39 |
public ILWIS_MprFeatures() { |
|
40 |
super(GdalProvider.FORMAT_ILWIS, "mpl", new int[] { -1 }, new int[] { 0, 1, 2, 3, 4, 5 }, GdalWriter.class); |
|
41 |
} |
|
42 |
|
|
43 |
/** |
|
44 |
* Carga los par?metros de este driver. |
|
45 |
*/ |
|
46 |
public void loadParams() { |
|
47 |
super.loadParams(); |
|
48 |
} |
|
49 |
} |
|
0 | 50 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/JpegFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.JpegWriter; |
|
26 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
27 |
/** |
|
28 |
* Caracteristicas del formato Jpeg para escritura. |
|
29 |
* Soporta escritura de imagenes 1 banda (monocromo) o 3 (RGB) en 8 bits. |
|
30 |
* La georreferenciaci?n puede hacerse mediante un fichero .wld. |
|
31 |
* |
|
32 |
* @version 04/06/2007 |
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
34 |
* |
|
35 |
*/ |
|
36 |
public class JpegFeatures extends WriteFileFormatFeatures { |
|
37 |
|
|
38 |
public JpegFeatures() { |
|
39 |
super("Jpeg", "jpg", new int[]{3}, null, JpegWriter.class); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Carga los par?metros de este driver. |
|
44 |
*/ |
|
45 |
public void loadParams() { |
|
46 |
super.loadParams(); |
|
47 |
|
|
48 |
driverParams.setParam("quality", |
|
49 |
new Integer(16), |
|
50 |
Params.SLIDER, |
|
51 |
new String[]{ "10", "100", "16", "5", "30"}); //min, max, valor defecto, intervalo peque?o, intervalo grande; |
|
52 |
|
|
53 |
driverParams.setParam("progressive", |
|
54 |
new Boolean("false"), |
|
55 |
Params.CHECK, |
|
56 |
null); |
|
57 |
} |
|
58 |
} |
|
0 | 59 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/PNM_PpmFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato PNM para escritura. |
|
30 |
* Esta clase soporta solo ficheros ppm. Estos son solo los PNM en |
|
31 |
* RGB |
|
32 |
* |
|
33 |
* @version 04/06/2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
public class PNM_PpmFeatures extends WriteFileFormatFeatures { |
|
37 |
|
|
38 |
public PNM_PpmFeatures() { |
|
39 |
super(GdalProvider.FORMAT_PNM, "pgm", new int[] { 3 }, null, GdalWriter.class); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Carga los par?metros de este driver. |
|
44 |
*/ |
|
45 |
public void loadParams() { |
|
46 |
super.loadParams(); |
|
47 |
|
|
48 |
driverParams.setParam("tfw", new Boolean("true"), Params.CHECK, null); |
|
49 |
} |
|
50 |
} |
|
0 | 51 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/Jpeg2000Features.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato Jpeg2000 para escritura. |
|
30 |
* Soporta escritura de imagenes 1 banda (monocromo) o 3 (RGB) en 8 bits. |
|
31 |
* La georreferenciaci?n puede hacerse mediante un fichero .wld. |
|
32 |
* |
|
33 |
* @version 26/08/2013 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
* |
|
36 |
*/ |
|
37 |
public class Jpeg2000Features extends WriteFileFormatFeatures { |
|
38 |
|
|
39 |
public Jpeg2000Features() { |
|
40 |
super(GdalProvider.FORMAT_JP2, "jp2", new int[]{3}, null, GdalWriter.class); |
|
41 |
} |
|
42 |
|
|
43 |
/** |
|
44 |
* Carga los par?metros de este driver. |
|
45 |
*/ |
|
46 |
public void loadParams() { |
|
47 |
super.loadParams(); |
|
48 |
|
|
49 |
driverParams.setParam("quality", |
|
50 |
new Integer(16), |
|
51 |
Params.SLIDER, |
|
52 |
new String[]{ "10", "100", "16", "5", "30"}); //min, max, valor defecto, intervalo peque?o, intervalo grande; |
|
53 |
|
|
54 |
driverParams.setParam("progressive", |
|
55 |
new Boolean("false"), |
|
56 |
Params.CHECK, |
|
57 |
null); |
|
58 |
} |
|
59 |
} |
|
0 | 60 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/PAuxFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
25 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
26 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
27 |
/** |
|
28 |
* Caracteristicas del formato PAux para escritura. |
|
29 |
* Soporta tipo de datos enteros de 8 y 16 bits y reales de 32 bits. |
|
30 |
* La georreferenciaci?n y la proyecci?n son ignoradas. |
|
31 |
* |
|
32 |
* @version 04/06/2007 |
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
34 |
*/ |
|
35 |
public class PAuxFeatures extends WriteFileFormatFeatures { |
|
36 |
|
|
37 |
public PAuxFeatures() { |
|
38 |
super(GdalProvider.FORMAT_PAUX, "aux", new int[] { 3 }, null, GdalWriter.class); |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* Carga los par?metros de este driver. |
|
43 |
*/ |
|
44 |
public void loadParams() { |
|
45 |
super.loadParams(); |
|
46 |
} |
|
47 |
} |
|
0 | 48 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/PNM_PgmFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato PNM para escritura. |
|
30 |
* Esta clase soporta solo ficheros pgm. Estos son solo los PNM en |
|
31 |
* escala de grises |
|
32 |
* |
|
33 |
* @version 04/06/2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
public class PNM_PgmFeatures extends WriteFileFormatFeatures { |
|
37 |
|
|
38 |
public PNM_PgmFeatures() { |
|
39 |
super(GdalProvider.FORMAT_PNM, "pgm", new int[] { 1 }, null, GdalWriter.class); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Carga los par?metros de este driver. |
|
44 |
*/ |
|
45 |
public void loadParams() { |
|
46 |
super.loadParams(); |
|
47 |
|
|
48 |
driverParams.setParam("tfw", new Boolean("true"), Params.CHECK, null); |
|
49 |
} |
|
50 |
} |
|
0 | 51 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/BMPFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato BMP para escritura. |
|
30 |
* Soporta escritura de imagenes 1 banda (monocromo) o 3 (RGB) en 8 bits. |
|
31 |
* La georreferenciaci?n puede hacerse mediante un fichero .wld. |
|
32 |
* |
|
33 |
* @version 04/06/2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
public class BMPFeatures extends WriteFileFormatFeatures { |
|
37 |
|
|
38 |
public BMPFeatures() { |
|
39 |
super(GdalProvider.FORMAT_BMP, "bmp", new int[] { 3 }, null, GdalWriter.class); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Carga los par?metros de este driver. |
|
44 |
*/ |
|
45 |
public void loadParams() { |
|
46 |
super.loadParams(); |
|
47 |
driverParams.setParam("tfw", new Boolean("true"), Params.CHECK, null); |
|
48 |
} |
|
49 |
} |
|
0 | 50 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/HFAFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
/** |
|
29 |
* Caracteristicas del formato HFA (.img) de Erdas para escritura. |
|
30 |
* Soporta enteros de 8, 16 y 32 bits y datos en coma flotante de 32 y 64 bits |
|
31 |
* con cualquier n?mero de bandas. |
|
32 |
* |
|
33 |
* @version 04/06/2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
//TODO: Mirar si se pueden generar con piramides |
|
37 |
public class HFAFeatures extends WriteFileFormatFeatures { |
|
38 |
|
|
39 |
public HFAFeatures() { |
|
40 |
super(GdalProvider.FORMAT_HFA, "img", new int[] { -1 }, new int[] { 0, 1, 2, 3, 4, 5 }, GdalWriter.class); |
|
41 |
} |
|
42 |
|
|
43 |
/** |
|
44 |
* Carga los par?metros de este driver. |
|
45 |
*/ |
|
46 |
public void loadParams() { |
|
47 |
super.loadParams(); |
|
48 |
|
|
49 |
driverParams.setParam("rrd", |
|
50 |
new Integer(1), |
|
51 |
Params.CHOICE, |
|
52 |
new String[]{ "YES", "NO"}); |
|
53 |
|
|
54 |
driverParams.setParam("compress", |
|
55 |
new Integer(1), |
|
56 |
Params.CHOICE, |
|
57 |
new String[]{"YES", "NO"}); |
|
58 |
} |
|
59 |
} |
|
0 | 60 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/features/GTiffFeatures.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.gdal.io.features; |
|
23 |
|
|
24 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
25 |
import org.gvsig.raster.gdal.io.GdalProvider; |
|
26 |
import org.gvsig.raster.gdal.io.GdalWriter; |
|
27 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
28 |
|
|
29 |
/** |
|
30 |
* Caracteristicas del formato GeoTiff para escritura. |
|
31 |
* |
|
32 |
* @version 04/06/2007 |
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
34 |
*/ |
|
35 |
public class GTiffFeatures extends WriteFileFormatFeatures { |
|
36 |
|
|
37 |
public GTiffFeatures() { |
|
38 |
super(GdalProvider.FORMAT_GTiff, "tif", new int[] { -1 }, new int[] { 0, 1, 2, 3, 4, 5 }, GdalWriter.class); |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* Carga los par?metros de este driver. |
|
43 |
*/ |
|
44 |
public void loadParams() { |
|
45 |
super.loadParams(); |
|
46 |
driverParams.setParam( |
|
47 |
"photometric", |
|
48 |
new Integer(3), |
|
49 |
Params.CHOICE, |
|
50 |
new String[]{"YCBR", "MINISBLACK", "MINISWHITE", "RGB", "CMYK", "CIELAB", "ICCLAB", "ITULAB", "CBCR"}); |
|
51 |
driverParams.setParam( |
|
52 |
"interleave", |
|
53 |
new Integer(0), |
|
54 |
Params.CHOICE, |
|
55 |
new String[]{ "BAND", "PIXEL"}); |
|
56 |
driverParams.setParam( |
|
57 |
"compression", |
|
58 |
new Integer(3), |
|
59 |
Params.CHOICE, |
|
60 |
new String[]{"LZW", "PACKBITS", "DEFLATE", "NONE"}); |
|
61 |
driverParams.setParam("tfw", new Boolean("false"), Params.CHECK, null); |
|
62 |
} |
|
63 |
} |
|
0 | 64 |
org.gvsig.raster.gdal/tags/org.gvsig.raster.gdal-2.2.108/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/PngWriter.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.gdal.io; |
|
23 |
|
|
24 |
import java.awt.geom.AffineTransform; |
|
25 |
import java.io.File; |
|
26 |
import java.io.IOException; |
|
27 |
|
|
28 |
import org.cresques.cts.IProjection; |
|
29 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
30 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
|
31 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
|
32 |
import org.gvsig.fmap.dal.coverage.store.DataServerWriter; |
|
33 |
import org.gvsig.jgdal.GdalDataset; |
|
34 |
import org.gvsig.jgdal.GdalDriver; |
|
35 |
import org.gvsig.jgdal.GdalException; |
|
36 |
import org.gvsig.raster.gdal.io.features.PngFeatures; |
|
37 |
import org.gvsig.raster.impl.store.WriteFileFormatFeatures; |
|
38 |
import org.gvsig.raster.impl.store.writer.DefaultRasterWriter; |
|
39 |
import org.gvsig.raster.util.DefaultProviderServices; |
|
40 |
import org.gvsig.tools.ToolsLocator; |
|
41 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
|
42 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
|
43 |
/** |
|
44 |
* Driver para la escritura de Png. |
|
45 |
* Este driver utiliza GdalWriter para salvar Png. |
|
46 |
* La escritura de un png no es posible utilizando un servidor de datos |
|
47 |
* como el que usan los drivers comunes por lo que ser? necesario salvar antes |
|
48 |
* a Tif con el driver de Gdal para posteriormente convertir la imagen completa |
|
49 |
* a png. El problema que tiene es el mismo del jpg y es que el dataset solo soporta la |
|
50 |
* escritura rw y no rw+. |
|
51 |
* |
|
52 |
* @version 22/07/2008 |
|
53 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
54 |
*/ |
|
55 |
public class PngWriter extends DefaultRasterWriter { |
|
56 |
|
|
57 |
// Datos de registro de drivers |
|
58 |
public static void register() { |
|
59 |
DefaultProviderServices pInfo = (DefaultProviderServices)RasterLocator.getManager().getProviderServices(); |
|
60 |
ExtensionPointManager extensionPoints =ToolsLocator.getExtensionPointManager(); |
|
61 |
ExtensionPoint point=extensionPoints.get("RasterWriter"); |
|
62 |
point.append("png", "", PngWriter.class); |
|
63 |
pInfo.getFileFeature().put("png", new PngFeatures()); |
Also available in: Unified diff