85 |
85 |
//definido en la etiqueta
|
86 |
86 |
if(tileMatrixLimits == null)
|
87 |
87 |
return;
|
|
88 |
java.util.List<String> idListToRemove = new ArrayList<String>();
|
88 |
89 |
for (int i = 0; i < tileMatrixLimits.size(); i++) {
|
89 |
90 |
WMTSTileMatrixLimits limits = (WMTSTileMatrixLimits)tileMatrixLimits.get(i);
|
90 |
91 |
String id = limits.getRefToTileMatrix();
|
|
92 |
boolean isWithoutReference = true;
|
91 |
93 |
for (int j = 0; j < tileMatrixSet.getTileMatrix().size(); j++) {
|
92 |
94 |
WMTSTileMatrix tileMatrix = (WMTSTileMatrix)tileMatrixSet.getTileMatrix().get(j);
|
93 |
95 |
if(tileMatrix.getIdentifier().compareTo(id) == 0) {
|
94 |
96 |
limits.setTileMatrix(tileMatrix);
|
|
97 |
isWithoutReference = false;
|
|
98 |
break;
|
|
99 |
}
|
|
100 |
}
|
|
101 |
if(isWithoutReference) {
|
|
102 |
idListToRemove.add(id);
|
|
103 |
}
|
|
104 |
}
|
|
105 |
removeLevelsFromTileMatrix(idListToRemove);
|
|
106 |
}
|
|
107 |
|
|
108 |
/**
|
|
109 |
* Removes form the <code>WMTSTileMatrixLimits</code> the elements in the
|
|
110 |
* ID list. These elements are <code>WMTSTileMatrix</code> without reference
|
|
111 |
* @param idList
|
|
112 |
* List of identifiers
|
|
113 |
*/
|
|
114 |
private void removeLevelsFromTileMatrix(java.util.List<String> idList) {
|
|
115 |
if(tileMatrixLimits == null || idList == null || idList.size() == 0)
|
|
116 |
return;
|
|
117 |
for (int i = 0; i < idList.size(); i++) {
|
|
118 |
String id = idList.get(i);
|
|
119 |
for (int j = 0; j < tileMatrixLimits.size(); j++) {
|
|
120 |
WMTSTileMatrixLimits limits = (WMTSTileMatrixLimits)tileMatrixLimits.get(j);
|
|
121 |
if(id.equals(limits.getRefToTileMatrix())) {
|
|
122 |
tileMatrixLimits.remove(j);
|
95 |
123 |
break;
|
96 |
124 |
}
|
97 |
125 |
}
|
98 |
126 |
}
|
99 |
127 |
}
|
100 |
128 |
|
101 |
|
/*public void setLayerBBox(WMTSBoundingBox bbox) {
|
102 |
|
if(tileMatrixSet != null)
|
103 |
|
tileMatrixSet.setLayerBBox(layerBBox);
|
104 |
|
this.layerBBox = bbox;
|
105 |
|
}*/
|
106 |
129 |
|
107 |
130 |
public void print() {
|
108 |
131 |
System.out.println(" *****WMTSTileMatrixSetLink******");
|