Revision 44878
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.jpg/src/main/java/org/gvsig/fmap/dal/file/jpg/JpgLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
|
|
24 |
package org.gvsig.fmap.dal.file.jpg; |
|
25 |
|
|
26 |
import java.util.ArrayList; |
|
27 |
import java.util.List; |
|
28 |
|
|
29 |
import org.gvsig.fmap.dal.DALFileLibrary; |
|
30 |
import org.gvsig.fmap.dal.DALFileLocator; |
|
31 |
import org.gvsig.fmap.dal.DALLibrary; |
|
32 |
import org.gvsig.fmap.dal.FileHelper; |
|
33 |
import org.gvsig.fmap.dal.file.imageio.ImageIOFileSystemServerProviderFactory; |
|
34 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProvider; |
|
35 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProviderFactory; |
|
36 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProviderParameters; |
|
37 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerManager; |
|
38 |
import org.gvsig.fmap.dal.spi.DALSPILocator; |
|
39 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
40 |
import org.gvsig.metadata.MetadataLocator; |
|
41 |
import org.gvsig.metadata.MetadataManager; |
|
42 |
import org.gvsig.metadata.exceptions.MetadataException; |
|
43 |
import org.gvsig.tools.dynobject.DynClass; |
|
44 |
import org.gvsig.tools.library.AbstractLibrary; |
|
45 |
import org.gvsig.tools.library.LibraryException; |
|
46 |
|
|
47 |
/** |
|
48 |
* Jpg Library to register provider components |
|
49 |
* |
|
50 |
*/ |
|
51 |
public class JpgLibrary extends AbstractLibrary { |
|
52 |
|
|
53 |
|
|
54 |
public static String NAME = "JPEG"; |
|
55 |
public static String DESCRIPTION = "JPEG provider"; |
|
56 |
public static String[] FILE_EXTENSIONS = new String[]{"jpg", "jpeg"}; |
|
57 |
|
|
58 |
@Override |
|
59 |
public void doRegistration() { |
|
60 |
registerAsServiceOf(DALLibrary.class); |
|
61 |
require(DALFileLibrary.class); |
|
62 |
|
|
63 |
} |
|
64 |
|
|
65 |
@Override |
|
66 |
protected void doInitialize() throws LibraryException { |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
protected void doPostInitialize() throws LibraryException { |
|
71 |
List<Throwable> exs = new ArrayList<>(); |
|
72 |
|
|
73 |
FileHelper.registerParametersDefinition( |
|
74 |
NAME + "StoreProviderParameters", |
|
75 |
ImageIOStoreProviderParameters.class, |
|
76 |
this.getClass().getClassLoader(), |
|
77 |
this.getClass().getResource(NAME + "Parameters.xml")); |
|
78 |
try { |
|
79 |
try { |
|
80 |
FileHelper.registerMetadataDefinition( |
|
81 |
NAME, |
|
82 |
ImageIOStoreProvider.class, |
|
83 |
this.getClass().getClassLoader(), |
|
84 |
this.getClass().getResource(NAME + "Metadata.xml")); |
|
85 |
} catch (MetadataException e) { |
|
86 |
exs.add(e); |
|
87 |
} |
|
88 |
|
|
89 |
DataManagerProviderServices datamanager = DALSPILocator.getDataManagerProviderServices(); |
|
90 |
FilesystemServerExplorerManager explorerManager = DALFileLocator.getFilesystemServerExplorerManager(); |
|
91 |
|
|
92 |
if (!datamanager.getStoreProviders().contains(NAME)) { |
|
93 |
datamanager.registerStoreProviderFactory( |
|
94 |
new ImageIOStoreProviderFactory( |
|
95 |
NAME, |
|
96 |
DESCRIPTION)); |
|
97 |
} |
|
98 |
explorerManager.registerProviderFactory( |
|
99 |
new ImageIOFileSystemServerProviderFactory( |
|
100 |
NAME, |
|
101 |
DESCRIPTION, |
|
102 |
FILE_EXTENSIONS |
|
103 |
) |
|
104 |
); |
|
105 |
} catch (Exception e) { |
|
106 |
exs.add(e); |
|
107 |
} |
|
108 |
|
|
109 |
if (exs.size() > 0) { |
|
110 |
throw new LibraryException(this.getClass(), exs); |
|
111 |
} |
|
112 |
|
|
113 |
} |
|
114 |
|
|
115 |
public static DynClass getMatadataDefinition() { |
|
116 |
MetadataManager metadataManager = MetadataLocator.getMetadataManager(); |
|
117 |
DynClass metadataDefinition = (DynClass) metadataManager.getDefinition(NAME); |
|
118 |
return metadataDefinition; |
|
119 |
} |
|
120 |
|
|
121 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.jpg/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.dal.file.jpg.JpgLibrary |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.jpg/src/main/resources/org/gvsig/fmap/dal/file/jpg/JPEGMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields of a JIMI file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="JPEG" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a JPG store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.jpg/src/main/resources/org/gvsig/fmap/dal/file/jpg/JPEGParameters.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="JPEGStoreProviderParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<description>Store the parameters need to open a png file</description> |
|
10 |
<fields> |
|
11 |
<field name="file" type="file" mandatory="true" group="Basic"> |
|
12 |
<description>png file</description> |
|
13 |
</field> |
|
14 |
<field name="crs" type="crs" mandatory="true" group="Basic"> |
|
15 |
<description>The coordinate reference system used in this jpg file</description> |
|
16 |
</field> |
|
17 |
<field name="wldParams" type="object" mandatory="false" group="Basic" classOfValue="java.util.List"> |
|
18 |
<description>Info given by a wld file with geolocation</description> |
|
19 |
</field> |
|
20 |
</fields> |
|
21 |
</class> |
|
22 |
</classes> |
|
23 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.jpg/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
6 |
<version>2.0.273</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.fmap.dal.file.jpg</artifactId> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
<description>JPG Provider</description> |
|
11 |
<dependencies> |
|
12 |
|
|
13 |
<dependency> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
16 |
<scope>compile</scope> |
|
17 |
</dependency> |
|
18 |
|
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.raster.lib.buffer.spi</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.fmap.dal.file.imageio</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
</dependencies> |
|
35 |
</project> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.png/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.fmap.dal.file</artifactId> |
|
6 |
<version>2.0.273</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.fmap.dal.file.png</artifactId> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
<description>PNG provider</description> |
|
11 |
|
|
12 |
<dependencies> |
|
13 |
<dependency> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
16 |
<scope>compile</scope> |
|
17 |
</dependency> |
|
18 |
|
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.raster.lib.buffer.spi</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.fmap.dal.file.imageio</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
</dependencies> |
|
35 |
</project> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.png/src/main/java/org/gvsig/fmap/dal/file/png/PngLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.png; |
|
24 |
|
|
25 |
import java.util.ArrayList; |
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.dal.DALFileLibrary; |
|
29 |
import org.gvsig.fmap.dal.DALFileLocator; |
|
30 |
import org.gvsig.fmap.dal.DALLibrary; |
|
31 |
import org.gvsig.fmap.dal.FileHelper; |
|
32 |
import org.gvsig.fmap.dal.file.imageio.ImageIOFileSystemServerProviderFactory; |
|
33 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProvider; |
|
34 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProviderFactory; |
|
35 |
import org.gvsig.fmap.dal.file.imageio.ImageIOStoreProviderParameters; |
|
36 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerManager; |
|
37 |
import org.gvsig.fmap.dal.spi.DALSPILocator; |
|
38 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
39 |
import org.gvsig.metadata.MetadataLocator; |
|
40 |
import org.gvsig.metadata.MetadataManager; |
|
41 |
import org.gvsig.metadata.exceptions.MetadataException; |
|
42 |
import org.gvsig.tools.dynobject.DynClass; |
|
43 |
import org.gvsig.tools.library.AbstractLibrary; |
|
44 |
import org.gvsig.tools.library.LibraryException; |
|
45 |
|
|
46 |
/** |
|
47 |
* Png Library to register provider components |
|
48 |
* |
|
49 |
* @author fdiaz |
|
50 |
* |
|
51 |
*/ |
|
52 |
public class PngLibrary extends AbstractLibrary { |
|
53 |
|
|
54 |
public static String NAME = "PNG"; |
|
55 |
public static String DESCRIPTION = "PNG provider"; |
|
56 |
public static String[] FILE_EXTENSIONS = new String[]{"png"}; |
|
57 |
|
|
58 |
@Override |
|
59 |
public void doRegistration() { |
|
60 |
registerAsServiceOf(DALLibrary.class); |
|
61 |
require(DALFileLibrary.class); |
|
62 |
|
|
63 |
} |
|
64 |
|
|
65 |
@Override |
|
66 |
protected void doInitialize() throws LibraryException { |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
protected void doPostInitialize() throws LibraryException { |
|
71 |
List<Throwable> exs = new ArrayList<>(); |
|
72 |
|
|
73 |
FileHelper.registerParametersDefinition( |
|
74 |
NAME + "StoreProviderParameters", |
|
75 |
ImageIOStoreProviderParameters.class, |
|
76 |
this.getClass().getClassLoader(), |
|
77 |
this.getClass().getResource(NAME + "Parameters.xml")); |
|
78 |
try { |
|
79 |
try { |
|
80 |
FileHelper.registerMetadataDefinition( |
|
81 |
NAME, |
|
82 |
ImageIOStoreProvider.class, |
|
83 |
this.getClass().getClassLoader(), |
|
84 |
this.getClass().getResource(NAME + "Metadata.xml")); |
|
85 |
} catch (MetadataException e) { |
|
86 |
exs.add(e); |
|
87 |
} |
|
88 |
|
|
89 |
DataManagerProviderServices datamanager = DALSPILocator.getDataManagerProviderServices(); |
|
90 |
FilesystemServerExplorerManager explorerManager = DALFileLocator.getFilesystemServerExplorerManager(); |
|
91 |
|
|
92 |
if (!datamanager.getStoreProviders().contains(NAME)) { |
|
93 |
datamanager.registerStoreProviderFactory( |
|
94 |
new ImageIOStoreProviderFactory( |
|
95 |
NAME, |
|
96 |
DESCRIPTION)); |
|
97 |
} |
|
98 |
explorerManager.registerProviderFactory( |
|
99 |
new ImageIOFileSystemServerProviderFactory( |
|
100 |
NAME, |
|
101 |
DESCRIPTION, |
|
102 |
FILE_EXTENSIONS, |
|
103 |
true |
|
104 |
) |
|
105 |
); |
|
106 |
} catch (Exception e) { |
|
107 |
exs.add(e); |
|
108 |
} |
|
109 |
|
|
110 |
if (exs.size() > 0) { |
|
111 |
throw new LibraryException(this.getClass(), exs); |
|
112 |
} |
|
113 |
|
|
114 |
} |
|
115 |
|
|
116 |
public static DynClass getMatadataDefinition() { |
|
117 |
MetadataManager metadataManager = MetadataLocator.getMetadataManager(); |
|
118 |
DynClass metadataDefinition = (DynClass) metadataManager.getDefinition(NAME); |
|
119 |
return metadataDefinition; |
|
120 |
} |
|
121 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.png/src/main/resources/org/gvsig/fmap/dal/file/png/PNGParameters.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="PNGStoreProviderParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<description>Store the parameters need to open a png file</description> |
|
10 |
<fields> |
|
11 |
<field name="file" type="file" mandatory="true" group="Basic"> |
|
12 |
<description>png file</description> |
|
13 |
</field> |
|
14 |
<field name="crs" type="crs" mandatory="true" group="Basic"> |
|
15 |
<description>The coordinate reference system used in this jpg file</description> |
|
16 |
</field> |
|
17 |
<field name="wldParams" type="object" mandatory="false" group="Basic" classOfValue="java.util.List"> |
|
18 |
<description>Info given by a wld file with geolocation</description> |
|
19 |
</field> |
|
20 |
</fields> |
|
21 |
</class> |
|
22 |
</classes> |
|
23 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.png/src/main/resources/org/gvsig/fmap/dal/file/png/PNGMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields of a JIMI file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="PNG" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a PNG store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.png/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.dal.file.png.PngLibrary |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/resources/org/gvsig/fmap/dal/file/bsq/BSQMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields of a JIMI file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="BSQ" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a BSQ store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/resources/org/gvsig/fmap/dal/file/bsq/BSQParameters.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="BSQStoreProviderParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<description>Store the parameters need to open a tiff file</description> |
|
10 |
<fields> |
|
11 |
<field name="file" type="file" mandatory="true" group="Basic"> |
|
12 |
<description>tiff file</description> |
|
13 |
</field> |
|
14 |
<field name="crs" type="crs" mandatory="true" group="Basic"> |
|
15 |
<description>The coordinate reference system used in this BSQ file</description> |
|
16 |
</field> |
|
17 |
</fields> |
|
18 |
</class> |
|
19 |
</classes> |
|
20 |
</definitions> |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.dal.file.bsq.BSQLibrary |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQBandPageManager.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.fmap.dal.file.bsq; |
|
3 |
|
|
4 |
import java.io.File; |
|
5 |
import java.io.IOException; |
|
6 |
import java.io.RandomAccessFile; |
|
7 |
import java.nio.Buffer; |
|
8 |
import java.nio.ByteBuffer; |
|
9 |
import java.nio.ByteOrder; |
|
10 |
import java.nio.DoubleBuffer; |
|
11 |
import java.nio.FloatBuffer; |
|
12 |
import java.nio.IntBuffer; |
|
13 |
import java.nio.ShortBuffer; |
|
14 |
import org.apache.commons.io.IOUtils; |
|
15 |
import org.gvsig.raster.lib.buffer.api.BandInfo; |
|
16 |
import org.gvsig.raster.lib.buffer.api.BandPageManager; |
|
17 |
import org.gvsig.raster.lib.buffer.api.BufferLocator; |
|
18 |
import org.gvsig.raster.lib.buffer.api.BufferManager; |
|
19 |
import org.gvsig.tools.dispose.impl.AbstractDisposable; |
|
20 |
import org.gvsig.tools.exception.BaseException; |
|
21 |
|
|
22 |
public class BSQBandPageManager extends AbstractDisposable implements BandPageManager { |
|
23 |
|
|
24 |
private RandomAccessFile raf; |
|
25 |
private final int rows; |
|
26 |
private final int columns; |
|
27 |
private final int dataType; |
|
28 |
private final File file; |
|
29 |
private final long startpos; |
|
30 |
private final ByteOrder byteOrder; |
|
31 |
|
|
32 |
/** |
|
33 |
* @param file |
|
34 |
* @param startpos |
|
35 |
* @param rows |
|
36 |
* @param columns |
|
37 |
* @param dataType |
|
38 |
* @param byteOrder |
|
39 |
* @throws IOException |
|
40 |
*/ |
|
41 |
public BSQBandPageManager(File file, long startpos, int rows, int columns, int dataType, ByteOrder byteOrder) throws IOException { |
|
42 |
this.rows = rows; |
|
43 |
this.columns = columns; |
|
44 |
this.dataType = dataType; |
|
45 |
this.file = file; |
|
46 |
this.startpos = startpos; |
|
47 |
this.byteOrder = byteOrder; |
|
48 |
|
|
49 |
this.raf = new RandomAccessFile(this.file, "r"); |
|
50 |
// BufferManager bufferManager = BufferLocator.getBufferManager(); |
|
51 |
//raf.setLength(rows*columns*bufferManager.getDataTypeSize(dataType)); |
|
52 |
|
|
53 |
} |
|
54 |
|
|
55 |
@Override |
|
56 |
public void load(Buffer buffer, int row, int rows, int dataType) throws IOException { |
|
57 |
|
|
58 |
long pos = row*this.columns + this.startpos; |
|
59 |
raf.seek(pos); |
|
60 |
BufferManager bufferManager = BufferLocator.getBufferManager(); |
|
61 |
int dataTypeSize = bufferManager.getDataTypeSize(dataType); |
|
62 |
int elements = buffer.capacity(); |
|
63 |
|
|
64 |
ByteBuffer byteBuffer = ByteBuffer.allocate(elements * dataTypeSize); |
|
65 |
byteBuffer.order(this.byteOrder); |
|
66 |
raf.read(byteBuffer.array()); |
|
67 |
|
|
68 |
buffer.rewind(); |
|
69 |
byteBuffer.rewind(); |
|
70 |
|
|
71 |
switch (dataType) { |
|
72 |
case BufferManager.TYPE_BYTE: |
|
73 |
((ByteBuffer) buffer).put(byteBuffer); |
|
74 |
break; |
|
75 |
case BufferManager.TYPE_SHORT: |
|
76 |
case BufferManager.TYPE_USHORT: |
|
77 |
for( int element =0 ; element<elements ; element++ ) { |
|
78 |
((ShortBuffer) buffer).put(byteBuffer.getShort()); |
|
79 |
} |
|
80 |
break; |
|
81 |
case BufferManager.TYPE_INT: |
|
82 |
for( int element =0 ; element<elements ; element++ ) { |
|
83 |
((IntBuffer) buffer).put(byteBuffer.getInt()); |
|
84 |
} |
|
85 |
break; |
|
86 |
case BufferManager.TYPE_FLOAT: |
|
87 |
for( int element=0 ; element<elements ; element++ ) { |
|
88 |
((FloatBuffer) buffer).put(byteBuffer.getFloat()); |
|
89 |
} |
|
90 |
break; |
|
91 |
|
|
92 |
case BufferManager.TYPE_DOUBLE: |
|
93 |
for( int element=0 ; element<elements ; element++ ) { |
|
94 |
((DoubleBuffer) buffer).put(byteBuffer.getDouble()); |
|
95 |
} |
|
96 |
break; |
|
97 |
|
|
98 |
default: |
|
99 |
throw new IllegalArgumentException("Data Type " + dataType + " not supported."); |
|
100 |
} |
|
101 |
} |
|
102 |
|
|
103 |
@Override |
|
104 |
public void save(Buffer buffer, int row, int rows, int dataType) throws IOException { |
|
105 |
|
|
106 |
} |
|
107 |
|
|
108 |
@Override |
|
109 |
public boolean isSupportedSave() { |
|
110 |
return false; |
|
111 |
} |
|
112 |
|
|
113 |
@Override |
|
114 |
public BandInfo getBandInfo() { |
|
115 |
return null; |
|
116 |
} |
|
117 |
|
|
118 |
@Override |
|
119 |
protected void doDispose() throws BaseException { |
|
120 |
IOUtils.closeQuietly(this.raf); |
|
121 |
this.raf = null; |
|
122 |
} |
|
123 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/FileOpenRasterStoreParameters.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.bsq; |
|
24 |
|
|
25 |
import java.io.File; |
|
26 |
|
|
27 |
import org.slf4j.Logger; |
|
28 |
import org.slf4j.LoggerFactory; |
|
29 |
|
|
30 |
import org.gvsig.fmap.dal.FileHelper; |
|
31 |
import org.gvsig.fmap.dal.raster.OpenRasterStoreParameters; |
|
32 |
import org.gvsig.fmap.dal.raster.spi.AbstractOpenRasterStoreParameters; |
|
33 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
|
34 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
|
35 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
|
36 |
|
|
37 |
|
|
38 |
public class FileOpenRasterStoreParameters |
|
39 |
extends |
|
40 |
AbstractOpenRasterStoreParameters |
|
41 |
implements |
|
42 |
OpenRasterStoreParameters, |
|
43 |
FilesystemStoreParameters |
|
44 |
{ |
|
45 |
|
|
46 |
protected static final Logger logger = LoggerFactory.getLogger(FileOpenRasterStoreParameters.class); |
|
47 |
|
|
48 |
public static final String FILE_PARAMTER_NAME = "file"; |
|
49 |
|
|
50 |
protected DelegatedDynObject parameters; |
|
51 |
|
|
52 |
/** |
|
53 |
* Constructor |
|
54 |
* @param name |
|
55 |
*/ |
|
56 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
|
57 |
public FileOpenRasterStoreParameters(String name) { |
|
58 |
super(); |
|
59 |
this.parameters = (DelegatedDynObject) FileHelper.newParameters(name+"StoreProviderParameters"); |
|
60 |
this.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, name); |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
public boolean isValid() { |
|
65 |
return (this.getFile() != null); |
|
66 |
} |
|
67 |
|
|
68 |
@Override |
|
69 |
public File getFile() { |
|
70 |
return (File) this.getDynValue(FILE_PARAMTER_NAME); |
|
71 |
} |
|
72 |
|
|
73 |
@Override |
|
74 |
public void setFile(File file) { |
|
75 |
this.setDynValue(FILE_PARAMTER_NAME, file); |
|
76 |
} |
|
77 |
|
|
78 |
@Override |
|
79 |
protected DelegatedDynObject getDelegatedDynObject() { |
|
80 |
return parameters; |
|
81 |
} |
|
82 |
|
|
83 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQFileSystemServerProviderFactory.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2018 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.bsq; |
|
24 |
|
|
25 |
import java.io.File; |
|
26 |
|
|
27 |
import org.apache.commons.io.FilenameUtils; |
|
28 |
import org.gvsig.fmap.dal.DALLocator; |
|
29 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
30 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
31 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProviderFactory; |
|
32 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider; |
|
33 |
|
|
34 |
|
|
35 |
public class BSQFileSystemServerProviderFactory extends AbstractFilesystemServerExplorerProviderFactory { |
|
36 |
|
|
37 |
protected String[] fileExtensions; |
|
38 |
|
|
39 |
public BSQFileSystemServerProviderFactory( |
|
40 |
String name, |
|
41 |
String description, |
|
42 |
String[] fileExtensions |
|
43 |
) { |
|
44 |
super(name, description); |
|
45 |
this.fileExtensions = fileExtensions; |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public FilesystemServerExplorerProvider createProvider() throws InitializeException { |
|
50 |
return new BSQFileSystemServerProvider( |
|
51 |
this, |
|
52 |
this.getName(), |
|
53 |
this.getDescription(), |
|
54 |
this.fileExtensions |
|
55 |
); |
|
56 |
} |
|
57 |
|
|
58 |
@Override |
|
59 |
public boolean accept(File pathname) { |
|
60 |
return FilenameUtils.isExtension(pathname.getName().toLowerCase(), this.fileExtensions); |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
public int getMode() { |
|
65 |
return DataServerExplorer.MODE_RASTER; |
|
66 |
} |
|
67 |
|
|
68 |
@Override |
|
69 |
public boolean isHidden() { |
|
70 |
return DALLocator.getDataManager().isTheOldRasterRegistered(); |
|
71 |
} |
|
72 |
|
|
73 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQStoreProviderFactory.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.bsq; |
|
24 |
|
|
25 |
import org.gvsig.fmap.dal.DALLocator; |
|
26 |
import org.slf4j.Logger; |
|
27 |
import org.slf4j.LoggerFactory; |
|
28 |
|
|
29 |
import org.gvsig.fmap.dal.DataParameters; |
|
30 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
31 |
import org.gvsig.fmap.dal.raster.OpenRasterStoreParameters; |
|
32 |
import org.gvsig.fmap.dal.raster.spi.AbstractRasterStoreProviderFactory; |
|
33 |
import org.gvsig.fmap.dal.raster.spi.RasterStoreProvider; |
|
34 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
|
35 |
|
|
36 |
|
|
37 |
public class BSQStoreProviderFactory extends AbstractRasterStoreProviderFactory { |
|
38 |
|
|
39 |
protected static final Logger logger = LoggerFactory.getLogger(BSQStoreProviderFactory.class); |
|
40 |
|
|
41 |
public BSQStoreProviderFactory(String name, String description) { |
|
42 |
super(name, description); |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
public RasterStoreProvider createProvider(DataParameters parameters, |
|
47 |
DataStoreProviderServices providerServices) throws InitializeException { |
|
48 |
return new BSQStoreProvider( |
|
49 |
this.getName(), |
|
50 |
this.getDescription(), |
|
51 |
(OpenRasterStoreParameters)parameters, |
|
52 |
providerServices |
|
53 |
); |
|
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
public OpenRasterStoreParameters createParameters() { |
|
58 |
return new FileOpenRasterStoreParameters(this.getName()); |
|
59 |
} |
|
60 |
|
|
61 |
@Override |
|
62 |
public boolean isHidden() { |
|
63 |
return DALLocator.getDataManager().isTheOldRasterRegistered(); |
|
64 |
} |
|
65 |
|
|
66 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.bsq; |
|
24 |
|
|
25 |
import java.util.ArrayList; |
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.dal.DALFileLibrary; |
|
29 |
import org.gvsig.fmap.dal.DALFileLocator; |
|
30 |
import org.gvsig.fmap.dal.DALLibrary; |
|
31 |
import org.gvsig.fmap.dal.FileHelper; |
|
32 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerManager; |
|
33 |
import org.gvsig.fmap.dal.spi.DALSPILocator; |
|
34 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
35 |
import org.gvsig.metadata.MetadataLocator; |
|
36 |
import org.gvsig.metadata.MetadataManager; |
|
37 |
import org.gvsig.metadata.exceptions.MetadataException; |
|
38 |
import org.gvsig.tools.dynobject.DynClass; |
|
39 |
import org.gvsig.tools.library.AbstractLibrary; |
|
40 |
import org.gvsig.tools.library.LibraryException; |
|
41 |
|
|
42 |
/** |
|
43 |
* BSQ, Band Sequential Format, Library to register provider components |
|
44 |
* |
|
45 |
*/ |
|
46 |
public class BSQLibrary extends AbstractLibrary { |
|
47 |
|
|
48 |
public static String NAME = "BSQ"; |
|
49 |
public static String DESCRIPTION = "BSQ provider"; |
|
50 |
public static String[] FILE_EXTENSIONS = new String[]{"bsq"}; |
|
51 |
|
|
52 |
@Override |
|
53 |
public void doRegistration() { |
|
54 |
registerAsServiceOf(DALLibrary.class); |
|
55 |
require(DALFileLibrary.class); |
|
56 |
|
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
protected void doInitialize() throws LibraryException { |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
protected void doPostInitialize() throws LibraryException { |
|
65 |
List<Throwable> exs = new ArrayList<>(); |
|
66 |
|
|
67 |
|
|
68 |
FileHelper.registerParametersDefinition( |
|
69 |
NAME + "StoreProviderParameters", |
|
70 |
FileOpenRasterStoreParameters.class, |
|
71 |
this.getClass().getClassLoader(), |
|
72 |
this.getClass().getResource(NAME + "Parameters.xml")); |
|
73 |
try { |
|
74 |
try { |
|
75 |
FileHelper.registerMetadataDefinition( |
|
76 |
NAME, |
|
77 |
BSQStoreProvider.class, |
|
78 |
this.getClass().getClassLoader(), |
|
79 |
this.getClass().getResource(NAME + "Metadata.xml")); |
|
80 |
} catch (MetadataException e) { |
|
81 |
exs.add(e); |
|
82 |
} |
|
83 |
|
|
84 |
DataManagerProviderServices datamanager = DALSPILocator.getDataManagerProviderServices(); |
|
85 |
FilesystemServerExplorerManager explorerManager = DALFileLocator.getFilesystemServerExplorerManager(); |
|
86 |
|
|
87 |
if (!datamanager.getStoreProviders().contains(NAME)) { |
|
88 |
datamanager.registerStoreProviderFactory( |
|
89 |
new BSQStoreProviderFactory( |
|
90 |
NAME, |
|
91 |
DESCRIPTION)); |
|
92 |
} |
|
93 |
explorerManager.registerProviderFactory( |
|
94 |
new BSQFileSystemServerProviderFactory( |
|
95 |
NAME, |
|
96 |
DESCRIPTION, |
|
97 |
FILE_EXTENSIONS |
|
98 |
) |
|
99 |
); |
|
100 |
} catch (Exception e) { |
|
101 |
exs.add(e); |
|
102 |
} |
|
103 |
|
|
104 |
if (exs.size() > 0) { |
|
105 |
throw new LibraryException(this.getClass(), exs); |
|
106 |
} |
|
107 |
} |
|
108 |
|
|
109 |
public static DynClass getMatadataDefinition() { |
|
110 |
MetadataManager metadataManager = MetadataLocator.getMetadataManager(); |
|
111 |
DynClass metadataDefinition = (DynClass) metadataManager.getDefinition(NAME); |
|
112 |
return metadataDefinition; |
|
113 |
}} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/AbstractFileRasterStoreProvider.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.fmap.dal.file.bsq; |
|
3 |
|
|
4 |
import java.io.File; |
|
5 |
import java.util.ArrayList; |
|
6 |
import java.util.HashMap; |
|
7 |
import java.util.List; |
|
8 |
import java.util.Map; |
|
9 |
import org.apache.commons.io.FilenameUtils; |
|
10 |
import org.cresques.cts.IProjection; |
|
11 |
import org.gvsig.basicformats.FormatsFile; |
|
12 |
import org.gvsig.basicformats.PRJFile; |
|
13 |
import org.gvsig.basicformats.STXFile; |
|
14 |
import org.gvsig.basicformats.WLDFile; |
|
15 |
import org.gvsig.fmap.dal.DALLocator; |
|
16 |
import org.gvsig.fmap.dal.DataManager; |
|
17 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
18 |
import org.gvsig.fmap.dal.DataStore; |
|
19 |
import org.gvsig.fmap.dal.DataStoreNotification; |
|
20 |
import org.gvsig.fmap.dal.FileHelper; |
|
21 |
import org.gvsig.fmap.dal.exception.DataException; |
|
22 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
23 |
import org.gvsig.fmap.dal.exception.OpenException; |
|
24 |
import org.gvsig.fmap.dal.exception.ReadException; |
|
25 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
26 |
import org.gvsig.fmap.dal.raster.OpenRasterStoreParameters; |
|
27 |
import org.gvsig.fmap.dal.raster.BandQuery; |
|
28 |
import org.gvsig.fmap.dal.raster.RasterQuery; |
|
29 |
import org.gvsig.fmap.dal.raster.spi.AbstractAwtRasterStoreProvider; |
|
30 |
import org.gvsig.fmap.dal.raster.spi.AbstractRasterStoreProvider; |
|
31 |
import org.gvsig.fmap.dal.resource.file.FileResource; |
|
32 |
import org.gvsig.fmap.dal.resource.spi.ResourceConsumer; |
|
33 |
import org.gvsig.fmap.dal.resource.spi.ResourceProvider; |
|
34 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer; |
|
35 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters; |
|
36 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
|
37 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
|
38 |
import org.gvsig.fmap.geom.Geometry; |
|
39 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
40 |
import org.gvsig.raster.lib.buffer.api.Buffer; |
|
41 |
import org.gvsig.raster.lib.buffer.api.BufferDimensions; |
|
42 |
import org.gvsig.raster.lib.buffer.api.BufferLocator; |
|
43 |
import org.gvsig.raster.lib.buffer.api.BufferManager; |
|
44 |
import org.gvsig.raster.lib.buffer.api.NoData; |
|
45 |
import org.gvsig.raster.lib.buffer.api.PageManager; |
|
46 |
import org.gvsig.raster.lib.buffer.api.TileStruct; |
|
47 |
import org.gvsig.raster.lib.buffer.api.exceptions.BufferException; |
|
48 |
import org.gvsig.raster.lib.buffer.spi.DefaultTileStruct; |
|
49 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
|
50 |
import org.gvsig.tools.exception.BaseException; |
|
51 |
import org.slf4j.Logger; |
|
52 |
import org.slf4j.LoggerFactory; |
|
53 |
|
|
54 |
|
|
55 |
public abstract class AbstractFileRasterStoreProvider |
|
56 |
extends AbstractRasterStoreProvider |
|
57 |
implements ResourceConsumer |
|
58 |
{ |
|
59 |
|
|
60 |
private static final Logger logger = LoggerFactory.getLogger(AbstractAwtRasterStoreProvider.class); |
|
61 |
|
|
62 |
protected Envelope envelope = null; |
|
63 |
protected IProjection projection = null; |
|
64 |
protected List<PageManager> pageManagers; |
|
65 |
protected TileStruct tileStruct; |
|
66 |
protected String storeProviderName; |
|
67 |
protected String storeProviderDescription; |
|
68 |
protected ResourceProvider resource; |
|
69 |
|
|
70 |
protected WLDFile wldFile; |
|
71 |
protected PRJFile prjFile; |
|
72 |
protected STXFile stxFile; |
|
73 |
// protected CLRFile clrFile; |
|
74 |
|
|
75 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
|
76 |
public AbstractFileRasterStoreProvider( |
|
77 |
String storeProviderName, |
|
78 |
String storeProviderDescription, |
|
79 |
OpenRasterStoreParameters params, |
|
80 |
DataStoreProviderServices storeServices |
|
81 |
) throws InitializeException { |
|
82 |
super( |
|
83 |
params, |
|
84 |
storeServices, |
|
85 |
FileHelper.newMetadataContainer(storeProviderName) |
|
86 |
); |
|
87 |
this.storeProviderName = storeProviderName; |
|
88 |
this.storeProviderDescription = storeProviderDescription; |
|
89 |
this.init(params, storeServices); |
|
90 |
} |
|
91 |
|
|
92 |
protected void init(OpenRasterStoreParameters params, DataStoreProviderServices storeServices) throws InitializeException { |
|
93 |
File file = this.getFile(); |
|
94 |
if (file == null) { |
|
95 |
throw new InitializeException( |
|
96 |
new NullPointerException(this.storeProviderName +" file is null")); |
|
97 |
} |
|
98 |
|
|
99 |
this.wldFile = FormatsFile.getWLDFile(this.getFile()); |
|
100 |
this.prjFile = FormatsFile.getPRJFile(this.getFile()); |
|
101 |
this.stxFile = FormatsFile.getSTXFile(this.getFile()); |
|
102 |
// this.clrFile = UtilsFile.createCLRFile(this.getFile()); |
|
103 |
|
|
104 |
this.projection = (IProjection) params.getDynValue(DataStore.METADATA_CRS); |
|
105 |
if( this.projection==null ) { |
|
106 |
this.projection = this.prjFile.getCRS(); |
|
107 |
} |
|
108 |
|
|
109 |
resource = this.createResource( |
|
110 |
FileResource.NAME, |
|
111 |
new Object[] { file.getAbsolutePath() } |
|
112 |
); |
|
113 |
|
|
114 |
resource.addConsumer(this); |
|
115 |
} |
|
116 |
|
|
117 |
@Override |
|
118 |
public ResourceProvider getResource() { |
|
119 |
return this.resource; |
|
120 |
} |
|
121 |
|
|
122 |
protected File getFile() { |
|
123 |
return ((FilesystemStoreParameters)this.getParameters()).getFile(); |
|
124 |
} |
|
125 |
|
|
126 |
@Override |
|
127 |
public Object getSourceId() { |
|
128 |
return this.getFile(); |
|
129 |
} |
|
130 |
|
|
131 |
@Override |
|
132 |
public String getName() { |
|
133 |
String name = this.getFile().getName(); |
|
134 |
return FilenameUtils.getBaseName(name); |
|
135 |
} |
|
136 |
|
|
137 |
@Override |
|
138 |
public String getFullName() { |
|
139 |
return this.getFile().getAbsolutePath(); |
|
140 |
} |
|
141 |
|
|
142 |
@Override |
|
143 |
public String getProviderName() { |
|
144 |
return this.storeProviderName; |
|
145 |
} |
|
146 |
|
|
147 |
@Override |
|
148 |
public boolean closeResourceRequested(ResourceProvider resource) { |
|
149 |
return true; |
|
150 |
} |
|
151 |
|
|
152 |
@Override |
|
153 |
public void resourceChanged(ResourceProvider resource) { |
|
154 |
this.getStoreServices().notifyChange( |
|
155 |
DataStoreNotification.RESOURCE_CHANGED, |
|
156 |
resource); |
|
157 |
} |
|
158 |
|
|
159 |
@Override |
|
160 |
protected void doDispose() throws BaseException { |
|
161 |
super.doDispose(); |
|
162 |
} |
|
163 |
|
|
164 |
@Override |
|
165 |
public DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException { |
|
166 |
DataManager manager = DALLocator.getDataManager(); |
|
167 |
FilesystemServerExplorerParameters params; |
|
168 |
try { |
|
169 |
params = (FilesystemServerExplorerParameters) manager |
|
170 |
.createServerExplorerParameters(FilesystemServerExplorer.NAME); |
|
171 |
params.setRoot(this.getFile().getParent()); |
|
172 |
return manager.openServerExplorer(FilesystemServerExplorer.NAME,params); |
|
173 |
} catch (DataException | ValidateDataParametersException e) { |
|
174 |
throw new ReadException(this.getProviderName(), e); |
|
175 |
} |
|
176 |
|
|
177 |
} |
|
178 |
|
|
179 |
@Override |
|
180 |
public BufferDimensions getDimensions() { |
|
181 |
if(this.dimensions==null){ |
|
182 |
this.dimensions = BufferLocator.getBufferManager().createBufferDimensions( |
|
183 |
this.getRows(), |
|
184 |
this.getColumns(), |
|
185 |
this.getEnvelope() |
|
186 |
); |
|
187 |
} |
|
188 |
return this.dimensions; |
|
189 |
} |
|
190 |
|
|
191 |
@Override |
|
192 |
public TileStruct getTileStruct() { |
|
193 |
|
|
194 |
List<Double> pixelSizes = new ArrayList<>(); |
|
195 |
Map<Integer, Double> zoomLevels = new HashMap<>(); |
|
196 |
|
|
197 |
if (this.tileStruct == null) { |
|
198 |
|
|
199 |
tileStruct = new DefaultTileStruct(); |
|
200 |
|
|
201 |
int completeRows = getRows(); |
|
202 |
int completeColumns = getColumns(); |
|
203 |
double completePixelSizeX = envelope.getLength(Geometry.DIMENSIONS.X) / completeColumns; |
|
204 |
double completePixelSizeY = envelope.getLength(Geometry.DIMENSIONS.Y) / completeRows; |
|
205 |
|
|
206 |
int maximumLength = completeColumns; |
|
207 |
int tileMaximumLength = tileStruct.getColumnsPerTile(); // tileSizeX; |
|
208 |
double maximumPixelSize = completePixelSizeX; |
|
209 |
|
|
210 |
if (completeRows * tileStruct.getRowsPerTile() > completeColumns * tileStruct.getColumnsPerTile()) { |
|
211 |
maximumLength = completeRows; |
|
212 |
tileMaximumLength = tileStruct.getRowsPerTile(); |
|
213 |
maximumPixelSize = completePixelSizeY; |
|
214 |
} |
|
215 |
|
|
216 |
double pixelSize = maximumPixelSize; |
|
217 |
while (maximumLength * maximumPixelSize / pixelSize > tileMaximumLength) { |
|
218 |
pixelSizes.add(pixelSize); |
|
219 |
pixelSize = pixelSize * 2; |
|
220 |
} |
|
221 |
pixelSizes.add(pixelSize); |
|
222 |
int i = 0; |
|
223 |
for (int zoomLevel = pixelSizes.size() - 1; zoomLevel >= 0; zoomLevel--) { |
|
224 |
zoomLevels.put(i, pixelSizes.get(zoomLevel)); |
|
225 |
i++; |
|
226 |
} |
|
227 |
} |
|
228 |
|
|
229 |
return tileStruct; |
|
230 |
|
|
231 |
} |
|
232 |
|
|
233 |
@Override |
|
234 |
public Object getDynValue(String name) throws DynFieldNotFoundException { |
|
235 |
switch(name) { |
|
236 |
case DataStore.METADATA_CRS: |
|
237 |
return this.getProjection(); |
|
238 |
|
|
239 |
case DataStore.METADATA_ENVELOPE: |
|
240 |
return this.getProjection(); |
|
241 |
|
|
242 |
default: |
|
243 |
return super.getDynValue(name); |
|
244 |
} |
|
245 |
} |
|
246 |
|
|
247 |
@Override |
|
248 |
public void setDynValue(String name, Object value) |
|
249 |
throws DynFieldNotFoundException { |
|
250 |
switch(name) { |
|
251 |
case DataStore.METADATA_CRS: |
|
252 |
this.projection = (IProjection) value; |
|
253 |
break; |
|
254 |
|
|
255 |
case DataStore.METADATA_ENVELOPE: |
|
256 |
this.envelope = (Envelope) value; |
|
257 |
break; |
|
258 |
|
|
259 |
default: |
|
260 |
super.setDynValue(name, value); |
|
261 |
break; |
|
262 |
} |
|
263 |
} |
|
264 |
|
|
265 |
protected List<PageManager> getPageManagers() { |
|
266 |
this.autoOpen(); |
|
267 |
return this.pageManagers; |
|
268 |
} |
|
269 |
|
|
270 |
protected IProjection getProjection() { |
|
271 |
this.autoOpen(); |
|
272 |
return this.projection; |
|
273 |
} |
|
274 |
|
|
275 |
protected Envelope getEnvelope() { |
|
276 |
this.autoOpen(); |
|
277 |
return this.envelope; |
|
278 |
} |
|
279 |
|
|
280 |
@Override |
|
281 |
public Buffer createBuffer(RasterQuery rasterQuery) throws BufferException { |
|
282 |
BufferManager bufferManager = BufferLocator.getBufferManager(); |
|
283 |
int[] bandDataTypes; |
|
284 |
List<PageManager> thePageManagers = new ArrayList<>(); |
|
285 |
NoData[] bandNoData; |
|
286 |
if (rasterQuery != null && !rasterQuery.getBands().isEmpty() ) { |
|
287 |
List<BandQuery> bands; |
|
288 |
bands = rasterQuery.getBands(); |
|
289 |
bandDataTypes = new int[bands.size()]; |
|
290 |
bandNoData = new NoData[bands.size()]; |
|
291 |
|
|
292 |
for (BandQuery bandQuery : bands) { |
|
293 |
int band = bandQuery.getBand(); |
|
294 |
bandDataTypes[band] = this.getBandDescriptor(band).getDataType(); |
|
295 |
bandNoData[band] = this.getNoData(rasterQuery, band); |
|
296 |
thePageManagers.add(this.getPageManagers().get(band)); |
|
297 |
} |
|
298 |
} else { |
|
299 |
bandDataTypes = this.getDataTypes(); |
|
300 |
bandNoData = this.getNoDatas(); |
|
301 |
thePageManagers = this.getPageManagers(); |
|
302 |
} |
|
303 |
|
|
304 |
Buffer buffer = bufferManager.createBuffer( |
|
305 |
this.getRows(), |
|
306 |
this.getColumns(), |
|
307 |
bandDataTypes, |
|
308 |
bandNoData, |
|
309 |
this.getProjection(), |
|
310 |
this.getEnvelope(), |
|
311 |
thePageManagers |
|
312 |
); |
|
313 |
|
|
314 |
return buffer; |
|
315 |
} |
|
316 |
|
|
317 |
@Override |
|
318 |
public abstract void open() throws OpenException; |
|
319 |
|
|
320 |
@Override |
|
321 |
public abstract int getBands(); |
|
322 |
|
|
323 |
public abstract int getRows(); |
|
324 |
|
|
325 |
public abstract int getColumns(); |
|
326 |
|
|
327 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQFileSystemServerProvider.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.fmap.dal.file.bsq; |
|
24 |
|
|
25 |
import java.io.DataOutputStream; |
|
26 |
import java.io.File; |
|
27 |
import java.io.FileOutputStream; |
|
28 |
import java.io.IOException; |
|
29 |
import java.nio.ByteOrder; |
|
30 |
import org.apache.commons.io.FilenameUtils; |
|
31 |
import org.apache.commons.io.IOUtils; |
|
32 |
import org.gvsig.basicformats.FormatsFile; |
|
33 |
import org.gvsig.basicformats.HDRFile; |
|
34 |
|
|
35 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
36 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
|
37 |
import org.gvsig.fmap.dal.exception.CreateException; |
|
38 |
import org.gvsig.fmap.dal.exception.DataException; |
|
39 |
import org.gvsig.fmap.dal.raster.NewRasterStoreParameters; |
|
40 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
|
41 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider; |
|
42 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderFactory; |
|
43 |
import org.gvsig.raster.lib.buffer.api.Band; |
|
44 |
import org.gvsig.raster.lib.buffer.api.Buffer; |
|
45 |
import org.gvsig.raster.lib.buffer.api.BufferDimensions; |
|
46 |
import org.gvsig.raster.lib.buffer.api.BufferManager; |
|
47 |
|
|
48 |
public class BSQFileSystemServerProvider extends AbstractFilesystemServerExplorerProvider { |
|
49 |
|
|
50 |
protected String[] fileExtensions; |
|
51 |
|
|
52 |
public BSQFileSystemServerProvider( |
|
53 |
FilesystemServerExplorerProviderFactory factory, |
|
54 |
String name, |
|
55 |
String description, |
|
56 |
String[] fileExtensions |
|
57 |
) { |
|
58 |
super(factory, name, description); |
|
59 |
this.fileExtensions = fileExtensions; |
|
60 |
} |
|
61 |
|
|
62 |
@Override |
|
63 |
public boolean canCreate() { |
|
64 |
return true; |
|
65 |
} |
|
66 |
|
|
67 |
@Override |
|
68 |
public NewDataStoreParameters getCreateParameters() throws DataException { |
|
69 |
throw new UnsupportedOperationException(); |
|
70 |
} |
|
71 |
|
|
72 |
@Override |
|
73 |
public void create(NewDataStoreParameters parameters, boolean overwrite) throws CreateException { |
|
74 |
FileOutputStream fos = null; |
|
75 |
try { |
|
76 |
Buffer buffer = ((NewRasterStoreParameters) parameters).getBuffer(); |
|
77 |
if (!buffer.areAllBandsOfTheSameType()) { |
|
78 |
throw new IllegalArgumentException("The BSQ format does not support bands of different types."); |
|
79 |
} |
|
80 |
BufferDimensions dimensions = buffer.getDimensions(); |
|
81 |
File file = ((FilesystemStoreParameters) parameters).getFile(); |
|
82 |
fos = new FileOutputStream(file); |
|
83 |
DataOutputStream dos = new DataOutputStream(fos); |
|
84 |
HDRFile hdr = FormatsFile.createHDRFile(); |
|
85 |
hdr.setDataType(buffer.getBandTypes()[0]); |
|
86 |
hdr.setNBands(buffer.getBandCount()); |
|
87 |
hdr.setByteOrder(ByteOrder.nativeOrder()); |
|
88 |
hdr.setDimensions( |
|
89 |
dimensions.getRows(), |
|
90 |
dimensions.getColumns(), |
|
91 |
dimensions.getEnvelope() |
|
92 |
); |
|
93 |
for (int nband = 0; nband < buffer.getBandCount(); nband++) { |
|
94 |
writeBand(dos, buffer.getBand(nband)); |
|
95 |
} |
|
96 |
hdr.write(file); |
|
97 |
} catch (Exception ex) { |
|
98 |
throw new CreateException(this.getName(), ex); |
|
99 |
} finally { |
|
100 |
IOUtils.closeQuietly(fos); |
|
101 |
} |
|
102 |
} |
|
103 |
|
|
104 |
void writeBand(DataOutputStream dos, Band band) throws IOException { |
|
105 |
int dataType = band.getDataType(); |
|
106 |
Object rowBuffer = band.createRowBuffer(); |
|
107 |
for (int row = 0; row < band.getRows(); row++) { |
|
108 |
band.fetchRow(row, rowBuffer); |
|
109 |
switch (dataType) { |
|
110 |
case BufferManager.TYPE_BYTE: |
|
111 |
byte[] byteBuffer = (byte[]) rowBuffer; |
|
112 |
for (int n = 0; n < byteBuffer.length; n++) { |
|
113 |
dos.writeByte(byteBuffer[n]); |
|
114 |
} |
|
115 |
break; |
|
116 |
case BufferManager.TYPE_SHORT: |
|
117 |
case BufferManager.TYPE_USHORT: |
|
118 |
short[] shortBuffer = (short[]) rowBuffer; |
|
119 |
for (int n = 0; n < shortBuffer.length; n++) { |
|
120 |
dos.writeShort(shortBuffer[n]); |
|
121 |
} |
|
122 |
break; |
|
123 |
case BufferManager.TYPE_INT: |
|
124 |
int[] intBuffer = (int[]) rowBuffer; |
|
125 |
for (int n = 0; n < intBuffer.length; n++) { |
|
126 |
dos.writeInt(intBuffer[n]); |
|
127 |
} |
|
128 |
break; |
|
129 |
case BufferManager.TYPE_FLOAT: |
|
130 |
float[] floatBuffer = (float[]) rowBuffer; |
|
131 |
for (int n = 0; n < floatBuffer.length; n++) { |
|
132 |
dos.writeFloat(floatBuffer[n]); |
|
133 |
} |
|
134 |
break; |
|
135 |
|
|
136 |
case BufferManager.TYPE_DOUBLE: |
|
137 |
double[] doubleBuffer = (double[]) rowBuffer; |
|
138 |
for (int n = 0; n < doubleBuffer.length; n++) { |
|
139 |
dos.writeDouble(doubleBuffer[n]); |
|
140 |
} |
|
141 |
break; |
|
142 |
|
|
143 |
default: |
|
144 |
throw new IllegalArgumentException("Data Type " + dataType + " not supported."); |
|
145 |
} |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 |
@Override |
|
150 |
public int getMode() { |
|
151 |
return DataServerExplorer.MODE_RASTER; |
|
152 |
} |
|
153 |
|
|
154 |
@Override |
|
155 |
public boolean accept(File pathname) { |
|
156 |
return FilenameUtils.isExtension(pathname.getName().toLowerCase(), this.fileExtensions); |
|
157 |
} |
|
158 |
} |
tags/org.gvsig.desktop-2.0.273/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.bsq/src/main/java/org/gvsig/fmap/dal/file/bsq/BSQStoreProvider.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
Also available in: Unified diff