private void tileMatrixSet(StringBuilder str, GridSet gridSet) { str.append(" <TileMatrixSet>\n"); str.append(" <ows:Identifier>" + gridSet.getName() + "</ows:Identifier>\n"); // If the following is not good enough, please get in touch and we will try to fix it :) str.append( " <ows:SupportedCRS>urn:ogc:def:crs:EPSG::" + gridSet.getSrs().getNumber() + "</ows:SupportedCRS>\n"); // TODO detect these str.append(" // <WellKnownScaleSet>urn:ogc:def:wkss:GlobalCRS84Pixel</WellKnownScaleSet>\n"); Grid[] grids = gridSet.getGrids(); for (int i = 0; i < grids.length; i++) { double[] tlCoordinates = gridSet.getOrderedTopLeftCorner(i); tileMatrix( str, grids[i], tlCoordinates, gridSet.getTileWidth(), gridSet.getTileHeight(), gridSet.isScaleWarning()); } str.append(" </TileMatrixSet>\n"); }