/** * 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.getMinX()); pw.println(GEOPACKAGE_PROPERTIES_MAX_X + "=" + tileMatrixSet.getMaxX()); pw.println(GEOPACKAGE_PROPERTIES_MIN_Y + "=" + tileMatrixSet.getMinY());
/** * 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); } } }
double xDistance = tileMatrixSet.getMaxX() - tileMatrixSet.getMinX(); double xDistance2 = tileMatrix.getMatrixWidth()
double xDistance = tileMatrixSet.getMaxX() - tileMatrixSet.getMinX(); double xDistance2 = tileMatrix.getMatrixWidth()
TestCase.assertNotNull(result.getMinX()); TestCase.assertNotNull(result.getMinY()); TestCase.assertNotNull(result.getMaxX()); TestCase.assertNotNull(result.getMaxY()); TestCase.assertEquals(tileMatrixSet.getMinX(), queryTileMatrixSetValue.getMinX()); TestCase.assertEquals(tileMatrixSet.getMaxX(), queryTileMatrixSetValue.getMaxX()); if (!found) { found = tileMatrixSet.getId().equals(
queryTileMatrixSet.getMinY()); TestCase.assertEquals(contents.getMaxX(), queryTileMatrixSet.getMaxX()); TestCase.assertEquals(contents.getMaxY(), queryTileMatrixSet.getMaxY());
double xDistance = tileMatrixSet.getMaxX() - tileMatrixSet.getMinX(); double xDistance2 = tileMatrix.getMatrixWidth()
TestCase.assertNotNull(tileMatrixSet.getMinX()); TestCase.assertNotNull(tileMatrixSet.getMinY()); TestCase.assertNotNull(tileMatrixSet.getMaxX()); TestCase.assertNotNull(tileMatrixSet.getMaxY());
TestCase.assertNotNull(tileMatrixSet.getMinX()); TestCase.assertNotNull(tileMatrixSet.getMinY()); TestCase.assertNotNull(tileMatrixSet.getMaxX()); TestCase.assertNotNull(tileMatrixSet.getMaxY());
double pixelXSize = (tileMatrixSet.getMaxX() - tileMatrixSet.getMinX()) / (matrixWidthAndHeight * tileWidth); double pixelYSize = (tileMatrixSet.getMaxY() - tileMatrixSet.getMinY()) / (matrixWidthAndHeight * tileHeight);
double pixelXSize = (tileMatrixSet.getMaxX() - tileMatrixSet .getMinX()) / (matrixWidth * tileWidth); double pixelYSize = (tileMatrixSet.getMaxY() - tileMatrixSet