Statistics
| Revision:

gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.raster / org.gvsig.fmap.dal.raster / org.gvsig.fmap.dal.raster.api / src / main / java / org / gvsig / fmap / dal / raster / api / RasterStore.java @ 8691

History | View | Annotate | Download (5.25 KB)

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.raster.api;
24

    
25
import java.util.List;
26

    
27
import org.gvsig.fmap.dal.DataStore;
28
import org.gvsig.fmap.dal.DataStoreParameters;
29
import org.gvsig.fmap.dal.exception.DataException;
30
import org.gvsig.fmap.dal.exception.InitializeException;
31
import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
32
import org.gvsig.fmap.geom.primitive.Envelope;
33
import org.gvsig.raster.lib.buffer.api.BandInfo;
34
import org.gvsig.raster.lib.buffer.api.BufferDimensions;
35
import org.gvsig.tools.dynobject.DynObject;
36
import org.gvsig.tools.lang.Cloneable;
37
import org.gvsig.tools.locator.LocatorException;
38

    
39
/**
40
 * Store for rasters
41
 * @author dmartinezizquierdo
42
 *
43
 */
44
public interface RasterStore extends DataStore, Cloneable{
45

    
46
    /**
47
     * May provide a dynamic method to get the legend
48
     */
49
    final public static String DYNMETHOD_GETLEGEND_NAME = "getLegend";
50

    
51
    /**
52
     * May provide a dynamic method to get the Color Interpretation
53
     */
54
    final public static String DYNMETHOD_GETCOLORINTERPRETATION_NAME = "getColorInterpretation";
55

    
56
    /**
57
     * May provide a dynamic method to get the Color Table
58
     */
59
    final public static String DYNMETHOD_GETCOLORTABLE_NAME = "getColorTable";
60
    /**
61
     * Returns this store's parameters.
62
     *
63
     * @return
64
     *         {@link DataStoreParameters} containing this store's parameters
65
     */
66
    public DataStoreParameters getParameters();
67

    
68
    /**
69
     * Returns all available data in the store
70
     * @return RasterSet
71
     * @throws DataException
72
     */
73
    RasterSet getRasterSet() throws DataException;
74

    
75
    /**
76
     * Returns a subset of data taking into account the properties and
77
     * restrictions of the RasterQuery.
78
     * @param rasterQuery
79
     * @param RasterQuery
80
     * @return RasterSet
81
     * @throws DataException
82
     */
83
    RasterSet getRasterSet(RasterQuery rasterQuery) throws DataException;
84

    
85
    /**
86
     * Returns a new {@link RasterQuery} associated to this store.
87
     * @return RasterQuery
88
     */
89
    RasterQuery createRasterQuery();
90

    
91
    /**
92
     * Returns the envelope associated to this store buffer
93
     * @return Envelope
94
     * @throws DataException
95
     * @throws CreateEnvelopeException
96
     * @throws LocatorException
97
     */
98
    Envelope getEnvelope() throws DataException, LocatorException, CreateEnvelopeException;
99

    
100
    /**
101
     * Creates a {@link BandQuery} from band received as parameter.
102
     *
103
     * @param band
104
     *            Band to create BandQuery
105
     * @return BandQuery
106
     */
107
    public BandQuery createBandQuery(int band);
108

    
109
    /**
110
     * Gets {@link BandsDescriptor} of band received as parameter. If band does
111
     * not have {@link BandDescriptor}, this method will return an
112
     * empty {@link BandsDescriptor}.
113
     *
114
     * @param band
115
     *            Band to get its {@link BandsDescriptor}
116
     * @return BandDescriptor
117
     */
118
    public BandDescriptor getBandDescriptor(int band);
119

    
120
    /**
121
     * Gets number of total bands
122
     *
123
     * @return Number of bands
124
     */
125
    public int getBands();
126

    
127
    /**
128
     * @return
129
     */
130
    public RasterCache getCache();
131

    
132
    /**
133
     * Add a band from other store.
134
     * If the store is the same of main store will return a IllegalAttributeException
135
     *
136
     * @param store
137
     * @param band
138
     * @throws DataException
139
     */
140
    public void addBand(RasterStore store, int band) throws DataException;
141

    
142
    /**
143
     * Add a list of bands from other store.
144
     * If the store is the same of main store will return a IllegalAttributeException
145
     *
146
     * @param store
147
     * @param bands
148
     * @throws DataException
149
     */
150
    public void addBands(RasterStore store, List<Integer> bands) throws DataException;
151

    
152
    /**
153
     * Remove a band.
154
     * If band belongs to main store, will return a IllegalAttributeException
155
     *
156
     * @param band
157
     */
158
    public void removeBand(int band);
159

    
160
    /**
161
     * Remove any band that does not belong to itself.
162
     */
163
    public void clearAdditionalBands();
164

    
165
    /**
166
     * Return true if the band is own. If the band is from additional store, return false.
167
     *
168
     * @param band
169
     * @return
170
     */
171
    public boolean isOwnBand(int band);
172

    
173
    /**
174
     * Return the buffer dimensions of the complete store.
175
     * @return
176
     * @throws InitializeException
177
     */
178
    public BufferDimensions getDimensions() throws InitializeException;
179

    
180
    public boolean isTiled();
181

    
182

    
183

    
184
}