Statistics
| Revision:

svn-gvsig-desktop / branches / org.gvsig.desktop-2018a / org.gvsig.desktop.library / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.buffer.spi / src / main / java / org / gvsig / raster / lib / buffer / spi / DefaultTileStruct.java @ 43803

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

    
24
package org.gvsig.raster.lib.buffer.spi;
25

    
26
import java.util.Map;
27

    
28
import org.gvsig.fmap.geom.primitive.Envelope;
29
import org.gvsig.raster.lib.buffer.api.TileStruct;
30
import org.gvsig.tools.dispose.impl.AbstractDisposable;
31
import org.gvsig.tools.exception.BaseException;
32

    
33

    
34
/**
35
 * @author fdiaz
36
 *
37
 */
38
public class DefaultTileStruct extends AbstractDisposable implements TileStruct{
39

    
40
    private int rowsPerTile;
41
    private int columnsPerTile;
42
    private String providerName;
43
    private Map<Integer, Double> pixelSizePerZoomLevel;
44
    private Envelope envelope;
45

    
46

    
47
    public DefaultTileStruct() {
48
        this.rowsPerTile = TILE_STRUCT_DEFAULT_ROWS_PER_TITLE;
49
        this.columnsPerTile = TILE_STRUCT_DEFAULT_COLUMNS_PER_TITLE;
50
    }
51

    
52
    public int getRowsPerTile() {
53
        return rowsPerTile;
54
    }
55

    
56
    public void setRowsPerTile(int rowsPerTile) {
57
        this.rowsPerTile = rowsPerTile;
58
    }
59

    
60
    public int getColumnsPerTile() {
61
        return columnsPerTile;
62
    }
63

    
64
    public void setColumnsPerTile(int columnsPerTile) {
65
        this.columnsPerTile = columnsPerTile;
66
    }
67

    
68
    public String getProviderName() {
69
        return providerName;
70
    }
71

    
72
    public void setProviderName(String providerName) {
73
        this.providerName = providerName;
74
    }
75

    
76
    public Map<Integer, Double> getPixelSizePerZoomLevel() {
77
        return pixelSizePerZoomLevel;
78
    }
79

    
80
    public void setPixelSizePerZoomLevel(Map<Integer, Double> pixelSizePerZoomLevel) {
81
        this.pixelSizePerZoomLevel = pixelSizePerZoomLevel;
82
    }
83

    
84
    public Envelope getEnvelope() {
85
        return envelope;
86
    }
87

    
88
    public void setEnvelope(Envelope envelope) {
89
        this.envelope = envelope;
90
    }
91

    
92
    @Override
93
    protected void doDispose() throws BaseException {
94

    
95
        if (pixelSizePerZoomLevel != null) {
96
            pixelSizePerZoomLevel.clear();
97
        }
98
        pixelSizePerZoomLevel = null;
99
        envelope = null;
100

    
101
    }
102

    
103
}