gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.fmap / src / main / java / org / gvsig / raster / fmap / layers / Multiresolution.java @ 1356
History | View | Annotate | Download (2.45 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.fmap.layers; |
23 |
|
24 |
import java.awt.geom.Point2D; |
25 |
|
26 |
import org.gvsig.fmap.dal.exception.InitializeException; |
27 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
28 |
import org.gvsig.fmap.geom.primitive.Envelope; |
29 |
|
30 |
/**
|
31 |
* Layers with levels of multiresolution support
|
32 |
*
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
34 |
*
|
35 |
*/
|
36 |
public interface Multiresolution { |
37 |
/**
|
38 |
* Returns true if the multiresolution is enabled
|
39 |
* @return
|
40 |
*/
|
41 |
public boolean isEnabledMultiresolution(); |
42 |
|
43 |
/**
|
44 |
* Gets the current zoom level
|
45 |
* @return
|
46 |
*/
|
47 |
public int getZoomLevel(); |
48 |
|
49 |
/**
|
50 |
* Sets the current zoom level
|
51 |
* @param zoomLevel
|
52 |
*/
|
53 |
public void setZoomLevel(int zoomLevel); |
54 |
|
55 |
/**
|
56 |
* Increase the current zoom level
|
57 |
*/
|
58 |
public boolean increaseZoomLevel(); |
59 |
|
60 |
/**
|
61 |
* Decrease the current zoom level
|
62 |
*/
|
63 |
public boolean decreaseZoomLevel(); |
64 |
|
65 |
/**
|
66 |
* Calculates the bounding box of a zoom level using a center defined in pixels.
|
67 |
* It's possible to define the center in pixels because a level of resolution has
|
68 |
* a pixel size.
|
69 |
* @param center
|
70 |
* center in world coordinates
|
71 |
* @param level
|
72 |
* level of resolution
|
73 |
* @param w
|
74 |
* width in pixels
|
75 |
* @param h
|
76 |
* height in pixels
|
77 |
* @return
|
78 |
*/
|
79 |
public Envelope getCoordsInLevel(Point2D center, int level, int w, int h) throws CreateEnvelopeException; |
80 |
|
81 |
/**
|
82 |
* Sets a tile server to create a second level of cache. This second level will be
|
83 |
* created if the cache structure is different to the current.
|
84 |
* @param tileServer
|
85 |
*/
|
86 |
public void setTileServer(Class<?> tileServer) throws InitializeException; |
87 |
} |