id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
105,200
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java
GeoPackageManager.create
public static boolean create(File file) { boolean created = false; // Validate or add the file extension if (GeoPackageIOUtils.hasFileExtension(file)) { GeoPackageValidate.validateGeoPackageExtension(file); } else { file = GeoPackageIOUtils.addFileExtension(file, GeoPackageConstants.GEOPACKAGE_EXTE...
java
public static boolean create(File file) { boolean created = false; // Validate or add the file extension if (GeoPackageIOUtils.hasFileExtension(file)) { GeoPackageValidate.validateGeoPackageExtension(file); } else { file = GeoPackageIOUtils.addFileExtension(file, GeoPackageConstants.GEOPACKAGE_EXTE...
[ "public", "static", "boolean", "create", "(", "File", "file", ")", "{", "boolean", "created", "=", "false", ";", "// Validate or add the file extension", "if", "(", "GeoPackageIOUtils", ".", "hasFileExtension", "(", "file", ")", ")", "{", "GeoPackageValidate", "."...
Create a GeoPackage @param file file @return true if created
[ "Create", "a", "GeoPackage" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java#L39-L72
105,201
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java
GeoPackageManager.open
public static GeoPackage open(String name, File file) { // Validate or add the file extension if (GeoPackageIOUtils.hasFileExtension(file)) { GeoPackageValidate.validateGeoPackageExtension(file); } else { file = GeoPackageIOUtils.addFileExtension(file, GeoPackageConstants.GEOPACKAGE_EXTENSION); } ...
java
public static GeoPackage open(String name, File file) { // Validate or add the file extension if (GeoPackageIOUtils.hasFileExtension(file)) { GeoPackageValidate.validateGeoPackageExtension(file); } else { file = GeoPackageIOUtils.addFileExtension(file, GeoPackageConstants.GEOPACKAGE_EXTENSION); } ...
[ "public", "static", "GeoPackage", "open", "(", "String", "name", ",", "File", "file", ")", "{", "// Validate or add the file extension", "if", "(", "GeoPackageIOUtils", ".", "hasFileExtension", "(", "file", ")", ")", "{", "GeoPackageValidate", ".", "validateGeoPacka...
Open a GeoPackage @param name GeoPackage name @param file GeoPackage file @return GeoPackage @since 3.0.2
[ "Open", "a", "GeoPackage" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java#L95-L123
105,202
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java
GeoPackageManager.connect
private static GeoPackageConnection connect(File file) { String databaseUrl = "jdbc:sqlite:" + file.getPath(); // load the sqlite-JDBC driver using the current class loader try { Class.forName("org.sqlite.JDBC"); } catch (ClassNotFoundException e) { throw new GeoPackageException( "Failed to load th...
java
private static GeoPackageConnection connect(File file) { String databaseUrl = "jdbc:sqlite:" + file.getPath(); // load the sqlite-JDBC driver using the current class loader try { Class.forName("org.sqlite.JDBC"); } catch (ClassNotFoundException e) { throw new GeoPackageException( "Failed to load th...
[ "private", "static", "GeoPackageConnection", "connect", "(", "File", "file", ")", "{", "String", "databaseUrl", "=", "\"jdbc:sqlite:\"", "+", "file", ".", "getPath", "(", ")", ";", "// load the sqlite-JDBC driver using the current class loader", "try", "{", "Class", "...
Connect to a GeoPackage file @param file @return
[ "Connect", "to", "a", "GeoPackage", "file" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/manager/GeoPackageManager.java#L131-L167
105,203
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/user/TileRow.java
TileRow.setTileData
public void setTileData(BufferedImage image, String imageFormat) throws IOException { byte[] bytes = ImageUtils.writeImageToBytes(image, imageFormat); setTileData(bytes); }
java
public void setTileData(BufferedImage image, String imageFormat) throws IOException { byte[] bytes = ImageUtils.writeImageToBytes(image, imageFormat); setTileData(bytes); }
[ "public", "void", "setTileData", "(", "BufferedImage", "image", ",", "String", "imageFormat", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "ImageUtils", ".", "writeImageToBytes", "(", "image", ",", "imageFormat", ")", ";", "setTileData", ...
Set the tile data from an image @param image image @param imageFormat image format @throws IOException upon failure
[ "Set", "the", "tile", "data", "from", "an", "image" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/user/TileRow.java#L217-L221
105,204
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/db/GeoPackageConnection.java
GeoPackageConnection.query
public ResultSet query(String sql, String[] args) { return SQLUtils.query(connection, sql, args); }
java
public ResultSet query(String sql, String[] args) { return SQLUtils.query(connection, sql, args); }
[ "public", "ResultSet", "query", "(", "String", "sql", ",", "String", "[", "]", "args", ")", "{", "return", "SQLUtils", ".", "query", "(", "connection", ",", "sql", ",", "args", ")", ";", "}" ]
Perform a database query @param sql sql statement @param args arguments @return result set @since 1.1.2
[ "Perform", "a", "database", "query" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/db/GeoPackageConnection.java#L203-L205
105,205
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/TileCreator.java
TileCreator.hasTile
public boolean hasTile(BoundingBox requestBoundingBox) { boolean hasTile = false; // Transform to the projection of the tiles ProjectionTransform transformRequestToTiles = requestProjection .getTransformation(tilesProjection); BoundingBox tilesBoundingBox = requestBoundingBox .transform(transformReque...
java
public boolean hasTile(BoundingBox requestBoundingBox) { boolean hasTile = false; // Transform to the projection of the tiles ProjectionTransform transformRequestToTiles = requestProjection .getTransformation(tilesProjection); BoundingBox tilesBoundingBox = requestBoundingBox .transform(transformReque...
[ "public", "boolean", "hasTile", "(", "BoundingBox", "requestBoundingBox", ")", "{", "boolean", "hasTile", "=", "false", ";", "// Transform to the projection of the tiles", "ProjectionTransform", "transformRequestToTiles", "=", "requestProjection", ".", "getTransformation", "(...
Check if the tile table contains a tile for the request bounding box @param requestBoundingBox request bounding box in the request projection @return true if a tile exists
[ "Check", "if", "the", "tile", "table", "contains", "a", "tile", "for", "the", "request", "bounding", "box" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/TileCreator.java#L270-L299
105,206
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/TileCreator.java
TileCreator.getTile
public GeoPackageTile getTile(BoundingBox requestBoundingBox) { GeoPackageTile tile = null; // Transform to the projection of the tiles ProjectionTransform transformRequestToTiles = requestProjection .getTransformation(tilesProjection); BoundingBox tilesBoundingBox = requestBoundingBox .transform(tran...
java
public GeoPackageTile getTile(BoundingBox requestBoundingBox) { GeoPackageTile tile = null; // Transform to the projection of the tiles ProjectionTransform transformRequestToTiles = requestProjection .getTransformation(tilesProjection); BoundingBox tilesBoundingBox = requestBoundingBox .transform(tran...
[ "public", "GeoPackageTile", "getTile", "(", "BoundingBox", "requestBoundingBox", ")", "{", "GeoPackageTile", "tile", "=", "null", ";", "// Transform to the projection of the tiles", "ProjectionTransform", "transformRequestToTiles", "=", "requestProjection", ".", "getTransformat...
Get the tile from the request bounding box in the request projection @param requestBoundingBox request bounding box in the request projection @return image
[ "Get", "the", "tile", "from", "the", "request", "bounding", "box", "in", "the", "request", "projection" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/TileCreator.java#L308-L392
105,207
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/TileCreator.java
TileCreator.drawTile
private GeoPackageTile drawTile(TileMatrix tileMatrix, TileResultSet tileResults, BoundingBox requestProjectedBoundingBox, int tileWidth, int tileHeight) { // Draw the resulting bitmap with the matching tiles GeoPackageTile geoPackageTile = null; Graphics graphics = null; while (tileResults.moveToNext())...
java
private GeoPackageTile drawTile(TileMatrix tileMatrix, TileResultSet tileResults, BoundingBox requestProjectedBoundingBox, int tileWidth, int tileHeight) { // Draw the resulting bitmap with the matching tiles GeoPackageTile geoPackageTile = null; Graphics graphics = null; while (tileResults.moveToNext())...
[ "private", "GeoPackageTile", "drawTile", "(", "TileMatrix", "tileMatrix", ",", "TileResultSet", "tileResults", ",", "BoundingBox", "requestProjectedBoundingBox", ",", "int", "tileWidth", ",", "int", "tileHeight", ")", "{", "// Draw the resulting bitmap with the matching tiles...
Draw the tile from the tile results @param tileMatrix @param tileResults @param requestProjectedBoundingBox @param tileWidth @param tileHeight @return tile bitmap
[ "Draw", "the", "tile", "from", "the", "tile", "results" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/TileCreator.java#L404-L489
105,208
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/TileCreator.java
TileCreator.reprojectTile
private BufferedImage reprojectTile(BufferedImage tile, int requestedTileWidth, int requestedTileHeight, BoundingBox requestBoundingBox, ProjectionTransform transformRequestToTiles, BoundingBox tilesBoundingBox) { final double requestedWidthUnitsPerPixel = (requestBoundingBox .getMaxLongitude() - req...
java
private BufferedImage reprojectTile(BufferedImage tile, int requestedTileWidth, int requestedTileHeight, BoundingBox requestBoundingBox, ProjectionTransform transformRequestToTiles, BoundingBox tilesBoundingBox) { final double requestedWidthUnitsPerPixel = (requestBoundingBox .getMaxLongitude() - req...
[ "private", "BufferedImage", "reprojectTile", "(", "BufferedImage", "tile", ",", "int", "requestedTileWidth", ",", "int", "requestedTileHeight", ",", "BoundingBox", "requestBoundingBox", ",", "ProjectionTransform", "transformRequestToTiles", ",", "BoundingBox", "tilesBoundingB...
Reproject the tile to the requested projection @param tile tile in the tile matrix projection @param requestedTileWidth requested tile width @param requestedTileHeight requested tile height @param requestBoundingBox request bounding box in the request projection @param transformRequestToTiles transformation from reque...
[ "Reproject", "the", "tile", "to", "the", "requested", "projection" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/TileCreator.java#L508-L578
105,209
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/user/ManualFeatureQuery.java
ManualFeatureQuery.getBoundingBox
public BoundingBox getBoundingBox() { GeometryEnvelope envelope = null; long offset = 0; boolean hasResults = true; while (hasResults) { hasResults = false; FeatureResultSet resultSet = featureDao.queryForChunk(chunkLimit, offset); try { while (resultSet.moveToNext()) { hasResults = ...
java
public BoundingBox getBoundingBox() { GeometryEnvelope envelope = null; long offset = 0; boolean hasResults = true; while (hasResults) { hasResults = false; FeatureResultSet resultSet = featureDao.queryForChunk(chunkLimit, offset); try { while (resultSet.moveToNext()) { hasResults = ...
[ "public", "BoundingBox", "getBoundingBox", "(", ")", "{", "GeometryEnvelope", "envelope", "=", "null", ";", "long", "offset", "=", "0", ";", "boolean", "hasResults", "=", "true", ";", "while", "(", "hasResults", ")", "{", "hasResults", "=", "false", ";", "...
Manually build the bounds of the feature table @return bounding box
[ "Manually", "build", "the", "bounds", "of", "the", "feature", "table" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/user/ManualFeatureQuery.java#L117-L160
105,210
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexExtension.java
RTreeIndexExtension.createFunction
private void createFunction(String name, GeometryFunction function) { try { Function.create(getGeoPackage().getConnection().getConnection(), name, function); } catch (SQLException e) { log.log(Level.SEVERE, "Failed to create function: " + name, e); } }
java
private void createFunction(String name, GeometryFunction function) { try { Function.create(getGeoPackage().getConnection().getConnection(), name, function); } catch (SQLException e) { log.log(Level.SEVERE, "Failed to create function: " + name, e); } }
[ "private", "void", "createFunction", "(", "String", "name", ",", "GeometryFunction", "function", ")", "{", "try", "{", "Function", ".", "create", "(", "getGeoPackage", "(", ")", ".", "getConnection", "(", ")", ".", "getConnection", "(", ")", ",", "name", "...
Create the function for the connection @param name function name @param function geometry function
[ "Create", "the", "function", "for", "the", "connection" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexExtension.java#L175-L182
105,211
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/custom/NumberFeaturesTile.java
NumberFeaturesTile.drawTile
private BufferedImage drawTile(int tileWidth, int tileHeight, String text) { // Create the image and graphics BufferedImage image = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = image.createGraphics(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,...
java
private BufferedImage drawTile(int tileWidth, int tileHeight, String text) { // Create the image and graphics BufferedImage image = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = image.createGraphics(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,...
[ "private", "BufferedImage", "drawTile", "(", "int", "tileWidth", ",", "int", "tileHeight", ",", "String", "text", ")", "{", "// Create the image and graphics", "BufferedImage", "image", "=", "new", "BufferedImage", "(", "tileWidth", ",", "tileHeight", ",", "Buffered...
Draw a tile with the provided text label in the middle @param tileWidth @param tileHeight @param text @return
[ "Draw", "a", "tile", "with", "the", "provided", "text", "label", "in", "the", "middle" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/custom/NumberFeaturesTile.java#L394-L461
105,212
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.createBufferedImage
public static BufferedImage createBufferedImage(int width, int height, String imageFormat) { int imageType; switch (imageFormat.toLowerCase()) { case IMAGE_FORMAT_JPG: case IMAGE_FORMAT_JPEG: imageType = BufferedImage.TYPE_INT_RGB; break; default: imageType = BufferedImage.TYPE_INT_ARGB; } ...
java
public static BufferedImage createBufferedImage(int width, int height, String imageFormat) { int imageType; switch (imageFormat.toLowerCase()) { case IMAGE_FORMAT_JPG: case IMAGE_FORMAT_JPEG: imageType = BufferedImage.TYPE_INT_RGB; break; default: imageType = BufferedImage.TYPE_INT_ARGB; } ...
[ "public", "static", "BufferedImage", "createBufferedImage", "(", "int", "width", ",", "int", "height", ",", "String", "imageFormat", ")", "{", "int", "imageType", ";", "switch", "(", "imageFormat", ".", "toLowerCase", "(", ")", ")", "{", "case", "IMAGE_FORMAT_...
Create a buffered image for the dimensions and image format @param width image width @param height image height @param imageFormat image format @return image
[ "Create", "a", "buffered", "image", "for", "the", "dimensions", "and", "image", "format" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L58-L75
105,213
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.isFullyTransparent
public static boolean isFullyTransparent(BufferedImage image) { boolean transparent = true; for (int x = 0; x < image.getWidth(); x++) { for (int y = 0; y < image.getHeight(); y++) { transparent = isTransparent(image, x, y); if (!transparent) { break; } } if (!transparent) { break; ...
java
public static boolean isFullyTransparent(BufferedImage image) { boolean transparent = true; for (int x = 0; x < image.getWidth(); x++) { for (int y = 0; y < image.getHeight(); y++) { transparent = isTransparent(image, x, y); if (!transparent) { break; } } if (!transparent) { break; ...
[ "public", "static", "boolean", "isFullyTransparent", "(", "BufferedImage", "image", ")", "{", "boolean", "transparent", "=", "true", ";", "for", "(", "int", "x", "=", "0", ";", "x", "<", "image", ".", "getWidth", "(", ")", ";", "x", "++", ")", "{", "...
Check if the image is fully transparent, meaning it contains only transparent pixels as an empty image @param image image @return true if fully transparent
[ "Check", "if", "the", "image", "is", "fully", "transparent", "meaning", "it", "contains", "only", "transparent", "pixels", "as", "an", "empty", "image" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L85-L99
105,214
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.isTransparent
public static boolean isTransparent(BufferedImage image, int x, int y) { int pixel = image.getRGB(x, y); boolean transparent = (pixel >> 24) == 0x00; return transparent; }
java
public static boolean isTransparent(BufferedImage image, int x, int y) { int pixel = image.getRGB(x, y); boolean transparent = (pixel >> 24) == 0x00; return transparent; }
[ "public", "static", "boolean", "isTransparent", "(", "BufferedImage", "image", ",", "int", "x", ",", "int", "y", ")", "{", "int", "pixel", "=", "image", ".", "getRGB", "(", "x", ",", "y", ")", ";", "boolean", "transparent", "=", "(", "pixel", ">>", "...
Check if the pixel in the image at the x and y is transparent @param image image @param x x location @param y y location @return true if transparent
[ "Check", "if", "the", "pixel", "in", "the", "image", "at", "the", "x", "and", "y", "is", "transparent" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L112-L116
105,215
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.getImage
public static BufferedImage getImage(byte[] imageBytes) throws IOException { BufferedImage image = null; if (imageBytes != null) { ByteArrayInputStream stream = new ByteArrayInputStream(imageBytes); image = ImageIO.read(stream); stream.close(); } return image; }
java
public static BufferedImage getImage(byte[] imageBytes) throws IOException { BufferedImage image = null; if (imageBytes != null) { ByteArrayInputStream stream = new ByteArrayInputStream(imageBytes); image = ImageIO.read(stream); stream.close(); } return image; }
[ "public", "static", "BufferedImage", "getImage", "(", "byte", "[", "]", "imageBytes", ")", "throws", "IOException", "{", "BufferedImage", "image", "=", "null", ";", "if", "(", "imageBytes", "!=", "null", ")", "{", "ByteArrayInputStream", "stream", "=", "new", ...
Get a buffered image of the image bytes @param imageBytes image bytes @return buffered image or null @throws IOException upon failure @since 1.1.2
[ "Get", "a", "buffered", "image", "of", "the", "image", "bytes" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L128-L139
105,216
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.writeImageToBytes
public static byte[] writeImageToBytes(BufferedImage image, String formatName, Float quality) throws IOException { byte[] bytes = null; if (quality != null) { bytes = compressAndWriteImageToBytes(image, formatName, quality); } else { bytes = writeImageToBytes(image, formatName); } return bytes; }
java
public static byte[] writeImageToBytes(BufferedImage image, String formatName, Float quality) throws IOException { byte[] bytes = null; if (quality != null) { bytes = compressAndWriteImageToBytes(image, formatName, quality); } else { bytes = writeImageToBytes(image, formatName); } return bytes; }
[ "public", "static", "byte", "[", "]", "writeImageToBytes", "(", "BufferedImage", "image", ",", "String", "formatName", ",", "Float", "quality", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "null", ";", "if", "(", "quality", "!=", "nul...
Write the image to bytes in the provided format and optional quality @param image buffered image @param formatName image format name @param quality null or quality between 0.0 and 1.0 @return image bytes @throws IOException upon failure @since 1.1.2
[ "Write", "the", "image", "to", "bytes", "in", "the", "provided", "format", "and", "optional", "quality" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L155-L164
105,217
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.writeImageToBytes
public static byte[] writeImageToBytes(BufferedImage image, String formatName) throws IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); ImageIO.write(image, formatName, stream); stream.flush(); byte[] bytes = stream.toByteArray(); stream.close(); return bytes; }
java
public static byte[] writeImageToBytes(BufferedImage image, String formatName) throws IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); ImageIO.write(image, formatName, stream); stream.flush(); byte[] bytes = stream.toByteArray(); stream.close(); return bytes; }
[ "public", "static", "byte", "[", "]", "writeImageToBytes", "(", "BufferedImage", "image", ",", "String", "formatName", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "stream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "ImageIO", ".", "write"...
Write the image to bytes in the provided format @param image buffered image @param formatName image format name @return image bytes @throws IOException upon failure @since 1.1.2
[ "Write", "the", "image", "to", "bytes", "in", "the", "provided", "format" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L178-L186
105,218
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/ImageUtils.java
ImageUtils.compressAndWriteImageToBytes
public static byte[] compressAndWriteImageToBytes(BufferedImage image, String formatName, float quality) { byte[] bytes = null; Iterator<ImageWriter> writers = ImageIO .getImageWritersByFormatName(formatName); if (writers == null || !writers.hasNext()) { throw new GeoPackageException( "No Image W...
java
public static byte[] compressAndWriteImageToBytes(BufferedImage image, String formatName, float quality) { byte[] bytes = null; Iterator<ImageWriter> writers = ImageIO .getImageWritersByFormatName(formatName); if (writers == null || !writers.hasNext()) { throw new GeoPackageException( "No Image W...
[ "public", "static", "byte", "[", "]", "compressAndWriteImageToBytes", "(", "BufferedImage", "image", ",", "String", "formatName", ",", "float", "quality", ")", "{", "byte", "[", "]", "bytes", "=", "null", ";", "Iterator", "<", "ImageWriter", ">", "writers", ...
Compress and write the image to bytes in the provided format and quality @param image buffered image @param formatName image format name @param quality quality between 0.0 and 1.0 @return compressed image bytes @since 1.1.2
[ "Compress", "and", "write", "the", "image", "to", "bytes", "in", "the", "provided", "format", "and", "quality" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/ImageUtils.java#L200-L236
105,219
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/IconDao.java
IconDao.queryForRow
public IconRow queryForRow(StyleMappingRow styleMappingRow) { IconRow iconRow = null; UserCustomRow userCustomRow = queryForIdRow(styleMappingRow .getRelatedId()); if (userCustomRow != null) { iconRow = getRow(userCustomRow); } return iconRow; }
java
public IconRow queryForRow(StyleMappingRow styleMappingRow) { IconRow iconRow = null; UserCustomRow userCustomRow = queryForIdRow(styleMappingRow .getRelatedId()); if (userCustomRow != null) { iconRow = getRow(userCustomRow); } return iconRow; }
[ "public", "IconRow", "queryForRow", "(", "StyleMappingRow", "styleMappingRow", ")", "{", "IconRow", "iconRow", "=", "null", ";", "UserCustomRow", "userCustomRow", "=", "queryForIdRow", "(", "styleMappingRow", ".", "getRelatedId", "(", ")", ")", ";", "if", "(", "...
Query for the icon row from a style mapping row @param styleMappingRow style mapping row @return icon row
[ "Query", "for", "the", "icon", "row", "from", "a", "style", "mapping", "row" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/IconDao.java#L71-L81
105,220
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.setScale
public void setScale(float scale) { this.scale = scale; linePaint.setStrokeWidth(scale * lineStrokeWidth); polygonPaint.setStrokeWidth(scale * polygonStrokeWidth); featurePaintCache.clear(); }
java
public void setScale(float scale) { this.scale = scale; linePaint.setStrokeWidth(scale * lineStrokeWidth); polygonPaint.setStrokeWidth(scale * polygonStrokeWidth); featurePaintCache.clear(); }
[ "public", "void", "setScale", "(", "float", "scale", ")", "{", "this", ".", "scale", "=", "scale", ";", "linePaint", ".", "setStrokeWidth", "(", "scale", "*", "lineStrokeWidth", ")", ";", "polygonPaint", ".", "setStrokeWidth", "(", "scale", "*", "polygonStro...
Set the scale @param scale scale factor @since 3.2.0
[ "Set", "the", "scale" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L452-L457
105,221
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTileBytes
public byte[] drawTileBytes(int x, int y, int zoom) { BufferedImage image = drawTile(x, y, zoom); byte[] tileData = null; // Convert the image to bytes if (image != null) { try { tileData = ImageUtils.writeImageToBytes(image, compressFormat); } catch (IOException e) { LOGGER.log(Level.SEVERE, "...
java
public byte[] drawTileBytes(int x, int y, int zoom) { BufferedImage image = drawTile(x, y, zoom); byte[] tileData = null; // Convert the image to bytes if (image != null) { try { tileData = ImageUtils.writeImageToBytes(image, compressFormat); } catch (IOException e) { LOGGER.log(Level.SEVERE, "...
[ "public", "byte", "[", "]", "drawTileBytes", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "BufferedImage", "image", "=", "drawTile", "(", "x", ",", "y", ",", "zoom", ")", ";", "byte", "[", "]", "tileData", "=", "null", ";", "//...
Draw the tile and get the bytes from the x, y, and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return tile bytes, or null
[ "Draw", "the", "tile", "and", "get", "the", "bytes", "from", "the", "x", "y", "and", "zoom", "level" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L895-L912
105,222
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTile
public BufferedImage drawTile(int x, int y, int zoom) { BufferedImage image; if (isIndexQuery()) { image = drawTileQueryIndex(x, y, zoom); } else { image = drawTileQueryAll(x, y, zoom); } return image; }
java
public BufferedImage drawTile(int x, int y, int zoom) { BufferedImage image; if (isIndexQuery()) { image = drawTileQueryIndex(x, y, zoom); } else { image = drawTileQueryAll(x, y, zoom); } return image; }
[ "public", "BufferedImage", "drawTile", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "BufferedImage", "image", ";", "if", "(", "isIndexQuery", "(", ")", ")", "{", "image", "=", "drawTileQueryIndex", "(", "x", ",", "y", ",", "zoom", ...
Draw a tile image from the x, y, and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return tile image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L925-L933
105,223
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTileQueryIndex
public BufferedImage drawTileQueryIndex(int x, int y, int zoom) { // Get the web mercator bounding box BoundingBox webMercatorBoundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for the geometry count matching the bounds in the index long tile...
java
public BufferedImage drawTileQueryIndex(int x, int y, int zoom) { // Get the web mercator bounding box BoundingBox webMercatorBoundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for the geometry count matching the bounds in the index long tile...
[ "public", "BufferedImage", "drawTileQueryIndex", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "// Get the web mercator bounding box", "BoundingBox", "webMercatorBoundingBox", "=", "TileBoundingBoxUtils", ".", "getWebMercatorBoundingBox", "(", "x", ","...
Draw a tile image from the x, y, and zoom level by querying features in the tile location @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level", "by", "querying", "features", "in", "the", "tile", "location" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L947-L990
105,224
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.queryIndexedFeaturesCount
public long queryIndexedFeaturesCount(BoundingBox webMercatorBoundingBox) { // Create an expanded bounding box to handle features outside the tile // that overlap BoundingBox expandedQueryBoundingBox = expandBoundingBox(webMercatorBoundingBox); // Query for the count of geometries matching the bounds in the i...
java
public long queryIndexedFeaturesCount(BoundingBox webMercatorBoundingBox) { // Create an expanded bounding box to handle features outside the tile // that overlap BoundingBox expandedQueryBoundingBox = expandBoundingBox(webMercatorBoundingBox); // Query for the count of geometries matching the bounds in the i...
[ "public", "long", "queryIndexedFeaturesCount", "(", "BoundingBox", "webMercatorBoundingBox", ")", "{", "// Create an expanded bounding box to handle features outside the tile", "// that overlap", "BoundingBox", "expandedQueryBoundingBox", "=", "expandBoundingBox", "(", "webMercatorBoun...
Query for feature result count in the bounding box @param webMercatorBoundingBox web mercator bounding box @return count
[ "Query", "for", "feature", "result", "count", "in", "the", "bounding", "box" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1022-L1033
105,225
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.queryIndexedFeatures
public CloseableIterator<GeometryIndex> queryIndexedFeatures(int x, int y, int zoom) { // Get the web mercator bounding box BoundingBox webMercatorBoundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); // Query for the geometries matching the bounds in the index return queryIndexedF...
java
public CloseableIterator<GeometryIndex> queryIndexedFeatures(int x, int y, int zoom) { // Get the web mercator bounding box BoundingBox webMercatorBoundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); // Query for the geometries matching the bounds in the index return queryIndexedF...
[ "public", "CloseableIterator", "<", "GeometryIndex", ">", "queryIndexedFeatures", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "// Get the web mercator bounding box", "BoundingBox", "webMercatorBoundingBox", "=", "TileBoundingBoxUtils", ".", "getWebMe...
Query for feature results in the x, y, and zoom @param x x coordinate @param y y coordinate @param zoom zoom level @return feature count @since 3.2.0
[ "Query", "for", "feature", "results", "in", "the", "x", "y", "and", "zoom" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1047-L1056
105,226
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.queryIndexedFeatures
public CloseableIterator<GeometryIndex> queryIndexedFeatures( BoundingBox webMercatorBoundingBox) { // Create an expanded bounding box to handle features outside the tile // that overlap BoundingBox expandedQueryBoundingBox = expandBoundingBox(webMercatorBoundingBox); // Query for geometries matching the b...
java
public CloseableIterator<GeometryIndex> queryIndexedFeatures( BoundingBox webMercatorBoundingBox) { // Create an expanded bounding box to handle features outside the tile // that overlap BoundingBox expandedQueryBoundingBox = expandBoundingBox(webMercatorBoundingBox); // Query for geometries matching the b...
[ "public", "CloseableIterator", "<", "GeometryIndex", ">", "queryIndexedFeatures", "(", "BoundingBox", "webMercatorBoundingBox", ")", "{", "// Create an expanded bounding box to handle features outside the tile", "// that overlap", "BoundingBox", "expandedQueryBoundingBox", "=", "expa...
Query for feature results in the bounding box @param webMercatorBoundingBox web mercator bounding box @return geometry index results
[ "Query", "for", "feature", "results", "in", "the", "bounding", "box" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1065-L1077
105,227
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTileQueryAll
public BufferedImage drawTileQueryAll(int x, int y, int zoom) { BoundingBox boundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for all features FeatureResultSet resultSet = featureDao.queryForAll(); try { int totalCount = resultSet.getCo...
java
public BufferedImage drawTileQueryAll(int x, int y, int zoom) { BoundingBox boundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for all features FeatureResultSet resultSet = featureDao.queryForAll(); try { int totalCount = resultSet.getCo...
[ "public", "BufferedImage", "drawTileQueryAll", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "BoundingBox", "boundingBox", "=", "TileBoundingBoxUtils", ".", "getWebMercatorBoundingBox", "(", "x", ",", "y", ",", "zoom", ")", ";", "BufferedImag...
Draw a tile image from the x, y, and zoom level by querying all features. This could be very slow if there are a lot of features @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level", "by", "querying", "all", "features", ".", "This", "could", "be", "very", "slow", "if", "there", "are", "a", "lot", "of", "features" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1193-L1229
105,228
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.getGraphics
protected Graphics2D getGraphics(BufferedImage image) { Graphics2D graphics = image.createGraphics(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); return graphics; }
java
protected Graphics2D getGraphics(BufferedImage image) { Graphics2D graphics = image.createGraphics(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); return graphics; }
[ "protected", "Graphics2D", "getGraphics", "(", "BufferedImage", "image", ")", "{", "Graphics2D", "graphics", "=", "image", ".", "createGraphics", "(", ")", ";", "graphics", ".", "setRenderingHint", "(", "RenderingHints", ".", "KEY_ANTIALIASING", ",", "RenderingHints...
Get a graphics for the image @param image buffered image @return graphics
[ "Get", "a", "graphics", "for", "the", "image" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1248-L1253
105,229
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.getStylePaint
private Paint getStylePaint(StyleRow style, FeatureDrawType drawType) { Paint paint = featurePaintCache.getPaint(style, drawType); if (paint == null) { mil.nga.geopackage.style.Color color = null; Float strokeWidth = null; switch (drawType) { case CIRCLE: color = style.getColorOrDefault(); b...
java
private Paint getStylePaint(StyleRow style, FeatureDrawType drawType) { Paint paint = featurePaintCache.getPaint(style, drawType); if (paint == null) { mil.nga.geopackage.style.Color color = null; Float strokeWidth = null; switch (drawType) { case CIRCLE: color = style.getColorOrDefault(); b...
[ "private", "Paint", "getStylePaint", "(", "StyleRow", "style", ",", "FeatureDrawType", "drawType", ")", "{", "Paint", "paint", "=", "featurePaintCache", ".", "getPaint", "(", "style", ",", "drawType", ")", ";", "if", "(", "paint", "==", "null", ")", "{", "...
Get the style paint from cache, or create and cache it @param style style row @param drawType draw type @return paint
[ "Get", "the", "style", "paint", "from", "cache", "or", "create", "and", "cache", "it" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1480-L1525
105,230
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.isTransparent
protected boolean isTransparent(BufferedImage image) { boolean transparent = false; if (image != null) { WritableRaster raster = image.getAlphaRaster(); if (raster != null) { transparent = true; done: for (int x = 0; x < image.getWidth(); x++) { for (int y = 0; y < image.getHeight(); y++) { ...
java
protected boolean isTransparent(BufferedImage image) { boolean transparent = false; if (image != null) { WritableRaster raster = image.getAlphaRaster(); if (raster != null) { transparent = true; done: for (int x = 0; x < image.getWidth(); x++) { for (int y = 0; y < image.getHeight(); y++) { ...
[ "protected", "boolean", "isTransparent", "(", "BufferedImage", "image", ")", "{", "boolean", "transparent", "=", "false", ";", "if", "(", "image", "!=", "null", ")", "{", "WritableRaster", "raster", "=", "image", ".", "getAlphaRaster", "(", ")", ";", "if", ...
Determine if the image is transparent @param image image @return true if transparent
[ "Determine", "if", "the", "image", "is", "transparent" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1534-L1551
105,231
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/user/UserRow.java
UserRow.toContentValues
public ContentValues toContentValues() { ContentValues contentValues = new ContentValues(); for (TColumn column : table.getColumns()) { if (!column.isPrimaryKey()) { Object value = values[column.getIndex()]; String columnName = column.getName(); if (value == null) { contentValues.putNull(col...
java
public ContentValues toContentValues() { ContentValues contentValues = new ContentValues(); for (TColumn column : table.getColumns()) { if (!column.isPrimaryKey()) { Object value = values[column.getIndex()]; String columnName = column.getName(); if (value == null) { contentValues.putNull(col...
[ "public", "ContentValues", "toContentValues", "(", ")", "{", "ContentValues", "contentValues", "=", "new", "ContentValues", "(", ")", ";", "for", "(", "TColumn", "column", ":", "table", ".", "getColumns", "(", ")", ")", "{", "if", "(", "!", "column", ".", ...
Convert the row to content values @return content values
[ "Convert", "the", "row", "to", "content", "values" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/user/UserRow.java#L60-L81
105,232
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/user/UserRow.java
UserRow.columnToContentValue
protected void columnToContentValue(ContentValues contentValues, TColumn column, Object value) { String columnName = column.getName(); if (value instanceof Number) { if (value instanceof Byte) { validateValue(column, value, Byte.class, Short.class, Integer.class, Long.class); contentValues.put...
java
protected void columnToContentValue(ContentValues contentValues, TColumn column, Object value) { String columnName = column.getName(); if (value instanceof Number) { if (value instanceof Byte) { validateValue(column, value, Byte.class, Short.class, Integer.class, Long.class); contentValues.put...
[ "protected", "void", "columnToContentValue", "(", "ContentValues", "contentValues", ",", "TColumn", "column", ",", "Object", "value", ")", "{", "String", "columnName", "=", "column", ".", "getName", "(", ")", ";", "if", "(", "value", "instanceof", "Number", ")...
Map the column to the content values @param contentValues content values @param column column @param value value
[ "Map", "the", "column", "to", "the", "content", "values" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/user/UserRow.java#L93-L144
105,233
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/UserMappingDao.java
UserMappingDao.queryByIds
public UserCustomResultSet queryByIds(long baseId, long relatedId) { return query(buildWhereIds(baseId, relatedId), buildWhereIdsArgs(baseId, relatedId)); }
java
public UserCustomResultSet queryByIds(long baseId, long relatedId) { return query(buildWhereIds(baseId, relatedId), buildWhereIdsArgs(baseId, relatedId)); }
[ "public", "UserCustomResultSet", "queryByIds", "(", "long", "baseId", ",", "long", "relatedId", ")", "{", "return", "query", "(", "buildWhereIds", "(", "baseId", ",", "relatedId", ")", ",", "buildWhereIdsArgs", "(", "baseId", ",", "relatedId", ")", ")", ";", ...
Query by both base id and related id @param baseId base id @param relatedId related id @return result set
[ "Query", "by", "both", "base", "id", "and", "related", "id" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/UserMappingDao.java#L188-L191
105,234
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
FeatureIndexManager.isIndexed
public boolean isIndexed(FeatureIndexType type) { boolean indexed = false; if (type == null) { indexed = isIndexed(); } else { switch (type) { case GEOPACKAGE: indexed = featureTableIndex.isIndexed(); break; case RTREE: indexed = rTreeIndexTableDao.has(); break; default: throw n...
java
public boolean isIndexed(FeatureIndexType type) { boolean indexed = false; if (type == null) { indexed = isIndexed(); } else { switch (type) { case GEOPACKAGE: indexed = featureTableIndex.isIndexed(); break; case RTREE: indexed = rTreeIndexTableDao.has(); break; default: throw n...
[ "public", "boolean", "isIndexed", "(", "FeatureIndexType", "type", ")", "{", "boolean", "indexed", "=", "false", ";", "if", "(", "type", "==", "null", ")", "{", "indexed", "=", "isIndexed", "(", ")", ";", "}", "else", "{", "switch", "(", "type", ")", ...
Is the feature table indexed in the provided type location @param type index location type @return true if indexed
[ "Is", "the", "feature", "table", "indexed", "in", "the", "provided", "type", "location" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java#L624-L642
105,235
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
FeatureIndexManager.query
public FeatureIndexResults query() { FeatureIndexResults results = null; switch (getIndexedType()) { case GEOPACKAGE: long count = featureTableIndex.count(); CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex .query(); results = new FeatureIndexGeoPackageResults(featureTableIndex, ...
java
public FeatureIndexResults query() { FeatureIndexResults results = null; switch (getIndexedType()) { case GEOPACKAGE: long count = featureTableIndex.count(); CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex .query(); results = new FeatureIndexGeoPackageResults(featureTableIndex, ...
[ "public", "FeatureIndexResults", "query", "(", ")", "{", "FeatureIndexResults", "results", "=", "null", ";", "switch", "(", "getIndexedType", "(", ")", ")", "{", "case", "GEOPACKAGE", ":", "long", "count", "=", "featureTableIndex", ".", "count", "(", ")", ";...
Query for all feature index results @return feature index results, close when done
[ "Query", "for", "all", "feature", "index", "results" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java#L710-L730
105,236
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
FeatureIndexManager.count
public long count(BoundingBox boundingBox) { long count = 0; switch (getIndexedType()) { case GEOPACKAGE: count = featureTableIndex.count(boundingBox); break; case RTREE: count = rTreeIndexTableDao.count(boundingBox); break; default: count = manualFeatureQuery.count(boundingBox); } return c...
java
public long count(BoundingBox boundingBox) { long count = 0; switch (getIndexedType()) { case GEOPACKAGE: count = featureTableIndex.count(boundingBox); break; case RTREE: count = rTreeIndexTableDao.count(boundingBox); break; default: count = manualFeatureQuery.count(boundingBox); } return c...
[ "public", "long", "count", "(", "BoundingBox", "boundingBox", ")", "{", "long", "count", "=", "0", ";", "switch", "(", "getIndexedType", "(", ")", ")", "{", "case", "GEOPACKAGE", ":", "count", "=", "featureTableIndex", ".", "count", "(", "boundingBox", ")"...
Query for feature index count within the bounding box, projected correctly @param boundingBox bounding box @return count
[ "Query", "for", "feature", "index", "count", "within", "the", "bounding", "box", "projected", "correctly" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java#L832-L845
105,237
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
FeatureIndexManager.query
public FeatureIndexResults query(GeometryEnvelope envelope) { FeatureIndexResults results = null; switch (getIndexedType()) { case GEOPACKAGE: long count = featureTableIndex.count(envelope); CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex .query(envelope); results = new FeatureI...
java
public FeatureIndexResults query(GeometryEnvelope envelope) { FeatureIndexResults results = null; switch (getIndexedType()) { case GEOPACKAGE: long count = featureTableIndex.count(envelope); CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex .query(envelope); results = new FeatureI...
[ "public", "FeatureIndexResults", "query", "(", "GeometryEnvelope", "envelope", ")", "{", "FeatureIndexResults", "results", "=", "null", ";", "switch", "(", "getIndexedType", "(", ")", ")", "{", "case", "GEOPACKAGE", ":", "long", "count", "=", "featureTableIndex", ...
Query for feature index results within the Geometry Envelope @param envelope geometry envelope @return feature index results, close when done
[ "Query", "for", "feature", "index", "results", "within", "the", "Geometry", "Envelope" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java#L854-L873
105,238
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
FeatureIndexManager.count
public long count(GeometryEnvelope envelope) { long count = 0; switch (getIndexedType()) { case GEOPACKAGE: count = featureTableIndex.count(envelope); break; case RTREE: count = rTreeIndexTableDao.count(envelope); break; default: count = manualFeatureQuery.count(envelope); } return count; ...
java
public long count(GeometryEnvelope envelope) { long count = 0; switch (getIndexedType()) { case GEOPACKAGE: count = featureTableIndex.count(envelope); break; case RTREE: count = rTreeIndexTableDao.count(envelope); break; default: count = manualFeatureQuery.count(envelope); } return count; ...
[ "public", "long", "count", "(", "GeometryEnvelope", "envelope", ")", "{", "long", "count", "=", "0", ";", "switch", "(", "getIndexedType", "(", ")", ")", "{", "case", "GEOPACKAGE", ":", "count", "=", "featureTableIndex", ".", "count", "(", "envelope", ")",...
Query for feature index count within the Geometry Envelope @param envelope geometry envelope @return count
[ "Query", "for", "feature", "index", "count", "within", "the", "Geometry", "Envelope" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java#L882-L895
105,239
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/Progress.java
Progress.getZoomLevelMax
public Integer getZoomLevelMax(int zoomLevel) { Integer zoomMax = zoomLevelMax.get(zoomLevel); if (zoomMax == null) { zoomMax = 0; } return zoomMax; }
java
public Integer getZoomLevelMax(int zoomLevel) { Integer zoomMax = zoomLevelMax.get(zoomLevel); if (zoomMax == null) { zoomMax = 0; } return zoomMax; }
[ "public", "Integer", "getZoomLevelMax", "(", "int", "zoomLevel", ")", "{", "Integer", "zoomMax", "=", "zoomLevelMax", ".", "get", "(", "zoomLevel", ")", ";", "if", "(", "zoomMax", "==", "null", ")", "{", "zoomMax", "=", "0", ";", "}", "return", "zoomMax"...
Get the max at the zoom level @param zoomLevel zoom level @return max
[ "Get", "the", "max", "at", "the", "zoom", "level" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/Progress.java#L192-L198
105,240
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/Progress.java
Progress.getZoomLevelProgress
public int getZoomLevelProgress(int zoomLevel) { Integer zoomProgress = zoomLevelProgress.get(zoomLevel); if (zoomProgress == null) { zoomProgress = 0; } return zoomProgress; }
java
public int getZoomLevelProgress(int zoomLevel) { Integer zoomProgress = zoomLevelProgress.get(zoomLevel); if (zoomProgress == null) { zoomProgress = 0; } return zoomProgress; }
[ "public", "int", "getZoomLevelProgress", "(", "int", "zoomLevel", ")", "{", "Integer", "zoomProgress", "=", "zoomLevelProgress", ".", "get", "(", "zoomLevel", ")", ";", "if", "(", "zoomProgress", "==", "null", ")", "{", "zoomProgress", "=", "0", ";", "}", ...
Get the total progress at the zoom level @param zoomLevel zoom level @return progress
[ "Get", "the", "total", "progress", "at", "the", "zoom", "level" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/Progress.java#L216-L222
105,241
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java
FeatureTileGraphics.createImage
public BufferedImage createImage() { BufferedImage image = null; Graphics2D graphics = null; for (int layer = 0; layer < 4; layer++) { BufferedImage layerImage = layeredImage[layer]; if (layerImage != null) { if (image == null) { image = layerImage; graphics = layeredGraphics[layer]; ...
java
public BufferedImage createImage() { BufferedImage image = null; Graphics2D graphics = null; for (int layer = 0; layer < 4; layer++) { BufferedImage layerImage = layeredImage[layer]; if (layerImage != null) { if (image == null) { image = layerImage; graphics = layeredGraphics[layer]; ...
[ "public", "BufferedImage", "createImage", "(", ")", "{", "BufferedImage", "image", "=", "null", ";", "Graphics2D", "graphics", "=", "null", ";", "for", "(", "int", "layer", "=", "0", ";", "layer", "<", "4", ";", "layer", "++", ")", "{", "BufferedImage", ...
Create the final image from the layers, resets the layers @return image
[ "Create", "the", "final", "image", "from", "the", "layers", "resets", "the", "layers" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java#L146-L176
105,242
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java
FeatureTileGraphics.dispose
public void dispose() { for (int layer = 0; layer < 4; layer++) { Graphics2D graphics = layeredGraphics[layer]; if (graphics != null) { graphics.dispose(); layeredGraphics[layer] = null; } BufferedImage image = layeredImage[layer]; if (image != null) { image.flush(); layeredImage[layer]...
java
public void dispose() { for (int layer = 0; layer < 4; layer++) { Graphics2D graphics = layeredGraphics[layer]; if (graphics != null) { graphics.dispose(); layeredGraphics[layer] = null; } BufferedImage image = layeredImage[layer]; if (image != null) { image.flush(); layeredImage[layer]...
[ "public", "void", "dispose", "(", ")", "{", "for", "(", "int", "layer", "=", "0", ";", "layer", "<", "4", ";", "layer", "++", ")", "{", "Graphics2D", "graphics", "=", "layeredGraphics", "[", "layer", "]", ";", "if", "(", "graphics", "!=", "null", "...
Dispose of the layered graphics and images
[ "Dispose", "of", "the", "layered", "graphics", "and", "images" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java#L181-L194
105,243
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java
FeatureTileGraphics.getImage
private BufferedImage getImage(int layer) { BufferedImage image = layeredImage[layer]; if (image == null) { createImageAndGraphics(layer); image = layeredImage[layer]; } return image; }
java
private BufferedImage getImage(int layer) { BufferedImage image = layeredImage[layer]; if (image == null) { createImageAndGraphics(layer); image = layeredImage[layer]; } return image; }
[ "private", "BufferedImage", "getImage", "(", "int", "layer", ")", "{", "BufferedImage", "image", "=", "layeredImage", "[", "layer", "]", ";", "if", "(", "image", "==", "null", ")", "{", "createImageAndGraphics", "(", "layer", ")", ";", "image", "=", "layer...
Get the bitmap for the layer index @param layer layer index @return bitmap
[ "Get", "the", "bitmap", "for", "the", "layer", "index" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java#L203-L210
105,244
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java
FeatureTileGraphics.getGraphics
private Graphics2D getGraphics(int layer) { Graphics2D graphics = layeredGraphics[layer]; if (graphics == null) { createImageAndGraphics(layer); graphics = layeredGraphics[layer]; } return graphics; }
java
private Graphics2D getGraphics(int layer) { Graphics2D graphics = layeredGraphics[layer]; if (graphics == null) { createImageAndGraphics(layer); graphics = layeredGraphics[layer]; } return graphics; }
[ "private", "Graphics2D", "getGraphics", "(", "int", "layer", ")", "{", "Graphics2D", "graphics", "=", "layeredGraphics", "[", "layer", "]", ";", "if", "(", "graphics", "==", "null", ")", "{", "createImageAndGraphics", "(", "layer", ")", ";", "graphics", "=",...
Get the graphics for the layer index @param layer layer index @return graphics
[ "Get", "the", "graphics", "for", "the", "layer", "index" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java#L219-L226
105,245
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java
FeatureTileGraphics.createImageAndGraphics
private void createImageAndGraphics(int layer) { layeredImage[layer] = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_INT_ARGB); layeredGraphics[layer] = layeredImage[layer].createGraphics(); layeredGraphics[layer].setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_AN...
java
private void createImageAndGraphics(int layer) { layeredImage[layer] = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_INT_ARGB); layeredGraphics[layer] = layeredImage[layer].createGraphics(); layeredGraphics[layer].setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_AN...
[ "private", "void", "createImageAndGraphics", "(", "int", "layer", ")", "{", "layeredImage", "[", "layer", "]", "=", "new", "BufferedImage", "(", "tileWidth", ",", "tileHeight", ",", "BufferedImage", ".", "TYPE_INT_ARGB", ")", ";", "layeredGraphics", "[", "layer"...
Create a new empty Image and Graphics @param layer layer index
[ "Create", "a", "new", "empty", "Image", "and", "Graphics" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java#L234-L241
105,246
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/features/user/FeatureCache.java
FeatureCache.resize
public void resize(int maxSize) { this.maxSize = maxSize; if (cache.size() > maxSize) { int count = 0; Iterator<Long> rowIds = cache.keySet().iterator(); while (rowIds.hasNext()) { rowIds.next(); if (++count > maxSize) { rowIds.remove(); } } } }
java
public void resize(int maxSize) { this.maxSize = maxSize; if (cache.size() > maxSize) { int count = 0; Iterator<Long> rowIds = cache.keySet().iterator(); while (rowIds.hasNext()) { rowIds.next(); if (++count > maxSize) { rowIds.remove(); } } } }
[ "public", "void", "resize", "(", "int", "maxSize", ")", "{", "this", ".", "maxSize", "=", "maxSize", ";", "if", "(", "cache", ".", "size", "(", ")", ">", "maxSize", ")", "{", "int", "count", "=", "0", ";", "Iterator", "<", "Long", ">", "rowIds", ...
Resize the cache @param maxSize max size
[ "Resize", "the", "cache" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/features/user/FeatureCache.java#L132-L144
105,247
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java
CoverageData.getResults
private CoverageDataTileMatrixResults getResults( BoundingBox requestProjectedBoundingBox, TileMatrix tileMatrix, int overlappingPixels) { CoverageDataTileMatrixResults results = null; BoundingBox paddedBoundingBox = padBoundingBox(tileMatrix, requestProjectedBoundingBox, overlappingPixels); TileResultS...
java
private CoverageDataTileMatrixResults getResults( BoundingBox requestProjectedBoundingBox, TileMatrix tileMatrix, int overlappingPixels) { CoverageDataTileMatrixResults results = null; BoundingBox paddedBoundingBox = padBoundingBox(tileMatrix, requestProjectedBoundingBox, overlappingPixels); TileResultS...
[ "private", "CoverageDataTileMatrixResults", "getResults", "(", "BoundingBox", "requestProjectedBoundingBox", ",", "TileMatrix", "tileMatrix", ",", "int", "overlappingPixels", ")", "{", "CoverageDataTileMatrixResults", "results", "=", "null", ";", "BoundingBox", "paddedBoundin...
Get the coverage data tile results for a specified tile matrix @param requestProjectedBoundingBox request projected bounding box @param tileMatrix tile matrix @param overlappingPixels number of overlapping pixels used by the algorithm @return tile matrix results
[ "Get", "the", "coverage", "data", "tile", "results", "for", "a", "specified", "tile", "matrix" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java#L502-L519
105,248
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java
CoverageData.retrieveSortedTileResults
private TileResultSet retrieveSortedTileResults( BoundingBox projectedRequestBoundingBox, TileMatrix tileMatrix) { TileResultSet tileResults = null; if (tileMatrix != null) { // Get the tile grid TileGrid tileGrid = TileBoundingBoxUtils.getTileGrid( coverageBoundingBox, tileMatrix.getMatrixWidth(),...
java
private TileResultSet retrieveSortedTileResults( BoundingBox projectedRequestBoundingBox, TileMatrix tileMatrix) { TileResultSet tileResults = null; if (tileMatrix != null) { // Get the tile grid TileGrid tileGrid = TileBoundingBoxUtils.getTileGrid( coverageBoundingBox, tileMatrix.getMatrixWidth(),...
[ "private", "TileResultSet", "retrieveSortedTileResults", "(", "BoundingBox", "projectedRequestBoundingBox", ",", "TileMatrix", "tileMatrix", ")", "{", "TileResultSet", "tileResults", "=", "null", ";", "if", "(", "tileMatrix", "!=", "null", ")", "{", "// Get the tile gri...
Get the tile row results of coverage data tiles needed to create the requested bounding box coverage data, sorted by row and then column @param projectedRequestBoundingBox bounding box projected to the coverage data @param tileMatrix tile matrix @return tile results or null
[ "Get", "the", "tile", "row", "results", "of", "coverage", "data", "tiles", "needed", "to", "create", "the", "requested", "bounding", "box", "coverage", "data", "sorted", "by", "row", "and", "then", "column" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java#L1039-L1059
105,249
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaDao.java
MediaDao.getRows
public List<MediaRow> getRows(List<Long> ids) { List<MediaRow> mediaRows = new ArrayList<>(); for (long id : ids) { UserCustomRow userCustomRow = queryForIdRow(id); if (userCustomRow != null) { mediaRows.add(getRow(userCustomRow)); } } return mediaRows; }
java
public List<MediaRow> getRows(List<Long> ids) { List<MediaRow> mediaRows = new ArrayList<>(); for (long id : ids) { UserCustomRow userCustomRow = queryForIdRow(id); if (userCustomRow != null) { mediaRows.add(getRow(userCustomRow)); } } return mediaRows; }
[ "public", "List", "<", "MediaRow", ">", "getRows", "(", "List", "<", "Long", ">", "ids", ")", "{", "List", "<", "MediaRow", ">", "mediaRows", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "long", "id", ":", "ids", ")", "{", "UserCustomR...
Get the media rows that exist with the provided ids @param ids list of ids @return media rows
[ "Get", "the", "media", "rows", "that", "exist", "with", "the", "provided", "ids" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/media/MediaDao.java#L85-L94
105,250
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/FeatureTileGen.java
FeatureTileGen.getColor
private static Color getColor(String colorString) { Color color = null; String[] colorParts = colorString.split(","); try { switch (colorParts.length) { case 1: Field field = Color.class.getField(colorString); color = (Color) field.get(null); break; case 3: color = new Color(Integer...
java
private static Color getColor(String colorString) { Color color = null; String[] colorParts = colorString.split(","); try { switch (colorParts.length) { case 1: Field field = Color.class.getField(colorString); color = (Color) field.get(null); break; case 3: color = new Color(Integer...
[ "private", "static", "Color", "getColor", "(", "String", "colorString", ")", "{", "Color", "color", "=", "null", ";", "String", "[", "]", "colorParts", "=", "colorString", ".", "split", "(", "\",\"", ")", ";", "try", "{", "switch", "(", "colorParts", "."...
Get the color from the string @param colorString @return
[ "Get", "the", "color", "from", "the", "string" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/FeatureTileGen.java#L752-L791
105,251
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/FeatureTileGen.java
FeatureTileGen.colorString
private static String colorString(Color color) { return color.getRed() + "," + color.getGreen() + "," + color.getBlue() + "," + color.getAlpha(); }
java
private static String colorString(Color color) { return color.getRed() + "," + color.getGreen() + "," + color.getBlue() + "," + color.getAlpha(); }
[ "private", "static", "String", "colorString", "(", "Color", "color", ")", "{", "return", "color", ".", "getRed", "(", ")", "+", "\",\"", "+", "color", ".", "getGreen", "(", ")", "+", "\",\"", "+", "color", ".", "getBlue", "(", ")", "+", "\",\"", "+",...
Get a r,g,b,a color string from the color @param color @return color string
[ "Get", "a", "r", "g", "b", "a", "color", "string", "from", "the", "color" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/FeatureTileGen.java#L1308-L1311
105,252
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/TileProperties.java
TileProperties.getIntegerProperty
public Integer getIntegerProperty(String property, boolean required) { Integer integerValue = null; String value = getProperty(property, required); if (value != null) { try { integerValue = Integer.valueOf(value); } catch (NumberFormatException e) { throw new GeoPackageException(GEOPACKAGE_PROPERTIE...
java
public Integer getIntegerProperty(String property, boolean required) { Integer integerValue = null; String value = getProperty(property, required); if (value != null) { try { integerValue = Integer.valueOf(value); } catch (NumberFormatException e) { throw new GeoPackageException(GEOPACKAGE_PROPERTIE...
[ "public", "Integer", "getIntegerProperty", "(", "String", "property", ",", "boolean", "required", ")", "{", "Integer", "integerValue", "=", "null", ";", "String", "value", "=", "getProperty", "(", "property", ",", "required", ")", ";", "if", "(", "value", "!...
Get the Integer property @param property property @param required required flag @return integer property
[ "Get", "the", "Integer", "property" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/TileProperties.java#L136-L149
105,253
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/TileProperties.java
TileProperties.getDoubleProperty
public Double getDoubleProperty(String property, boolean required) { Double doubleValue = null; String value = getProperty(property, required); if (value != null) { try { doubleValue = Double.valueOf(value); } catch (NumberFormatException e) { throw new GeoPackageException(GEOPACKAGE_PROPERTIES_FILE...
java
public Double getDoubleProperty(String property, boolean required) { Double doubleValue = null; String value = getProperty(property, required); if (value != null) { try { doubleValue = Double.valueOf(value); } catch (NumberFormatException e) { throw new GeoPackageException(GEOPACKAGE_PROPERTIES_FILE...
[ "public", "Double", "getDoubleProperty", "(", "String", "property", ",", "boolean", "required", ")", "{", "Double", "doubleValue", "=", "null", ";", "String", "value", "=", "getProperty", "(", "property", ",", "required", ")", ";", "if", "(", "value", "!=", ...
Get the Double property @param property property @param required required flag @return double property
[ "Get", "the", "Double", "property" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/TileProperties.java#L160-L173
105,254
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/TileProperties.java
TileProperties.getProperty
public String getProperty(String property, boolean required) { if (properties == null) { throw new GeoPackageException( "Properties must be loaded before reading"); } String value = properties.getProperty(property); if (value == null && required) { throw new GeoPackageException(GEOPACKAGE_PROPERTIE...
java
public String getProperty(String property, boolean required) { if (properties == null) { throw new GeoPackageException( "Properties must be loaded before reading"); } String value = properties.getProperty(property); if (value == null && required) { throw new GeoPackageException(GEOPACKAGE_PROPERTIE...
[ "public", "String", "getProperty", "(", "String", "property", ",", "boolean", "required", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Properties must be loaded before reading\"", ")", ";", "}", "String"...
Get the String property @param property property @param required required flag @return string property
[ "Get", "the", "String", "property" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/TileProperties.java#L184-L197
105,255
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/TileProperties.java
TileProperties.writeFile
public void writeFile(TileDao tileDao) { try { PrintWriter pw = new PrintWriter(propertiesFile); TileMatrixSet tileMatrixSet = tileDao.getTileMatrixSet(); pw.println(GEOPACKAGE_PROPERTIES_EPSG + "=" + tileMatrixSet.getSrs().getOrganizationCoordsysId()); pw.println(GEOPACKAGE_PROPERTIES_MIN_X + "=" ...
java
public void writeFile(TileDao tileDao) { try { PrintWriter pw = new PrintWriter(propertiesFile); TileMatrixSet tileMatrixSet = tileDao.getTileMatrixSet(); pw.println(GEOPACKAGE_PROPERTIES_EPSG + "=" + tileMatrixSet.getSrs().getOrganizationCoordsysId()); pw.println(GEOPACKAGE_PROPERTIES_MIN_X + "=" ...
[ "public", "void", "writeFile", "(", "TileDao", "tileDao", ")", "{", "try", "{", "PrintWriter", "pw", "=", "new", "PrintWriter", "(", "propertiesFile", ")", ";", "TileMatrixSet", "tileMatrixSet", "=", "tileDao", ".", "getTileMatrixSet", "(", ")", ";", "pw", "...
Write the properties file using the tile dao @param tileDao tile dao
[ "Write", "the", "properties", "file", "using", "the", "tile", "dao" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/TileProperties.java#L205-L236
105,256
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.header
public String header() { StringBuilder output = new StringBuilder(); output.append("GeoPackage File: " + geoPackage.getPath()); output.append("\nGeoPackage Name: " + geoPackage.getName()); return output.toString(); }
java
public String header() { StringBuilder output = new StringBuilder(); output.append("GeoPackage File: " + geoPackage.getPath()); output.append("\nGeoPackage Name: " + geoPackage.getName()); return output.toString(); }
[ "public", "String", "header", "(", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"GeoPackage File: \"", "+", "geoPackage", ".", "getPath", "(", ")", ")", ";", "output", ".", "append", "(", ...
Get the GeoPackage file and name header text @return text
[ "Get", "the", "GeoPackage", "file", "and", "name", "header", "text" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L39-L44
105,257
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.tileTable
public String tileTable(String table) { StringBuilder output = new StringBuilder(); TileDao tileDao = geoPackage.getTileDao(table); output.append("Table Name: " + tileDao.getTableName()); long minZoom = tileDao.getMinZoom(); long maxZoom = tileDao.getMaxZoom(); output.append("\nMin Zoom: " + minZoom); ou...
java
public String tileTable(String table) { StringBuilder output = new StringBuilder(); TileDao tileDao = geoPackage.getTileDao(table); output.append("Table Name: " + tileDao.getTableName()); long minZoom = tileDao.getMinZoom(); long maxZoom = tileDao.getMaxZoom(); output.append("\nMin Zoom: " + minZoom); ou...
[ "public", "String", "tileTable", "(", "String", "table", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "TileDao", "tileDao", "=", "geoPackage", ".", "getTileDao", "(", "table", ")", ";", "output", ".", "append", "(", "\"T...
Build text from a tile table @param table tile table @return text
[ "Build", "text", "from", "a", "tile", "table" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L53-L86
105,258
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.textOutput
public String textOutput(SpatialReferenceSystem srs) { StringBuilder output = new StringBuilder(); output.append("\tSRS " + SpatialReferenceSystem.COLUMN_ORGANIZATION + ": " + srs.getOrganization()); output.append("\n\tSRS " + SpatialReferenceSystem.COLUMN_ORGANIZATION_COORDSYS_ID + ": " + srs.getOrga...
java
public String textOutput(SpatialReferenceSystem srs) { StringBuilder output = new StringBuilder(); output.append("\tSRS " + SpatialReferenceSystem.COLUMN_ORGANIZATION + ": " + srs.getOrganization()); output.append("\n\tSRS " + SpatialReferenceSystem.COLUMN_ORGANIZATION_COORDSYS_ID + ": " + srs.getOrga...
[ "public", "String", "textOutput", "(", "SpatialReferenceSystem", "srs", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"\\tSRS \"", "+", "SpatialReferenceSystem", ".", "COLUMN_ORGANIZATION", "+", "\...
Text output from a SRS @param srs spatial reference system @return text
[ "Text", "output", "from", "a", "SRS" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L95-L105
105,259
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.textOutput
public String textOutput(Contents contents) { StringBuilder output = new StringBuilder(); output.append("\t" + Contents.COLUMN_TABLE_NAME + ": " + contents.getTableName()); output.append("\n\t" + Contents.COLUMN_DATA_TYPE + ": " + contents.getDataType()); output.append("\n\t" + Contents.COLUMN_IDENTIFIE...
java
public String textOutput(Contents contents) { StringBuilder output = new StringBuilder(); output.append("\t" + Contents.COLUMN_TABLE_NAME + ": " + contents.getTableName()); output.append("\n\t" + Contents.COLUMN_DATA_TYPE + ": " + contents.getDataType()); output.append("\n\t" + Contents.COLUMN_IDENTIFIE...
[ "public", "String", "textOutput", "(", "Contents", "contents", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"\\t\"", "+", "Contents", ".", "COLUMN_TABLE_NAME", "+", "\": \"", "+", "contents", ...
Text output from a Contents @param contents contents @return text
[ "Text", "output", "from", "a", "Contents" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L114-L136
105,260
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.textOutput
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 + ": " ...
java
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 + ": " ...
[ "public", "String", "textOutput", "(", "TileMatrixSet", "tileMatrixSet", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"\\t\"", "+", "TileMatrixSet", ".", "COLUMN_TABLE_NAME", "+", "\": \"", "+",...
Text output from a TileMatrixSet @param tileMatrixSet tile matrix set @return text
[ "Text", "output", "from", "a", "TileMatrixSet" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L145-L159
105,261
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.textOutput
public String textOutput(TileMatrix tileMatrix) { StringBuilder output = new StringBuilder(); output.append("\t" + TileMatrix.COLUMN_TABLE_NAME + ": " + tileMatrix.getTableName()); output.append("\n\t" + TileMatrix.COLUMN_ZOOM_LEVEL + ": " + tileMatrix.getZoomLevel()); output.append("\n\t" + TileMatrix....
java
public String textOutput(TileMatrix tileMatrix) { StringBuilder output = new StringBuilder(); output.append("\t" + TileMatrix.COLUMN_TABLE_NAME + ": " + tileMatrix.getTableName()); output.append("\n\t" + TileMatrix.COLUMN_ZOOM_LEVEL + ": " + tileMatrix.getZoomLevel()); output.append("\n\t" + TileMatrix....
[ "public", "String", "textOutput", "(", "TileMatrix", "tileMatrix", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"\\t\"", "+", "TileMatrix", ".", "COLUMN_TABLE_NAME", "+", "\": \"", "+", "tileM...
Text output from a Tile Matrix @param tileMatrix tile matrix @return text
[ "Text", "output", "from", "a", "Tile", "Matrix" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L168-L187
105,262
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java
GeoPackageTextOutput.textOutput
public String textOutput(BoundingBox boundingBox) { StringBuilder output = new StringBuilder(); output.append("\tMin Longitude: " + boundingBox.getMinLongitude()); output.append("\n\tMin Latitude: " + boundingBox.getMinLatitude()); output.append("\n\tMax Longitude: " + boundingBox.getMaxLongitude()); output.a...
java
public String textOutput(BoundingBox boundingBox) { StringBuilder output = new StringBuilder(); output.append("\tMin Longitude: " + boundingBox.getMinLongitude()); output.append("\n\tMin Latitude: " + boundingBox.getMinLatitude()); output.append("\n\tMax Longitude: " + boundingBox.getMaxLongitude()); output.a...
[ "public", "String", "textOutput", "(", "BoundingBox", "boundingBox", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "output", ".", "append", "(", "\"\\tMin Longitude: \"", "+", "boundingBox", ".", "getMinLongitude", "(", ")", ")...
Text output from a bounding box @param boundingBox bounding box @return text
[ "Text", "output", "from", "a", "bounding", "box" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/io/GeoPackageTextOutput.java#L196-L203
105,263
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java
CoverageDataTiffImage.writeTiff
public void writeTiff() { if (directory.getWriteRasters() != null) { TIFFImage tiffImage = new TIFFImage(); tiffImage.add(directory); try { imageBytes = TiffWriter.writeTiffToBytes(tiffImage); } catch (IOException e) { throw new GeoPackageException("Failed to write TIFF image", e); } } }
java
public void writeTiff() { if (directory.getWriteRasters() != null) { TIFFImage tiffImage = new TIFFImage(); tiffImage.add(directory); try { imageBytes = TiffWriter.writeTiffToBytes(tiffImage); } catch (IOException e) { throw new GeoPackageException("Failed to write TIFF image", e); } } }
[ "public", "void", "writeTiff", "(", ")", "{", "if", "(", "directory", ".", "getWriteRasters", "(", ")", "!=", "null", ")", "{", "TIFFImage", "tiffImage", "=", "new", "TIFFImage", "(", ")", ";", "tiffImage", ".", "add", "(", "directory", ")", ";", "try"...
Write the TIFF file to the image bytes
[ "Write", "the", "TIFF", "file", "to", "the", "image", "bytes" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java#L126-L136
105,264
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java
CoverageDataTiffImage.getPixel
public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
java
public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
[ "public", "float", "getPixel", "(", "int", "x", ",", "int", "y", ")", "{", "float", "pixel", "=", "-", "1", ";", "if", "(", "rasters", "==", "null", ")", "{", "readPixels", "(", ")", ";", "}", "if", "(", "rasters", "!=", "null", ")", "{", "pixe...
Get the pixel at the coordinate @param x x coordinate @param y y coordinate @return pixel value
[ "Get", "the", "pixel", "at", "the", "coordinate" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiffImage.java#L147-L158
105,265
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/Styles.java
Styles.setStyle
public void setStyle(StyleRow styleRow, GeometryType geometryType) { if (geometryType != null) { if (styleRow != null) { styles.put(geometryType, styleRow); } else { styles.remove(geometryType); } } else { defaultStyle = styleRow; } }
java
public void setStyle(StyleRow styleRow, GeometryType geometryType) { if (geometryType != null) { if (styleRow != null) { styles.put(geometryType, styleRow); } else { styles.remove(geometryType); } } else { defaultStyle = styleRow; } }
[ "public", "void", "setStyle", "(", "StyleRow", "styleRow", ",", "GeometryType", "geometryType", ")", "{", "if", "(", "geometryType", "!=", "null", ")", "{", "if", "(", "styleRow", "!=", "null", ")", "{", "styles", ".", "put", "(", "geometryType", ",", "s...
Set the style for the geometry type @param styleRow style row @param geometryType geometry type
[ "Set", "the", "style", "for", "the", "geometry", "type" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/Styles.java#L47-L57
105,266
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/Styles.java
Styles.getStyle
public StyleRow getStyle(GeometryType geometryType) { StyleRow styleRow = null; if (geometryType != null && !styles.isEmpty()) { List<GeometryType> geometryTypes = GeometryUtils .parentHierarchy(geometryType); geometryTypes.add(0, geometryType); for (GeometryType type : geometryTypes) { styleRow...
java
public StyleRow getStyle(GeometryType geometryType) { StyleRow styleRow = null; if (geometryType != null && !styles.isEmpty()) { List<GeometryType> geometryTypes = GeometryUtils .parentHierarchy(geometryType); geometryTypes.add(0, geometryType); for (GeometryType type : geometryTypes) { styleRow...
[ "public", "StyleRow", "getStyle", "(", "GeometryType", "geometryType", ")", "{", "StyleRow", "styleRow", "=", "null", ";", "if", "(", "geometryType", "!=", "null", "&&", "!", "styles", ".", "isEmpty", "(", ")", ")", "{", "List", "<", "GeometryType", ">", ...
Get the style for the geometry type @param geometryType geometry type @return style
[ "Get", "the", "style", "for", "the", "geometry", "type" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/Styles.java#L93-L118
105,267
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/user/custom/UserCustomDao.java
UserCustomDao.count
protected int count(UserCustomResultSet resultSet) { int count = 0; try { count = resultSet.getCount(); } finally { resultSet.close(); } return count; }
java
protected int count(UserCustomResultSet resultSet) { int count = 0; try { count = resultSet.getCount(); } finally { resultSet.close(); } return count; }
[ "protected", "int", "count", "(", "UserCustomResultSet", "resultSet", ")", "{", "int", "count", "=", "0", ";", "try", "{", "count", "=", "resultSet", ".", "getCount", "(", ")", ";", "}", "finally", "{", "resultSet", ".", "close", "(", ")", ";", "}", ...
Get the count of the result set and close it @param resultSet result set @return count
[ "Get", "the", "count", "of", "the", "result", "set", "and", "close", "it" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/user/custom/UserCustomDao.java#L107-L115
105,268
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/user/custom/UserCustomDao.java
UserCustomDao.readTable
public static UserCustomDao readTable(String database, GeoPackageConnection connection, String tableName) { UserCustomConnection userDb = new UserCustomConnection(connection); UserCustomTable userCustomTable = UserCustomTableReader.readTable( userDb, tableName); UserCustomDao dao = new UserCustomDao(datab...
java
public static UserCustomDao readTable(String database, GeoPackageConnection connection, String tableName) { UserCustomConnection userDb = new UserCustomConnection(connection); UserCustomTable userCustomTable = UserCustomTableReader.readTable( userDb, tableName); UserCustomDao dao = new UserCustomDao(datab...
[ "public", "static", "UserCustomDao", "readTable", "(", "String", "database", ",", "GeoPackageConnection", "connection", ",", "String", "tableName", ")", "{", "UserCustomConnection", "userDb", "=", "new", "UserCustomConnection", "(", "connection", ")", ";", "UserCustom...
Read the database table and create a DAO @param database database name @param connection db connection @param tableName table name @return user custom DAO
[ "Read", "the", "database", "table", "and", "create", "a", "DAO" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/user/custom/UserCustomDao.java#L128-L138
105,269
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/manager/GeoPackageImpl.java
GeoPackageImpl.integrityCheck
private ResultSet integrityCheck(ResultSet resultSet) { try { if (resultSet.next()) { String value = resultSet.getString(1); if (value.equals("ok")) { resultSet.close(); resultSet = null; } } } catch (SQLException e) { throw new GeoPackageException( "Integrity check failed on dat...
java
private ResultSet integrityCheck(ResultSet resultSet) { try { if (resultSet.next()) { String value = resultSet.getString(1); if (value.equals("ok")) { resultSet.close(); resultSet = null; } } } catch (SQLException e) { throw new GeoPackageException( "Integrity check failed on dat...
[ "private", "ResultSet", "integrityCheck", "(", "ResultSet", "resultSet", ")", "{", "try", "{", "if", "(", "resultSet", ".", "next", "(", ")", ")", "{", "String", "value", "=", "resultSet", ".", "getString", "(", "1", ")", ";", "if", "(", "value", ".", ...
Check the result set returned from the integrity check to see if things are "ok" @param resultSet @return null if ok, else the open cursor
[ "Check", "the", "result", "set", "returned", "from", "the", "integrity", "check", "to", "see", "if", "things", "are", "ok" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/manager/GeoPackageImpl.java#L415-L429
105,270
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java
UrlTileGenerator.setTileFormat
public void setTileFormat(TileFormatType tileFormat) { if (tileFormat == null) { tileFormat = TileFormatType.STANDARD; } else { switch (tileFormat) { case STANDARD: case TMS: this.tileFormat = tileFormat; break; default: throw new GeoPackageException( "Unsupported Tile Format Type f...
java
public void setTileFormat(TileFormatType tileFormat) { if (tileFormat == null) { tileFormat = TileFormatType.STANDARD; } else { switch (tileFormat) { case STANDARD: case TMS: this.tileFormat = tileFormat; break; default: throw new GeoPackageException( "Unsupported Tile Format Type f...
[ "public", "void", "setTileFormat", "(", "TileFormatType", "tileFormat", ")", "{", "if", "(", "tileFormat", "==", "null", ")", "{", "tileFormat", "=", "TileFormatType", ".", "STANDARD", ";", "}", "else", "{", "switch", "(", "tileFormat", ")", "{", "case", "...
Set the tile format @param tileFormat tile format
[ "Set", "the", "tile", "format" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java#L169-L184
105,271
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java
UrlTileGenerator.replaceXYZ
private String replaceXYZ(String url, int z, long x, long y) { url = url.replaceAll(Z_VARIABLE, String.valueOf(z)); url = url.replaceAll(X_VARIABLE, String.valueOf(x)); url = url.replaceAll(Y_VARIABLE, String.valueOf(y)); return url; }
java
private String replaceXYZ(String url, int z, long x, long y) { url = url.replaceAll(Z_VARIABLE, String.valueOf(z)); url = url.replaceAll(X_VARIABLE, String.valueOf(x)); url = url.replaceAll(Y_VARIABLE, String.valueOf(y)); return url; }
[ "private", "String", "replaceXYZ", "(", "String", "url", ",", "int", "z", ",", "long", "x", ",", "long", "y", ")", "{", "url", "=", "url", ".", "replaceAll", "(", "Z_VARIABLE", ",", "String", ".", "valueOf", "(", "z", ")", ")", ";", "url", "=", "...
Replace x, y, and z in the url @param url @param z @param x @param y @return
[ "Replace", "x", "y", "and", "z", "in", "the", "url" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java#L228-L234
105,272
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java
UrlTileGenerator.replaceBoundingBox
private String replaceBoundingBox(String url, BoundingBox boundingBox) { url = url.replaceAll(MIN_LAT_VARIABLE, String.valueOf(boundingBox.getMinLatitude())); url = url.replaceAll(MAX_LAT_VARIABLE, String.valueOf(boundingBox.getMaxLatitude())); url = url.replaceAll(MIN_LON_VARIABLE, String.valueOf(bo...
java
private String replaceBoundingBox(String url, BoundingBox boundingBox) { url = url.replaceAll(MIN_LAT_VARIABLE, String.valueOf(boundingBox.getMinLatitude())); url = url.replaceAll(MAX_LAT_VARIABLE, String.valueOf(boundingBox.getMaxLatitude())); url = url.replaceAll(MIN_LON_VARIABLE, String.valueOf(bo...
[ "private", "String", "replaceBoundingBox", "(", "String", "url", ",", "BoundingBox", "boundingBox", ")", "{", "url", "=", "url", ".", "replaceAll", "(", "MIN_LAT_VARIABLE", ",", "String", ".", "valueOf", "(", "boundingBox", ".", "getMinLatitude", "(", ")", ")"...
Replace the url parts with the bounding box @param url @param boundingBox @return
[ "Replace", "the", "url", "parts", "with", "the", "bounding", "box" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java#L276-L288
105,273
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java
UrlTileGenerator.downloadTile
private byte[] downloadTile(String zoomUrl, URL url, int z, long x, long y) { byte[] bytes = null; HttpURLConnection connection = null; try { connection = (HttpURLConnection) url.openConnection(); connection.connect(); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConn...
java
private byte[] downloadTile(String zoomUrl, URL url, int z, long x, long y) { byte[] bytes = null; HttpURLConnection connection = null; try { connection = (HttpURLConnection) url.openConnection(); connection.connect(); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConn...
[ "private", "byte", "[", "]", "downloadTile", "(", "String", "zoomUrl", ",", "URL", "url", ",", "int", "z", ",", "long", "x", ",", "long", "y", ")", "{", "byte", "[", "]", "bytes", "=", "null", ";", "HttpURLConnection", "connection", "=", "null", ";",...
Download the tile from the URL @param zoomUrl @param url @param z @param x @param y @return tile bytes
[ "Download", "the", "tile", "from", "the", "URL" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java#L369-L410
105,274
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.drawFeature
private boolean drawFeature(int zoom, BoundingBox boundingBox, BoundingBox expandedBoundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, FeatureRow row) { boolean drawn = false; try { GeoPackageGeometryData geomData = row.getGeometry(); if (geomData != null) { Geometry geometry...
java
private boolean drawFeature(int zoom, BoundingBox boundingBox, BoundingBox expandedBoundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, FeatureRow row) { boolean drawn = false; try { GeoPackageGeometryData geomData = row.getGeometry(); if (geomData != null) { Geometry geometry...
[ "private", "boolean", "drawFeature", "(", "int", "zoom", ",", "BoundingBox", "boundingBox", ",", "BoundingBox", "expandedBoundingBox", ",", "ProjectionTransform", "transform", ",", "FeatureTileGraphics", "graphics", ",", "FeatureRow", "row", ")", "{", "boolean", "draw...
Draw the feature @param zoom zoom level @param boundingBox bounding box @param expandedBoundingBox expanded bounding box @param transform projection transform @param graphics graphics to draw on @param row feature row @return true if at least one feature was drawn
[ "Draw", "the", "feature" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L290-L324
105,275
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.drawLineString
private boolean drawLineString(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, LineString lineString, FeatureStyle featureStyle) { Path2D path = getPath(simplifyTolerance, boundingBox, transform, lineString); return drawLine(graphics, path...
java
private boolean drawLineString(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, LineString lineString, FeatureStyle featureStyle) { Path2D path = getPath(simplifyTolerance, boundingBox, transform, lineString); return drawLine(graphics, path...
[ "private", "boolean", "drawLineString", "(", "double", "simplifyTolerance", ",", "BoundingBox", "boundingBox", ",", "ProjectionTransform", "transform", ",", "FeatureTileGraphics", "graphics", ",", "LineString", "lineString", ",", "FeatureStyle", "featureStyle", ")", "{", ...
Draw a LineString @param simplifyTolerance simplify tolerance in meters @param boundingBox bounding box @param transform projection transform @param graphics feature tile graphics @param lineString line string @param featureStyle feature style @return true if drawn
[ "Draw", "a", "LineString" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L455-L462
105,276
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.drawPolygon
private boolean drawPolygon(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, Polygon polygon, FeatureStyle featureStyle) { Area polygonArea = getArea(simplifyTolerance, boundingBox, transform, polygon); return drawPolygon(graphics, polygonA...
java
private boolean drawPolygon(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, FeatureTileGraphics graphics, Polygon polygon, FeatureStyle featureStyle) { Area polygonArea = getArea(simplifyTolerance, boundingBox, transform, polygon); return drawPolygon(graphics, polygonA...
[ "private", "boolean", "drawPolygon", "(", "double", "simplifyTolerance", ",", "BoundingBox", "boundingBox", ",", "ProjectionTransform", "transform", ",", "FeatureTileGraphics", "graphics", ",", "Polygon", "polygon", ",", "FeatureStyle", "featureStyle", ")", "{", "Area",...
Draw a Polygon @param simplifyTolerance simplify tolerance in meters @param boundingBox bounding box @param transform projection transform @param graphics feature tile graphics @param polygon polygon @param featureStyle feature style @return true if drawn
[ "Draw", "a", "Polygon" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L481-L488
105,277
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.getPath
private Path2D getPath(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, LineString lineString) { Path2D path = null; // Try to simplify the number of points in the LineString List<Point> lineStringPoints = simplifyPoints(simplifyTolerance, lineString.getPoints()); for ...
java
private Path2D getPath(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, LineString lineString) { Path2D path = null; // Try to simplify the number of points in the LineString List<Point> lineStringPoints = simplifyPoints(simplifyTolerance, lineString.getPoints()); for ...
[ "private", "Path2D", "getPath", "(", "double", "simplifyTolerance", ",", "BoundingBox", "boundingBox", ",", "ProjectionTransform", "transform", ",", "LineString", "lineString", ")", "{", "Path2D", "path", "=", "null", ";", "// Try to simplify the number of points in the L...
Get the path of the line string @param simplifyTolerance simplify tolerance in meters @param boundingBox @param transform @param lineString
[ "Get", "the", "path", "of", "the", "line", "string" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L499-L527
105,278
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.drawLine
private boolean drawLine(FeatureTileGraphics graphics, Path2D line, FeatureStyle featureStyle) { Graphics2D lineGraphics = graphics.getLineGraphics(); Paint paint = getLinePaint(featureStyle); lineGraphics.setColor(paint.getColor()); lineGraphics.setStroke(paint.getStroke()); boolean drawn = lineGraphic...
java
private boolean drawLine(FeatureTileGraphics graphics, Path2D line, FeatureStyle featureStyle) { Graphics2D lineGraphics = graphics.getLineGraphics(); Paint paint = getLinePaint(featureStyle); lineGraphics.setColor(paint.getColor()); lineGraphics.setStroke(paint.getStroke()); boolean drawn = lineGraphic...
[ "private", "boolean", "drawLine", "(", "FeatureTileGraphics", "graphics", ",", "Path2D", "line", ",", "FeatureStyle", "featureStyle", ")", "{", "Graphics2D", "lineGraphics", "=", "graphics", ".", "getLineGraphics", "(", ")", ";", "Paint", "paint", "=", "getLinePai...
Draw the line @param graphics feature tile graphics @param line line path @param featureStyle feature style @return true if drawn
[ "Draw", "the", "line" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L540-L556
105,279
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.getArea
private Area getArea(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, Polygon polygon) { Area area = null; for (LineString ring : polygon.getRings()) { Path2D path = getPath(simplifyTolerance, boundingBox, transform, ring); Area ringArea = new Area(path); if (ar...
java
private Area getArea(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, Polygon polygon) { Area area = null; for (LineString ring : polygon.getRings()) { Path2D path = getPath(simplifyTolerance, boundingBox, transform, ring); Area ringArea = new Area(path); if (ar...
[ "private", "Area", "getArea", "(", "double", "simplifyTolerance", ",", "BoundingBox", "boundingBox", ",", "ProjectionTransform", "transform", ",", "Polygon", "polygon", ")", "{", "Area", "area", "=", "null", ";", "for", "(", "LineString", "ring", ":", "polygon",...
Get the area of the polygon @param simplifyTolerance simplify tolerance in meters @param boundingBox @param transform @param lineString
[ "Get", "the", "area", "of", "the", "polygon" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L567-L587
105,280
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
DefaultFeatureTiles.drawPolygon
private boolean drawPolygon(FeatureTileGraphics graphics, Area polygon, FeatureStyle featureStyle) { Graphics2D polygonGraphics = graphics.getPolygonGraphics(); Paint fillPaint = getPolygonFillPaint(featureStyle); if (fillPaint != null) { polygonGraphics.setColor(fillPaint.getColor()); polygonGraphics...
java
private boolean drawPolygon(FeatureTileGraphics graphics, Area polygon, FeatureStyle featureStyle) { Graphics2D polygonGraphics = graphics.getPolygonGraphics(); Paint fillPaint = getPolygonFillPaint(featureStyle); if (fillPaint != null) { polygonGraphics.setColor(fillPaint.getColor()); polygonGraphics...
[ "private", "boolean", "drawPolygon", "(", "FeatureTileGraphics", "graphics", ",", "Area", "polygon", ",", "FeatureStyle", "featureStyle", ")", "{", "Graphics2D", "polygonGraphics", "=", "graphics", ".", "getPolygonGraphics", "(", ")", ";", "Paint", "fillPaint", "=",...
Draw the polygon @param graphics feature tile graphics @param polygon polygon area @param featureStyle feature style @return true if drawn
[ "Draw", "the", "polygon" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java#L600-L624
105,281
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
RTreeIndexTableDao.getFeatureRow
public FeatureRow getFeatureRow(UserCustomResultSet resultSet) { RTreeIndexTableRow row = getRow(resultSet); return getFeatureRow(row); }
java
public FeatureRow getFeatureRow(UserCustomResultSet resultSet) { RTreeIndexTableRow row = getRow(resultSet); return getFeatureRow(row); }
[ "public", "FeatureRow", "getFeatureRow", "(", "UserCustomResultSet", "resultSet", ")", "{", "RTreeIndexTableRow", "row", "=", "getRow", "(", "resultSet", ")", ";", "return", "getFeatureRow", "(", "row", ")", ";", "}" ]
Get the feature row from the RTree Index Table row @param resultSet result set @return feature row
[ "Get", "the", "feature", "row", "from", "the", "RTree", "Index", "Table", "row" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java#L183-L186
105,282
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
RTreeIndexTableDao.query
public UserCustomResultSet query(BoundingBox boundingBox, Projection projection) { BoundingBox featureBoundingBox = projectBoundingBox(boundingBox, projection); return query(featureBoundingBox); }
java
public UserCustomResultSet query(BoundingBox boundingBox, Projection projection) { BoundingBox featureBoundingBox = projectBoundingBox(boundingBox, projection); return query(featureBoundingBox); }
[ "public", "UserCustomResultSet", "query", "(", "BoundingBox", "boundingBox", ",", "Projection", "projection", ")", "{", "BoundingBox", "featureBoundingBox", "=", "projectBoundingBox", "(", "boundingBox", ",", "projection", ")", ";", "return", "query", "(", "featureBou...
Query for rows within the bounding box in the provided projection @param boundingBox bounding box @param projection projection @return results
[ "Query", "for", "rows", "within", "the", "bounding", "box", "in", "the", "provided", "projection" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java#L267-L272
105,283
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
RTreeIndexTableDao.query
public UserCustomResultSet query(GeometryEnvelope envelope) { return query(envelope.getMinX(), envelope.getMinY(), envelope.getMaxX(), envelope.getMaxY()); }
java
public UserCustomResultSet query(GeometryEnvelope envelope) { return query(envelope.getMinX(), envelope.getMinY(), envelope.getMaxX(), envelope.getMaxY()); }
[ "public", "UserCustomResultSet", "query", "(", "GeometryEnvelope", "envelope", ")", "{", "return", "query", "(", "envelope", ".", "getMinX", "(", ")", ",", "envelope", ".", "getMinY", "(", ")", ",", "envelope", ".", "getMaxX", "(", ")", ",", "envelope", "....
Query for rows within the geometry envelope @param envelope geometry envelope @return results
[ "Query", "for", "rows", "within", "the", "geometry", "envelope" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java#L307-L310
105,284
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
RTreeIndexTableDao.query
public UserCustomResultSet query(double minX, double minY, double maxX, double maxY) { validateRTree(); String where = buildWhere(minX, minY, maxX, maxY); String[] whereArgs = buildWhereArgs(minX, minY, maxX, maxY); return query(where, whereArgs); }
java
public UserCustomResultSet query(double minX, double minY, double maxX, double maxY) { validateRTree(); String where = buildWhere(minX, minY, maxX, maxY); String[] whereArgs = buildWhereArgs(minX, minY, maxX, maxY); return query(where, whereArgs); }
[ "public", "UserCustomResultSet", "query", "(", "double", "minX", ",", "double", "minY", ",", "double", "maxX", ",", "double", "maxY", ")", "{", "validateRTree", "(", ")", ";", "String", "where", "=", "buildWhere", "(", "minX", ",", "minY", ",", "maxX", "...
Query for rows within the bounds @param minX min x @param minY min y @param maxX max x @param maxY max y @return results
[ "Query", "for", "rows", "within", "the", "bounds" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java#L337-L343
105,285
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
RTreeIndexTableDao.count
public long count(double minX, double minY, double maxX, double maxY) { validateRTree(); String where = buildWhere(minX, minY, maxX, maxY); String[] whereArgs = buildWhereArgs(minX, minY, maxX, maxY); return count(where, whereArgs); }
java
public long count(double minX, double minY, double maxX, double maxY) { validateRTree(); String where = buildWhere(minX, minY, maxX, maxY); String[] whereArgs = buildWhereArgs(minX, minY, maxX, maxY); return count(where, whereArgs); }
[ "public", "long", "count", "(", "double", "minX", ",", "double", "minY", ",", "double", "maxX", ",", "double", "maxY", ")", "{", "validateRTree", "(", ")", ";", "String", "where", "=", "buildWhere", "(", "minX", ",", "minY", ",", "maxX", ",", "maxY", ...
Count the rows within the bounds @param minX min x @param minY min y @param maxX max x @param maxY max y @return count
[ "Count", "the", "rows", "within", "the", "bounds" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java#L358-L363
105,286
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java
MediaRow.setData
public void setData(BufferedImage image, String imageFormat) throws IOException { setData(image, imageFormat, null); }
java
public void setData(BufferedImage image, String imageFormat) throws IOException { setData(image, imageFormat, null); }
[ "public", "void", "setData", "(", "BufferedImage", "image", ",", "String", "imageFormat", ")", "throws", "IOException", "{", "setData", "(", "image", ",", "imageFormat", ",", "null", ")", ";", "}" ]
Set the data from an image @param image image @param imageFormat image format @throws IOException upon failure @since 3.2.0
[ "Set", "the", "data", "from", "an", "image" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java#L144-L147
105,287
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java
MediaRow.setData
public void setData(BufferedImage image, String imageFormat, Float quality) throws IOException { setData(ImageUtils.writeImageToBytes(image, imageFormat, quality)); }
java
public void setData(BufferedImage image, String imageFormat, Float quality) throws IOException { setData(ImageUtils.writeImageToBytes(image, imageFormat, quality)); }
[ "public", "void", "setData", "(", "BufferedImage", "image", ",", "String", "imageFormat", ",", "Float", "quality", ")", "throws", "IOException", "{", "setData", "(", "ImageUtils", ".", "writeImageToBytes", "(", "image", ",", "imageFormat", ",", "quality", ")", ...
Set the data from an image with optional quality @param image image @param imageFormat image format @param quality null or quality between 0.0 and 1.0 @throws IOException upon failure @since 3.2.0
[ "Set", "the", "data", "from", "an", "image", "with", "optional", "quality" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java#L162-L165
105,288
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/user/TileDao.java
TileDao.queryForTilesInColumn
public TileResultSet queryForTilesInColumn(long column, long zoomLevel) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TILE_COLUMN, column); fieldValues.put(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel); return queryForFieldValues(fieldValues); }
java
public TileResultSet queryForTilesInColumn(long column, long zoomLevel) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TILE_COLUMN, column); fieldValues.put(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel); return queryForFieldValues(fieldValues); }
[ "public", "TileResultSet", "queryForTilesInColumn", "(", "long", "column", ",", "long", "zoomLevel", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "fieldValues", ...
Query for Tiles at a zoom level and column @param column column @param zoomLevel zoom level @return tile result set
[ "Query", "for", "Tiles", "at", "a", "zoom", "level", "and", "column" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/user/TileDao.java#L324-L331
105,289
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/user/TileDao.java
TileDao.queryForTilesInRow
public TileResultSet queryForTilesInRow(long row, long zoomLevel) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TILE_ROW, row); fieldValues.put(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel); return queryForFieldValues(fieldValues); }
java
public TileResultSet queryForTilesInRow(long row, long zoomLevel) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TILE_ROW, row); fieldValues.put(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel); return queryForFieldValues(fieldValues); }
[ "public", "TileResultSet", "queryForTilesInRow", "(", "long", "row", ",", "long", "zoomLevel", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "fieldValues", ".", ...
Query for Tiles at a zoom level and row @param row row @param zoomLevel zoom level @return tile result set
[ "Query", "for", "Tiles", "at", "a", "zoom", "level", "and", "row" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/user/TileDao.java#L342-L349
105,290
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/user/TileDao.java
TileDao.queryByTileGrid
public TileResultSet queryByTileGrid(TileGrid tileGrid, long zoomLevel, String orderBy) { TileResultSet tileCursor = null; if (tileGrid != null) { StringBuilder where = new StringBuilder(); where.append(buildWhere(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel)); where.append(" AND "); where.append(buil...
java
public TileResultSet queryByTileGrid(TileGrid tileGrid, long zoomLevel, String orderBy) { TileResultSet tileCursor = null; if (tileGrid != null) { StringBuilder where = new StringBuilder(); where.append(buildWhere(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel)); where.append(" AND "); where.append(buil...
[ "public", "TileResultSet", "queryByTileGrid", "(", "TileGrid", "tileGrid", ",", "long", "zoomLevel", ",", "String", "orderBy", ")", "{", "TileResultSet", "tileCursor", "=", "null", ";", "if", "(", "tileGrid", "!=", "null", ")", "{", "StringBuilder", "where", "...
Query by tile grid and zoom level @param tileGrid tile grid @param zoomLevel zoom level @param orderBy order by @return cursor from query or null if the zoom level tile ranges do not overlap the bounding box @since 1.2.1
[ "Query", "by", "tile", "grid", "and", "zoom", "level" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/user/TileDao.java#L501-L536
105,291
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/IconCache.java
IconCache.put
public BufferedImage put(IconRow iconRow, BufferedImage image) { return put(iconRow.getId(), image); }
java
public BufferedImage put(IconRow iconRow, BufferedImage image) { return put(iconRow.getId(), image); }
[ "public", "BufferedImage", "put", "(", "IconRow", "iconRow", ",", "BufferedImage", "image", ")", "{", "return", "put", "(", "iconRow", ".", "getId", "(", ")", ",", "image", ")", ";", "}" ]
Cache the icon image for the icon row @param iconRow icon row @param image icon image @return previous cached icon image or null
[ "Cache", "the", "icon", "image", "for", "the", "icon", "row" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/IconCache.java#L94-L96
105,292
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/IconCache.java
IconCache.createIcon
public static BufferedImage createIcon(IconRow icon, float scale, IconCache iconCache) { BufferedImage iconImage = null; if (icon != null) { if (iconCache != null) { iconImage = iconCache.get(icon.getId()); } if (iconImage == null) { try { iconImage = icon.getDataImage(); } catch (...
java
public static BufferedImage createIcon(IconRow icon, float scale, IconCache iconCache) { BufferedImage iconImage = null; if (icon != null) { if (iconCache != null) { iconImage = iconCache.get(icon.getId()); } if (iconImage == null) { try { iconImage = icon.getDataImage(); } catch (...
[ "public", "static", "BufferedImage", "createIcon", "(", "IconRow", "icon", ",", "float", "scale", ",", "IconCache", "iconCache", ")", "{", "BufferedImage", "iconImage", "=", "null", ";", "if", "(", "icon", "!=", "null", ")", "{", "if", "(", "iconCache", "!...
Create or retrieve from cache an icon image for the icon row @param icon icon row @param scale scale factor @param iconCache icon cache @return icon image
[ "Create", "or", "retrieve", "from", "cache", "an", "icon", "image", "for", "the", "icon", "row" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/IconCache.java#L233-L305
105,293
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/index/FeatureTableIndex.java
FeatureTableIndex.indexRows
private int indexRows(TableIndex tableIndex, FeatureResultSet resultSet) { int count = -1; try { while ((progress == null || progress.isActive()) && resultSet.moveToNext()) { if (count < 0) { count++; } try { FeatureRow row = resultSet.getRow(); boolean indexed = index(tableInde...
java
private int indexRows(TableIndex tableIndex, FeatureResultSet resultSet) { int count = -1; try { while ((progress == null || progress.isActive()) && resultSet.moveToNext()) { if (count < 0) { count++; } try { FeatureRow row = resultSet.getRow(); boolean indexed = index(tableInde...
[ "private", "int", "indexRows", "(", "TableIndex", "tableIndex", ",", "FeatureResultSet", "resultSet", ")", "{", "int", "count", "=", "-", "1", ";", "try", "{", "while", "(", "(", "progress", "==", "null", "||", "progress", ".", "isActive", "(", ")", ")",...
Index the feature rows in the cursor @param tableIndex table index @param resultSet feature result @return count, -1 if no results or canceled
[ "Index", "the", "feature", "rows", "in", "the", "cursor" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/index/FeatureTableIndex.java#L160-L191
105,294
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java
RelatedTablesExtension.getUserDao
public UserCustomDao getUserDao(String tableName) { return UserCustomDao.readTable(getGeoPackage().getName(), connection, tableName); }
java
public UserCustomDao getUserDao(String tableName) { return UserCustomDao.readTable(getGeoPackage().getName(), connection, tableName); }
[ "public", "UserCustomDao", "getUserDao", "(", "String", "tableName", ")", "{", "return", "UserCustomDao", ".", "readTable", "(", "getGeoPackage", "(", ")", ".", "getName", "(", ")", ",", "connection", ",", "tableName", ")", ";", "}" ]
Get a User Custom DAO from a table name @param tableName table name @return user custom dao
[ "Get", "a", "User", "Custom", "DAO", "from", "a", "table", "name" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java#L66-L69
105,295
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java
RelatedTablesExtension.getMediaDao
public MediaDao getMediaDao(String tableName) { MediaDao mediaDao = new MediaDao(getUserDao(tableName)); setContents(mediaDao.getTable()); return mediaDao; }
java
public MediaDao getMediaDao(String tableName) { MediaDao mediaDao = new MediaDao(getUserDao(tableName)); setContents(mediaDao.getTable()); return mediaDao; }
[ "public", "MediaDao", "getMediaDao", "(", "String", "tableName", ")", "{", "MediaDao", "mediaDao", "=", "new", "MediaDao", "(", "getUserDao", "(", "tableName", ")", ")", ";", "setContents", "(", "mediaDao", ".", "getTable", "(", ")", ")", ";", "return", "m...
Get a related media table DAO @param tableName media table name @return media DAO
[ "Get", "a", "related", "media", "table", "DAO" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java#L122-L126
105,296
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java
RelatedTablesExtension.getMappingsForBase
public List<Long> getMappingsForBase(String tableName, long baseId) { List<Long> relatedIds = new ArrayList<>(); UserMappingDao userMappingDao = getMappingDao(tableName); UserCustomResultSet resultSet = userMappingDao.queryByBaseId(baseId); try { while (resultSet.moveToNext()) { UserMappingRow row = us...
java
public List<Long> getMappingsForBase(String tableName, long baseId) { List<Long> relatedIds = new ArrayList<>(); UserMappingDao userMappingDao = getMappingDao(tableName); UserCustomResultSet resultSet = userMappingDao.queryByBaseId(baseId); try { while (resultSet.moveToNext()) { UserMappingRow row = us...
[ "public", "List", "<", "Long", ">", "getMappingsForBase", "(", "String", "tableName", ",", "long", "baseId", ")", "{", "List", "<", "Long", ">", "relatedIds", "=", "new", "ArrayList", "<>", "(", ")", ";", "UserMappingDao", "userMappingDao", "=", "getMappingD...
Get the related id mappings for the base id @param tableName mapping table name @param baseId base id @return IDs representing the matching related IDs
[ "Get", "the", "related", "id", "mappings", "for", "the", "base", "id" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java#L190-L206
105,297
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java
RelatedTablesExtension.getMappingsForRelated
public List<Long> getMappingsForRelated(String tableName, long relatedId) { List<Long> baseIds = new ArrayList<>(); UserMappingDao userMappingDao = getMappingDao(tableName); UserCustomResultSet resultSet = userMappingDao .queryByRelatedId(relatedId); try { while (resultSet.moveToNext()) { UserMappi...
java
public List<Long> getMappingsForRelated(String tableName, long relatedId) { List<Long> baseIds = new ArrayList<>(); UserMappingDao userMappingDao = getMappingDao(tableName); UserCustomResultSet resultSet = userMappingDao .queryByRelatedId(relatedId); try { while (resultSet.moveToNext()) { UserMappi...
[ "public", "List", "<", "Long", ">", "getMappingsForRelated", "(", "String", "tableName", ",", "long", "relatedId", ")", "{", "List", "<", "Long", ">", "baseIds", "=", "new", "ArrayList", "<>", "(", ")", ";", "UserMappingDao", "userMappingDao", "=", "getMappi...
Get the base id mappings for the related id @param tableName mapping table name @param relatedId related id @return IDs representing the matching base IDs
[ "Get", "the", "base", "id", "mappings", "for", "the", "related", "id" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java#L232-L249
105,298
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java
RelatedTablesExtension.hasMapping
public boolean hasMapping(String tableName, long baseId, long relatedId) { UserMappingDao userMappingDao = getMappingDao(tableName); return userMappingDao.countByIds(baseId, relatedId) > 0; }
java
public boolean hasMapping(String tableName, long baseId, long relatedId) { UserMappingDao userMappingDao = getMappingDao(tableName); return userMappingDao.countByIds(baseId, relatedId) > 0; }
[ "public", "boolean", "hasMapping", "(", "String", "tableName", ",", "long", "baseId", ",", "long", "relatedId", ")", "{", "UserMappingDao", "userMappingDao", "=", "getMappingDao", "(", "tableName", ")", ";", "return", "userMappingDao", ".", "countByIds", "(", "b...
Determine if the base id and related id mapping exists @param tableName mapping table name @param baseId base id @param relatedId related id @return true if mapping exists @since 3.2.0
[ "Determine", "if", "the", "base", "id", "and", "related", "id", "mapping", "exists" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java#L263-L266
105,299
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/db/SQLUtils.java
SQLUtils.execSQL
public static void execSQL(Connection connection, String sql) { Statement statement = null; try { statement = connection.createStatement(); statement.execute(sql); } catch (SQLException e) { throw new GeoPackageException("Failed to execute SQL statement: " + sql, e); } finally { closeStatement(...
java
public static void execSQL(Connection connection, String sql) { Statement statement = null; try { statement = connection.createStatement(); statement.execute(sql); } catch (SQLException e) { throw new GeoPackageException("Failed to execute SQL statement: " + sql, e); } finally { closeStatement(...
[ "public", "static", "void", "execSQL", "(", "Connection", "connection", ",", "String", "sql", ")", "{", "Statement", "statement", "=", "null", ";", "try", "{", "statement", "=", "connection", ".", "createStatement", "(", ")", ";", "statement", ".", "execute"...
Execute the SQL @param connection connection @param sql sql statement
[ "Execute", "the", "SQL" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/db/SQLUtils.java#L36-L48