/** * Text output from a TileMatrixSet * * @param tileMatrixSet * tile matrix set * @return text */ public String textOutput(TileMatrixSet tileMatrixSet) { StringBuilder output = new StringBuilder(); output.append("\t" + TileMatrixSet.COLUMN_TABLE_NAME + ": " + tileMatrixSet.getTableName()); output.append("\n" + textOutput(tileMatrixSet.getSrs())); output.append("\n\t" + TileMatrixSet.COLUMN_MIN_X + ": " + tileMatrixSet.getMinX()); output.append("\n\t" + TileMatrixSet.COLUMN_MIN_Y + ": " + tileMatrixSet.getMinY()); output.append("\n\t" + TileMatrixSet.COLUMN_MAX_X + ": " + tileMatrixSet.getMaxX()); output.append("\n\t" + TileMatrixSet.COLUMN_MAX_Y + ": " + tileMatrixSet.getMaxY()); return output.toString(); }
/** * Get a bounding box * * @return bounding box */ public BoundingBox getBoundingBox() { BoundingBox boundingBox = new BoundingBox(getMinX(), getMinY(), getMaxX(), getMaxY()); return boundingBox; }
+ tileMatrixSet.getMinY()); pw.println(GEOPACKAGE_PROPERTIES_MAX_Y + "=" + tileMatrixSet.getMaxY());
/** * Adjust the tile matrix lengths if needed. Check if the tile matrix width * and height need to expand to account for pixel * number of pixels fitting * into the tile matrix lengths * * @param tileMatrixSet * tile matrix set * @param tileMatrices * tile matrices */ public static void adjustTileMatrixLengths(TileMatrixSet tileMatrixSet, List<TileMatrix> tileMatrices) { double tileMatrixWidth = tileMatrixSet.getMaxX() - tileMatrixSet.getMinX(); double tileMatrixHeight = tileMatrixSet.getMaxY() - tileMatrixSet.getMinY(); for (TileMatrix tileMatrix : tileMatrices) { int tempMatrixWidth = (int) (tileMatrixWidth / (tileMatrix .getPixelXSize() * tileMatrix.getTileWidth())); int tempMatrixHeight = (int) (tileMatrixHeight / (tileMatrix .getPixelYSize() * tileMatrix.getTileHeight())); if (tempMatrixWidth > tileMatrix.getMatrixWidth()) { tileMatrix.setMatrixWidth(tempMatrixWidth); } if (tempMatrixHeight > tileMatrix.getMatrixHeight()) { tileMatrix.setMatrixHeight(tempMatrixHeight); } } }
.queryForId(tileMatrixSet.getId()); TestCase.assertEquals(updatedMaxY, updatedTileMatrixSet.getMaxY());
double yDistance = tileMatrixSet.getMaxY() - tileMatrixSet.getMinY(); double yDistance2 = tileMatrix.getMatrixHeight()
double yDistance = tileMatrixSet.getMaxY() - tileMatrixSet.getMinY(); double yDistance2 = tileMatrix.getMatrixHeight()
queryTileMatrixSet.getMaxX()); TestCase.assertEquals(contents.getMaxY(), queryTileMatrixSet.getMaxY()); TestCase.assertEquals(contents.getId(), queryTileMatrixSet .getContents().getId());
TestCase.assertNotNull(result.getMinY()); TestCase.assertNotNull(result.getMaxX()); TestCase.assertNotNull(result.getMaxY());
double yDistance = tileMatrixSet.getMaxY() - tileMatrixSet.getMinY(); double yDistance2 = tileMatrix.getMatrixHeight()
TestCase.assertNotNull(tileMatrixSet.getMinY()); TestCase.assertNotNull(tileMatrixSet.getMaxX()); TestCase.assertNotNull(tileMatrixSet.getMaxY());
TestCase.assertNotNull(tileMatrixSet.getMinY()); TestCase.assertNotNull(tileMatrixSet.getMaxX()); TestCase.assertNotNull(tileMatrixSet.getMaxY());
double pixelYSize = (tileMatrixSet.getMaxY() - tileMatrixSet.getMinY()) / (matrixWidthAndHeight * tileHeight);
double pixelXSize = (tileMatrixSet.getMaxX() - tileMatrixSet .getMinX()) / (matrixWidth * tileWidth); double pixelYSize = (tileMatrixSet.getMaxY() - tileMatrixSet .getMinY()) / (matrixHeight * tileHeight);