gvsig-osm / org.gvsig.raster.osm / trunk / org.gvsig.raster.osm / org.gvsig.raster.osm.io / src / main / java / org / gvsig / raster / osm / cachestruct / TileMatrixSet.java @ 85
History | View | Annotate | Download (2.16 KB)
1 |
/* OSM layers for gvSIG.
|
---|---|
2 |
* Geographic Information System of the Valencian Government
|
3 |
*
|
4 |
* Copyright (C) 2012 Nacho Brodin
|
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.osm.cachestruct; |
23 |
|
24 |
import java.awt.geom.Rectangle2D; |
25 |
import java.io.IOException; |
26 |
import java.util.ArrayList; |
27 |
|
28 |
import org.kxml2.io.KXmlParser; |
29 |
import org.xmlpull.v1.XmlPullParserException; |
30 |
|
31 |
|
32 |
/**
|
33 |
* <p>Defines a set of tiles</p>
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
35 |
*/
|
36 |
public class TileMatrixSet { |
37 |
protected Rectangle2D bbox = null; |
38 |
private String supportedCRS = null; |
39 |
protected ArrayList<TileMatrix> tileMatrix = null; |
40 |
|
41 |
public void setBbox(Rectangle2D bbox) { |
42 |
this.bbox = bbox;
|
43 |
} |
44 |
|
45 |
public Rectangle2D getBoundingBox() { |
46 |
return bbox;
|
47 |
} |
48 |
|
49 |
public ArrayList<TileMatrix> getTileMatrix() { |
50 |
if(tileMatrix == null) |
51 |
tileMatrix = new ArrayList<TileMatrix>(); |
52 |
return tileMatrix;
|
53 |
} |
54 |
|
55 |
public String getSupportedCRS() { |
56 |
return supportedCRS;
|
57 |
} |
58 |
|
59 |
public void setSupportedCRS(String supportedCRS) { |
60 |
this.supportedCRS = supportedCRS;
|
61 |
} |
62 |
|
63 |
public void parse(KXmlParser parser) throws IOException, |
64 |
XmlPullParserException { |
65 |
} |
66 |
|
67 |
public void print() { |
68 |
System.out.println("*****TileMatrixSet******"); |
69 |
if(bbox != null) |
70 |
System.out.println(bbox.toString());
|
71 |
System.out.println("supportedCRS:" + getSupportedCRS()); |
72 |
for (int i = 0; i < tileMatrix.size(); i++) { |
73 |
((TileMatrix)tileMatrix.get(i)).print(); |
74 |
} |
75 |
|
76 |
} |
77 |
} |