private void tileMatrix(
XMLBuilder xml,
Grid grid,
double[] tlCoordinates,
int tileWidth,
int tileHeight,
boolean scaleWarning)
throws IOException {
xml.indentElement("TileMatrix");
if (scaleWarning) {
xml.simpleElement(
"ows:Abstract",
"The grid was not well-defined, the scale therefore assumes 1m per map unit.",
true);
}
xml.simpleElement("ows:Identifier", grid.getName(), true);
xml.simpleElement("ScaleDenominator", Double.toString(grid.getScaleDenominator()), true);
xml.indentElement("TopLeftCorner")
.text(Double.toString(tlCoordinates[0]))
.text(" ")
.text(Double.toString(tlCoordinates[1]))
.endElement();
xml.simpleElement("TileWidth", Integer.toString(tileWidth), true);
xml.simpleElement("TileHeight", Integer.toString(tileHeight), true);
xml.simpleElement("MatrixWidth", Long.toString(grid.getNumTilesWide()), true);
xml.simpleElement("MatrixHeight", Long.toString(grid.getNumTilesHigh()), true);
xml.endElement("TileMatrix");
}