gvsig-raster / org.gvsig.raster.cache / trunk / org.gvsig.raster.cache / org.gvsig.raster.cache.lib.api / src / main / java / org / gvsig / raster / cache / tile / Tile.java @ 595
History | View | Annotate | Download (3.59 KB)
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.cache.tile; |
23 |
|
24 |
import java.awt.geom.Point2D; |
25 |
import java.awt.geom.Rectangle2D; |
26 |
import java.io.File; |
27 |
|
28 |
/**
|
29 |
* Tile structure for requests
|
30 |
*
|
31 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
32 |
*/
|
33 |
public interface Tile extends AtomicTask { |
34 |
/**
|
35 |
* Gets the column of this tile
|
36 |
* @return
|
37 |
*/
|
38 |
public int getCol(); |
39 |
|
40 |
/**
|
41 |
* Gets the row of this tile
|
42 |
* @return
|
43 |
*/
|
44 |
public int getRow(); |
45 |
|
46 |
/**
|
47 |
* Gets the resolution level of this tile
|
48 |
* @return
|
49 |
*/
|
50 |
public int getLevel(); |
51 |
|
52 |
/**
|
53 |
* Sets the column of this tile
|
54 |
* @param col
|
55 |
*/
|
56 |
public void setCol(int col); |
57 |
|
58 |
/**
|
59 |
* Sets the row of this tile
|
60 |
* @param col
|
61 |
*/
|
62 |
public void setRow(int row); |
63 |
|
64 |
/**
|
65 |
* Sets the level of resolution of this tile
|
66 |
* @param col
|
67 |
*/
|
68 |
public void setLevel(int level); |
69 |
|
70 |
/**
|
71 |
* Gets the width in pixels of this tile
|
72 |
* @return
|
73 |
*/
|
74 |
public int getWidthPx(); |
75 |
|
76 |
/**
|
77 |
* Sets the width in pixels of this tile
|
78 |
* @param widthPx
|
79 |
*/
|
80 |
public void setWidthPx(int widthPx); |
81 |
|
82 |
/**
|
83 |
* Gets the height in pixels of this tile
|
84 |
* @return
|
85 |
*/
|
86 |
public int getHeightPx(); |
87 |
|
88 |
/**
|
89 |
* Sets the height in pixels of this tile
|
90 |
* @param heightPx
|
91 |
*/
|
92 |
public void setHeightPx(int heightPx); |
93 |
|
94 |
/**
|
95 |
* Gets the bounding box
|
96 |
* @return
|
97 |
*/
|
98 |
public Rectangle2D getExtent(); |
99 |
|
100 |
/**
|
101 |
* Gets the upper left coordinate of this tile
|
102 |
* @return
|
103 |
*/
|
104 |
public Point2D getUl(); |
105 |
|
106 |
/**
|
107 |
* Sets the upper left coordinate of this tile
|
108 |
* @return
|
109 |
*/
|
110 |
public void setUl(Point2D ul); |
111 |
|
112 |
/**
|
113 |
* Gets the lower right coordinate of this tile
|
114 |
* @return
|
115 |
*/
|
116 |
public Point2D getLr(); |
117 |
|
118 |
/**
|
119 |
* Sets the lower right coordinate of this tile
|
120 |
* @return
|
121 |
*/
|
122 |
public void setLr(Point2D lr); |
123 |
|
124 |
/**
|
125 |
* Gets the file associated to this tile
|
126 |
* @return
|
127 |
*/
|
128 |
public File getFile(); |
129 |
|
130 |
/**
|
131 |
* Sets the file associated to this tile
|
132 |
* @param file
|
133 |
*/
|
134 |
public void setFile(File file); |
135 |
|
136 |
/**
|
137 |
* Gets an unique identifier to this tile
|
138 |
* @return
|
139 |
*/
|
140 |
public String getId(); |
141 |
|
142 |
/**
|
143 |
* Gets the Downloader parameters
|
144 |
* @return
|
145 |
*/
|
146 |
public Object getDownloaderParams(String key); |
147 |
|
148 |
/**
|
149 |
* Sets the Downloader parameters
|
150 |
* @param downloaderParams
|
151 |
*/
|
152 |
public void setDownloaderParams(String key, Object downloaderParams); |
153 |
|
154 |
/**
|
155 |
* Sets the data associated to this tile. In the most cases
|
156 |
* will be only one element in the array of objects
|
157 |
* @param data
|
158 |
*/
|
159 |
public void setData(Object[] data); |
160 |
|
161 |
/**
|
162 |
* Gets the data associated to this tile. In the most cases
|
163 |
* will be only one element in the array of objects
|
164 |
* @return
|
165 |
*/
|
166 |
public Object[] getData(); |
167 |
|
168 |
/**
|
169 |
* Returns true if the buffer data is loaded
|
170 |
* @return
|
171 |
*/
|
172 |
public boolean dataIsLoaded(); |
173 |
|
174 |
/**
|
175 |
* Sets this flag to true if the data is corrupt
|
176 |
* @param corrupt
|
177 |
*/
|
178 |
public void setCorrupt(); |
179 |
|
180 |
} |