Statistics
| Revision:

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 / TileCacheManager.java @ 881

History | View | Annotate | Download (3 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

    
27
import org.gvsig.raster.cache.tile.provider.CacheStruct;
28

    
29

    
30

    
31
/**
32
 * This class is responsible of the management of the library's business logic.
33
 * It is the library's main entry point, and provides all the services to manage
34
 * {@link TileCacheService}s.
35
 * 
36
 * @author Nacho Brodin (nachobrodin@gmail.com)
37
 * @version $Id$
38
 */
39
public interface TileCacheManager {
40
        /**
41
         * Builds a new entry point for a tile cache. The parameter is an identifier for a 
42
         * tile cache structured implemented inside of this library
43
         * @param baseDir
44
         * @return
45
         */
46
        public TileCache getTileCache(String baseDir);
47
        
48
        /**
49
         * Creates a new tile structure
50
         * @param level
51
         * @param col
52
         *        Tile column
53
         * @param row
54
         *        Tile row
55
         * @return
56
         */
57
        public Tile createTile(int level, int col, int row);
58
        
59
        /**
60
         * Creates a new tile structure
61
         * @param wPx
62
         *        Width in pixels
63
         * @param hPx
64
         *        Height in pixels
65
         * @param row
66
         *        Tile row
67
         * @param col
68
         *        Tile column
69
         * @param ul
70
         *        Upper left coordinate
71
         * @param lr
72
         *        Lower roght coordinate 
73
         * @return
74
         */
75
        public Tile createTile(int wPx, int hPx, int row, int col, Point2D ul, Point2D lr);
76
        
77
        /**
78
         * Builds a standard cache structure 
79
         * @param typeOfCoords Constant defined in CacheStruct interface
80
         * @param levels Number of levels
81
         * @param layerExtent Bounding box of the layer
82
         * @param pixelSize Pixel size of the layer
83
         * @param tilePxWidth Width in pixels of a tile
84
         * @param tilePxHeight Height in pixels of a tile
85
         * @param layerName Layer name or identifier
86
         * @param strategy Strategy to store tiles in disk
87
         * @param baseDir path to this layer
88
         * @param fileSuffix File suffix
89
         * @param epsg 
90
         * @return
91
         */
92
        public CacheStruct createCacheStructure(int typeOfCoords, 
93
                    int levels, 
94
                    Rectangle2D layerExtent, 
95
                    double pixelSize,
96
                    int tilePxWidth,
97
                    int tilePxHeight,
98
                    String layerName,
99
                    String strategy,
100
                    String baseDir,
101
                    String fileSuffix,
102
                    String epsg,
103
                    long fileSize);
104
}