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
6,200
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/BaseExtension.java
BaseExtension.get
protected Extensions get(String extensionName, String tableName, String columnName) { Extensions extension = null; try { if (extensionsDao.isTableExists()) { extension = extensionsDao.queryByExtension(extensionName, tableName, columnName); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for '" + extensionName + "' extension for GeoPackage: " + geoPackage.getName() + ", Table Name: " + tableName + ", Column Name: " + columnName, e); } return extension; }
java
protected Extensions get(String extensionName, String tableName, String columnName) { Extensions extension = null; try { if (extensionsDao.isTableExists()) { extension = extensionsDao.queryByExtension(extensionName, tableName, columnName); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for '" + extensionName + "' extension for GeoPackage: " + geoPackage.getName() + ", Table Name: " + tableName + ", Column Name: " + columnName, e); } return extension; }
[ "protected", "Extensions", "get", "(", "String", "extensionName", ",", "String", "tableName", ",", "String", "columnName", ")", "{", "Extensions", "extension", "=", "null", ";", "try", "{", "if", "(", "extensionsDao", ".", "isTableExists", "(", ")", ")", "{", "extension", "=", "extensionsDao", ".", "queryByExtension", "(", "extensionName", ",", "tableName", ",", "columnName", ")", ";", "}", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to query for '\"", "+", "extensionName", "+", "\"' extension for GeoPackage: \"", "+", "geoPackage", ".", "getName", "(", ")", "+", "\", Table Name: \"", "+", "tableName", "+", "\", Column Name: \"", "+", "columnName", ",", "e", ")", ";", "}", "return", "extension", ";", "}" ]
Get the extension for the name, table name, and column name @param extensionName extension name @param tableName table name @param columnName column name @return extension
[ "Get", "the", "extension", "for", "the", "name", "table", "name", "and", "column", "name" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/BaseExtension.java#L112-L128
6,201
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/BaseExtension.java
BaseExtension.getExtensions
protected List<Extensions> getExtensions(String extensionName, String tableName) { List<Extensions> extensions = null; try { if (extensionsDao.isTableExists()) { extensions = extensionsDao.queryByExtension(extensionName, tableName); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for '" + extensionName + "' extension for GeoPackage: " + geoPackage.getName() + ", Table Name: " + tableName, e); } return extensions; }
java
protected List<Extensions> getExtensions(String extensionName, String tableName) { List<Extensions> extensions = null; try { if (extensionsDao.isTableExists()) { extensions = extensionsDao.queryByExtension(extensionName, tableName); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for '" + extensionName + "' extension for GeoPackage: " + geoPackage.getName() + ", Table Name: " + tableName, e); } return extensions; }
[ "protected", "List", "<", "Extensions", ">", "getExtensions", "(", "String", "extensionName", ",", "String", "tableName", ")", "{", "List", "<", "Extensions", ">", "extensions", "=", "null", ";", "try", "{", "if", "(", "extensionsDao", ".", "isTableExists", "(", ")", ")", "{", "extensions", "=", "extensionsDao", ".", "queryByExtension", "(", "extensionName", ",", "tableName", ")", ";", "}", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to query for '\"", "+", "extensionName", "+", "\"' extension for GeoPackage: \"", "+", "geoPackage", ".", "getName", "(", ")", "+", "\", Table Name: \"", "+", "tableName", ",", "e", ")", ";", "}", "return", "extensions", ";", "}" ]
Get the extension for the name and table name @param extensionName extension name @param tableName table name @return extension
[ "Get", "the", "extension", "for", "the", "name", "and", "table", "name" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/BaseExtension.java#L156-L171
6,202
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.overlap
public static BoundingBox overlap(BoundingBox boundingBox, BoundingBox boundingBox2, boolean allowEmpty) { return boundingBox.overlap(boundingBox2, allowEmpty); }
java
public static BoundingBox overlap(BoundingBox boundingBox, BoundingBox boundingBox2, boolean allowEmpty) { return boundingBox.overlap(boundingBox2, allowEmpty); }
[ "public", "static", "BoundingBox", "overlap", "(", "BoundingBox", "boundingBox", ",", "BoundingBox", "boundingBox2", ",", "boolean", "allowEmpty", ")", "{", "return", "boundingBox", ".", "overlap", "(", "boundingBox2", ",", "allowEmpty", ")", ";", "}" ]
Get the overlapping bounding box between the two bounding boxes @param boundingBox bounding box @param boundingBox2 bounding box 2 @param allowEmpty allow empty latitude and/or longitude ranges when determining overlap @return bounding box @since 2.0.0
[ "Get", "the", "overlapping", "bounding", "box", "between", "the", "two", "bounding", "boxes" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L52-L55
6,203
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getXPixel
public static float getXPixel(long width, BoundingBox boundingBox, double longitude) { double boxWidth = boundingBox.getMaxLongitude() - boundingBox.getMinLongitude(); double offset = longitude - boundingBox.getMinLongitude(); double percentage = offset / boxWidth; float pixel = (float) (percentage * width); return pixel; }
java
public static float getXPixel(long width, BoundingBox boundingBox, double longitude) { double boxWidth = boundingBox.getMaxLongitude() - boundingBox.getMinLongitude(); double offset = longitude - boundingBox.getMinLongitude(); double percentage = offset / boxWidth; float pixel = (float) (percentage * width); return pixel; }
[ "public", "static", "float", "getXPixel", "(", "long", "width", ",", "BoundingBox", "boundingBox", ",", "double", "longitude", ")", "{", "double", "boxWidth", "=", "boundingBox", ".", "getMaxLongitude", "(", ")", "-", "boundingBox", ".", "getMinLongitude", "(", ")", ";", "double", "offset", "=", "longitude", "-", "boundingBox", ".", "getMinLongitude", "(", ")", ";", "double", "percentage", "=", "offset", "/", "boxWidth", ";", "float", "pixel", "=", "(", "float", ")", "(", "percentage", "*", "width", ")", ";", "return", "pixel", ";", "}" ]
Get the X pixel for where the longitude fits into the bounding box @param width width @param boundingBox bounding box @param longitude longitude @return x pixel
[ "Get", "the", "X", "pixel", "for", "where", "the", "longitude", "fits", "into", "the", "bounding", "box" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L185-L195
6,204
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getLongitudeFromPixel
public static double getLongitudeFromPixel(long width, BoundingBox boundingBox, float pixel) { return getLongitudeFromPixel(width, boundingBox, boundingBox, pixel); }
java
public static double getLongitudeFromPixel(long width, BoundingBox boundingBox, float pixel) { return getLongitudeFromPixel(width, boundingBox, boundingBox, pixel); }
[ "public", "static", "double", "getLongitudeFromPixel", "(", "long", "width", ",", "BoundingBox", "boundingBox", ",", "float", "pixel", ")", "{", "return", "getLongitudeFromPixel", "(", "width", ",", "boundingBox", ",", "boundingBox", ",", "pixel", ")", ";", "}" ]
Get the longitude from the pixel location, bounding box, and image width @param width width @param boundingBox bounding box @param pixel pixel @return longitude
[ "Get", "the", "longitude", "from", "the", "pixel", "location", "bounding", "box", "and", "image", "width" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L208-L211
6,205
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getYPixel
public static float getYPixel(long height, BoundingBox boundingBox, double latitude) { double boxHeight = boundingBox.getMaxLatitude() - boundingBox.getMinLatitude(); double offset = boundingBox.getMaxLatitude() - latitude; double percentage = offset / boxHeight; float pixel = (float) (percentage * height); return pixel; }
java
public static float getYPixel(long height, BoundingBox boundingBox, double latitude) { double boxHeight = boundingBox.getMaxLatitude() - boundingBox.getMinLatitude(); double offset = boundingBox.getMaxLatitude() - latitude; double percentage = offset / boxHeight; float pixel = (float) (percentage * height); return pixel; }
[ "public", "static", "float", "getYPixel", "(", "long", "height", ",", "BoundingBox", "boundingBox", ",", "double", "latitude", ")", "{", "double", "boxHeight", "=", "boundingBox", ".", "getMaxLatitude", "(", ")", "-", "boundingBox", ".", "getMinLatitude", "(", ")", ";", "double", "offset", "=", "boundingBox", ".", "getMaxLatitude", "(", ")", "-", "latitude", ";", "double", "percentage", "=", "offset", "/", "boxHeight", ";", "float", "pixel", "=", "(", "float", ")", "(", "percentage", "*", "height", ")", ";", "return", "pixel", ";", "}" ]
Get the Y pixel for where the latitude fits into the bounding box @param height height @param boundingBox bounding box @param latitude latitude @return y pixel
[ "Get", "the", "Y", "pixel", "for", "where", "the", "latitude", "fits", "into", "the", "bounding", "box" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L251-L261
6,206
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getLatitudeFromPixel
public static double getLatitudeFromPixel(long height, BoundingBox boundingBox, float pixel) { return getLatitudeFromPixel(height, boundingBox, boundingBox, pixel); }
java
public static double getLatitudeFromPixel(long height, BoundingBox boundingBox, float pixel) { return getLatitudeFromPixel(height, boundingBox, boundingBox, pixel); }
[ "public", "static", "double", "getLatitudeFromPixel", "(", "long", "height", ",", "BoundingBox", "boundingBox", ",", "float", "pixel", ")", "{", "return", "getLatitudeFromPixel", "(", "height", ",", "boundingBox", ",", "boundingBox", ",", "pixel", ")", ";", "}" ]
Get the latitude from the pixel location, bounding box, and image height @param height height @param boundingBox bounding box @param pixel pixel @return latitude
[ "Get", "the", "latitude", "from", "the", "pixel", "location", "bounding", "box", "and", "image", "height" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L274-L277
6,207
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(int x, int y, int zoom) { int tilesPerSide = tilesPerSide(zoom); double tileWidthDegrees = tileWidthDegrees(tilesPerSide); double tileHeightDegrees = tileHeightDegrees(tilesPerSide); double minLon = -180.0 + (x * tileWidthDegrees); double maxLon = minLon + tileWidthDegrees; double maxLat = 90.0 - (y * tileHeightDegrees); double minLat = maxLat - tileHeightDegrees; BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
java
public static BoundingBox getBoundingBox(int x, int y, int zoom) { int tilesPerSide = tilesPerSide(zoom); double tileWidthDegrees = tileWidthDegrees(tilesPerSide); double tileHeightDegrees = tileHeightDegrees(tilesPerSide); double minLon = -180.0 + (x * tileWidthDegrees); double maxLon = minLon + tileWidthDegrees; double maxLat = 90.0 - (y * tileHeightDegrees); double minLat = maxLat - tileHeightDegrees; BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "int", "tilesPerSide", "=", "tilesPerSide", "(", "zoom", ")", ";", "double", "tileWidthDegrees", "=", "tileWidthDegrees", "(", "tilesPerSide", ")", ";", "double", "tileHeightDegrees", "=", "tileHeightDegrees", "(", "tilesPerSide", ")", ";", "double", "minLon", "=", "-", "180.0", "+", "(", "x", "*", "tileWidthDegrees", ")", ";", "double", "maxLon", "=", "minLon", "+", "tileWidthDegrees", ";", "double", "maxLat", "=", "90.0", "-", "(", "y", "*", "tileHeightDegrees", ")", ";", "double", "minLat", "=", "maxLat", "-", "tileHeightDegrees", ";", "BoundingBox", "box", "=", "new", "BoundingBox", "(", "minLon", ",", "minLat", ",", "maxLon", ",", "maxLat", ")", ";", "return", "box", ";", "}" ]
Get the tile bounding box from the Google Maps API tile coordinates and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return bounding box
[ "Get", "the", "tile", "bounding", "box", "from", "the", "Google", "Maps", "API", "tile", "coordinates", "and", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L318-L333
6,208
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getWebMercatorBoundingBox
public static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (x * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((x + 1) * tileSize); double minLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - ((y + 1) * tileSize); double maxLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - (y * tileSize); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
java
public static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (x * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((x + 1) * tileSize); double minLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - ((y + 1) * tileSize); double maxLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - (y * tileSize); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
[ "public", "static", "BoundingBox", "getWebMercatorBoundingBox", "(", "long", "x", ",", "long", "y", ",", "int", "zoom", ")", "{", "double", "tileSize", "=", "tileSizeWithZoom", "(", "zoom", ")", ";", "double", "minLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", ")", "+", "(", "x", "*", "tileSize", ")", ";", "double", "maxLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", ")", "+", "(", "(", "x", "+", "1", ")", "*", "tileSize", ")", ";", "double", "minLat", "=", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", "-", "(", "(", "y", "+", "1", ")", "*", "tileSize", ")", ";", "double", "maxLat", "=", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", "-", "(", "y", "*", "tileSize", ")", ";", "BoundingBox", "box", "=", "new", "BoundingBox", "(", "minLon", ",", "minLat", ",", "maxLon", ",", "maxLat", ")", ";", "return", "box", ";", "}" ]
Get the Web Mercator tile bounding box from the Google Maps API tile coordinates and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return bounding box
[ "Get", "the", "Web", "Mercator", "tile", "bounding", "box", "from", "the", "Google", "Maps", "API", "tile", "coordinates", "and", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L347-L363
6,209
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getWebMercatorBoundingBox
public static BoundingBox getWebMercatorBoundingBox(TileGrid tileGrid, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (tileGrid.getMinX() * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((tileGrid.getMaxX() + 1) * tileSize); double minLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - ((tileGrid.getMaxY() + 1) * tileSize); double maxLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - (tileGrid.getMinY() * tileSize); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
java
public static BoundingBox getWebMercatorBoundingBox(TileGrid tileGrid, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (tileGrid.getMinX() * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((tileGrid.getMaxX() + 1) * tileSize); double minLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - ((tileGrid.getMaxY() + 1) * tileSize); double maxLat = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH - (tileGrid.getMinY() * tileSize); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
[ "public", "static", "BoundingBox", "getWebMercatorBoundingBox", "(", "TileGrid", "tileGrid", ",", "int", "zoom", ")", "{", "double", "tileSize", "=", "tileSizeWithZoom", "(", "zoom", ")", ";", "double", "minLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", ")", "+", "(", "tileGrid", ".", "getMinX", "(", ")", "*", "tileSize", ")", ";", "double", "maxLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", ")", "+", "(", "(", "tileGrid", ".", "getMaxX", "(", ")", "+", "1", ")", "*", "tileSize", ")", ";", "double", "minLat", "=", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", "-", "(", "(", "tileGrid", ".", "getMaxY", "(", ")", "+", "1", ")", "*", "tileSize", ")", ";", "double", "maxLat", "=", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", "-", "(", "tileGrid", ".", "getMinY", "(", ")", "*", "tileSize", ")", ";", "BoundingBox", "box", "=", "new", "BoundingBox", "(", "minLon", ",", "minLat", ",", "maxLon", ",", "maxLat", ")", ";", "return", "box", ";", "}" ]
Get the Web Mercator tile bounding box from the Google Maps API tile grid and zoom level @param tileGrid tile grid @param zoom zoom level @return bounding box
[ "Get", "the", "Web", "Mercator", "tile", "bounding", "box", "from", "the", "Google", "Maps", "API", "tile", "grid", "and", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L375-L392
6,210
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getProjectedBoundingBox
public static BoundingBox getProjectedBoundingBox(Projection projection, TileGrid tileGrid, int zoom) { BoundingBox boundingBox = getWebMercatorBoundingBox(tileGrid, zoom); if (projection != null) { ProjectionTransform transform = webMercator .getTransformation(projection); boundingBox = boundingBox.transform(transform); } return boundingBox; }
java
public static BoundingBox getProjectedBoundingBox(Projection projection, TileGrid tileGrid, int zoom) { BoundingBox boundingBox = getWebMercatorBoundingBox(tileGrid, zoom); if (projection != null) { ProjectionTransform transform = webMercator .getTransformation(projection); boundingBox = boundingBox.transform(transform); } return boundingBox; }
[ "public", "static", "BoundingBox", "getProjectedBoundingBox", "(", "Projection", "projection", ",", "TileGrid", "tileGrid", ",", "int", "zoom", ")", "{", "BoundingBox", "boundingBox", "=", "getWebMercatorBoundingBox", "(", "tileGrid", ",", "zoom", ")", ";", "if", "(", "projection", "!=", "null", ")", "{", "ProjectionTransform", "transform", "=", "webMercator", ".", "getTransformation", "(", "projection", ")", ";", "boundingBox", "=", "boundingBox", ".", "transform", "(", "transform", ")", ";", "}", "return", "boundingBox", ";", "}" ]
Get the Projected tile bounding box from the Google Maps API tile grid and zoom level @param projection projection @param tileGrid tile grid @param zoom zoom level @return bounding box
[ "Get", "the", "Projected", "tile", "bounding", "box", "from", "the", "Google", "Maps", "API", "tile", "grid", "and", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L532-L544
6,211
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileGridFromWGS84
public static TileGrid getTileGridFromWGS84(Point point, int zoom) { Projection projection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); return getTileGrid(point, zoom, projection); }
java
public static TileGrid getTileGridFromWGS84(Point point, int zoom) { Projection projection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); return getTileGrid(point, zoom, projection); }
[ "public", "static", "TileGrid", "getTileGridFromWGS84", "(", "Point", "point", ",", "int", "zoom", ")", "{", "Projection", "projection", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ".", "EPSG_WORLD_GEODETIC_SYSTEM", ")", ";", "return", "getTileGrid", "(", "point", ",", "zoom", ",", "projection", ")", ";", "}" ]
Get the tile grid for the location specified as WGS84 @param point point @param zoom zoom level @return tile grid @since 1.1.0
[ "Get", "the", "tile", "grid", "for", "the", "location", "specified", "as", "WGS84" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L556-L560
6,212
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileGrid
public static TileGrid getTileGrid(Point point, int zoom, Projection projection) { ProjectionTransform toWebMercator = projection .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); Point webMercatorPoint = toWebMercator.transform(point); BoundingBox boundingBox = new BoundingBox(webMercatorPoint.getX(), webMercatorPoint.getY(), webMercatorPoint.getX(), webMercatorPoint.getY()); return getTileGrid(boundingBox, zoom); }
java
public static TileGrid getTileGrid(Point point, int zoom, Projection projection) { ProjectionTransform toWebMercator = projection .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); Point webMercatorPoint = toWebMercator.transform(point); BoundingBox boundingBox = new BoundingBox(webMercatorPoint.getX(), webMercatorPoint.getY(), webMercatorPoint.getX(), webMercatorPoint.getY()); return getTileGrid(boundingBox, zoom); }
[ "public", "static", "TileGrid", "getTileGrid", "(", "Point", "point", ",", "int", "zoom", ",", "Projection", "projection", ")", "{", "ProjectionTransform", "toWebMercator", "=", "projection", ".", "getTransformation", "(", "ProjectionConstants", ".", "EPSG_WEB_MERCATOR", ")", ";", "Point", "webMercatorPoint", "=", "toWebMercator", ".", "transform", "(", "point", ")", ";", "BoundingBox", "boundingBox", "=", "new", "BoundingBox", "(", "webMercatorPoint", ".", "getX", "(", ")", ",", "webMercatorPoint", ".", "getY", "(", ")", ",", "webMercatorPoint", ".", "getX", "(", ")", ",", "webMercatorPoint", ".", "getY", "(", ")", ")", ";", "return", "getTileGrid", "(", "boundingBox", ",", "zoom", ")", ";", "}" ]
Get the tile grid for the location specified as the projection @param point point @param zoom zoom level @param projection projection @return tile grid @since 1.1.0
[ "Get", "the", "tile", "grid", "for", "the", "location", "specified", "as", "the", "projection" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L574-L583
6,213
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.toWebMercator
public static BoundingBox toWebMercator(BoundingBox boundingBox) { double minLatitude = Math.max(boundingBox.getMinLatitude(), ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); double maxLatitude = Math.min(boundingBox.getMaxLatitude(), ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); Point lowerLeftPoint = new Point(false, false, boundingBox.getMinLongitude(), minLatitude); Point upperRightPoint = new Point(false, false, boundingBox.getMaxLongitude(), maxLatitude); ProjectionTransform toWebMercator = ProjectionFactory.getProjection( ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM) .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); lowerLeftPoint = toWebMercator.transform(lowerLeftPoint); upperRightPoint = toWebMercator.transform(upperRightPoint); BoundingBox mercatorBox = new BoundingBox(lowerLeftPoint.getX(), lowerLeftPoint.getY(), upperRightPoint.getX(), upperRightPoint.getY()); return mercatorBox; }
java
public static BoundingBox toWebMercator(BoundingBox boundingBox) { double minLatitude = Math.max(boundingBox.getMinLatitude(), ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); double maxLatitude = Math.min(boundingBox.getMaxLatitude(), ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); Point lowerLeftPoint = new Point(false, false, boundingBox.getMinLongitude(), minLatitude); Point upperRightPoint = new Point(false, false, boundingBox.getMaxLongitude(), maxLatitude); ProjectionTransform toWebMercator = ProjectionFactory.getProjection( ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM) .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR); lowerLeftPoint = toWebMercator.transform(lowerLeftPoint); upperRightPoint = toWebMercator.transform(upperRightPoint); BoundingBox mercatorBox = new BoundingBox(lowerLeftPoint.getX(), lowerLeftPoint.getY(), upperRightPoint.getX(), upperRightPoint.getY()); return mercatorBox; }
[ "public", "static", "BoundingBox", "toWebMercator", "(", "BoundingBox", "boundingBox", ")", "{", "double", "minLatitude", "=", "Math", ".", "max", "(", "boundingBox", ".", "getMinLatitude", "(", ")", ",", "ProjectionConstants", ".", "WEB_MERCATOR_MIN_LAT_RANGE", ")", ";", "double", "maxLatitude", "=", "Math", ".", "min", "(", "boundingBox", ".", "getMaxLatitude", "(", ")", ",", "ProjectionConstants", ".", "WEB_MERCATOR_MAX_LAT_RANGE", ")", ";", "Point", "lowerLeftPoint", "=", "new", "Point", "(", "false", ",", "false", ",", "boundingBox", ".", "getMinLongitude", "(", ")", ",", "minLatitude", ")", ";", "Point", "upperRightPoint", "=", "new", "Point", "(", "false", ",", "false", ",", "boundingBox", ".", "getMaxLongitude", "(", ")", ",", "maxLatitude", ")", ";", "ProjectionTransform", "toWebMercator", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ".", "EPSG_WORLD_GEODETIC_SYSTEM", ")", ".", "getTransformation", "(", "ProjectionConstants", ".", "EPSG_WEB_MERCATOR", ")", ";", "lowerLeftPoint", "=", "toWebMercator", ".", "transform", "(", "lowerLeftPoint", ")", ";", "upperRightPoint", "=", "toWebMercator", ".", "transform", "(", "upperRightPoint", ")", ";", "BoundingBox", "mercatorBox", "=", "new", "BoundingBox", "(", "lowerLeftPoint", ".", "getX", "(", ")", ",", "lowerLeftPoint", ".", "getY", "(", ")", ",", "upperRightPoint", ".", "getX", "(", ")", ",", "upperRightPoint", ".", "getY", "(", ")", ")", ";", "return", "mercatorBox", ";", "}" ]
Convert the bounding box coordinates to a new web mercator bounding box @param boundingBox bounding box @return bounding box
[ "Convert", "the", "bounding", "box", "coordinates", "to", "a", "new", "web", "mercator", "bounding", "box" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L624-L647
6,214
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.zoomLevelOfTileSize
public static double zoomLevelOfTileSize(double tileSize) { double tilesPerSide = (2 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) / tileSize; double zoom = Math.log(tilesPerSide) / Math.log(2); return zoom; }
java
public static double zoomLevelOfTileSize(double tileSize) { double tilesPerSide = (2 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) / tileSize; double zoom = Math.log(tilesPerSide) / Math.log(2); return zoom; }
[ "public", "static", "double", "zoomLevelOfTileSize", "(", "double", "tileSize", ")", "{", "double", "tilesPerSide", "=", "(", "2", "*", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", ")", "/", "tileSize", ";", "double", "zoom", "=", "Math", ".", "log", "(", "tilesPerSide", ")", "/", "Math", ".", "log", "(", "2", ")", ";", "return", "zoom", ";", "}" ]
Get the zoom level from the tile size in meters @param tileSize tile size in meters @return zoom level @since 1.2.0
[ "Get", "the", "zoom", "level", "from", "the", "tile", "size", "in", "meters" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L669-L674
6,215
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getYAsOppositeTileFormat
public static int getYAsOppositeTileFormat(int zoom, int y) { int tilesPerSide = tilesPerSide(zoom); int oppositeY = tilesPerSide - y - 1; return oppositeY; }
java
public static int getYAsOppositeTileFormat(int zoom, int y) { int tilesPerSide = tilesPerSide(zoom); int oppositeY = tilesPerSide - y - 1; return oppositeY; }
[ "public", "static", "int", "getYAsOppositeTileFormat", "(", "int", "zoom", ",", "int", "y", ")", "{", "int", "tilesPerSide", "=", "tilesPerSide", "(", "zoom", ")", ";", "int", "oppositeY", "=", "tilesPerSide", "-", "y", "-", "1", ";", "return", "oppositeY", ";", "}" ]
Get the standard y tile location as TMS or a TMS y location as standard @param zoom zoom level @param y y coordinate @return opposite tile format y
[ "Get", "the", "standard", "y", "tile", "location", "as", "TMS", "or", "a", "TMS", "y", "location", "as", "standard" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L768-L772
6,216
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileGrid
public static TileGrid getTileGrid(BoundingBox totalBox, long matrixWidth, long matrixHeight, BoundingBox boundingBox) { long minColumn = getTileColumn(totalBox, matrixWidth, boundingBox.getMinLongitude()); long maxColumn = getTileColumn(totalBox, matrixWidth, boundingBox.getMaxLongitude()); if (minColumn < matrixWidth && maxColumn >= 0) { if (minColumn < 0) { minColumn = 0; } if (maxColumn >= matrixWidth) { maxColumn = matrixWidth - 1; } } long maxRow = getTileRow(totalBox, matrixHeight, boundingBox.getMinLatitude()); long minRow = getTileRow(totalBox, matrixHeight, boundingBox.getMaxLatitude()); if (minRow < matrixHeight && maxRow >= 0) { if (minRow < 0) { minRow = 0; } if (maxRow >= matrixHeight) { maxRow = matrixHeight - 1; } } TileGrid tileGrid = new TileGrid(minColumn, minRow, maxColumn, maxRow); return tileGrid; }
java
public static TileGrid getTileGrid(BoundingBox totalBox, long matrixWidth, long matrixHeight, BoundingBox boundingBox) { long minColumn = getTileColumn(totalBox, matrixWidth, boundingBox.getMinLongitude()); long maxColumn = getTileColumn(totalBox, matrixWidth, boundingBox.getMaxLongitude()); if (minColumn < matrixWidth && maxColumn >= 0) { if (minColumn < 0) { minColumn = 0; } if (maxColumn >= matrixWidth) { maxColumn = matrixWidth - 1; } } long maxRow = getTileRow(totalBox, matrixHeight, boundingBox.getMinLatitude()); long minRow = getTileRow(totalBox, matrixHeight, boundingBox.getMaxLatitude()); if (minRow < matrixHeight && maxRow >= 0) { if (minRow < 0) { minRow = 0; } if (maxRow >= matrixHeight) { maxRow = matrixHeight - 1; } } TileGrid tileGrid = new TileGrid(minColumn, minRow, maxColumn, maxRow); return tileGrid; }
[ "public", "static", "TileGrid", "getTileGrid", "(", "BoundingBox", "totalBox", ",", "long", "matrixWidth", ",", "long", "matrixHeight", ",", "BoundingBox", "boundingBox", ")", "{", "long", "minColumn", "=", "getTileColumn", "(", "totalBox", ",", "matrixWidth", ",", "boundingBox", ".", "getMinLongitude", "(", ")", ")", ";", "long", "maxColumn", "=", "getTileColumn", "(", "totalBox", ",", "matrixWidth", ",", "boundingBox", ".", "getMaxLongitude", "(", ")", ")", ";", "if", "(", "minColumn", "<", "matrixWidth", "&&", "maxColumn", ">=", "0", ")", "{", "if", "(", "minColumn", "<", "0", ")", "{", "minColumn", "=", "0", ";", "}", "if", "(", "maxColumn", ">=", "matrixWidth", ")", "{", "maxColumn", "=", "matrixWidth", "-", "1", ";", "}", "}", "long", "maxRow", "=", "getTileRow", "(", "totalBox", ",", "matrixHeight", ",", "boundingBox", ".", "getMinLatitude", "(", ")", ")", ";", "long", "minRow", "=", "getTileRow", "(", "totalBox", ",", "matrixHeight", ",", "boundingBox", ".", "getMaxLatitude", "(", ")", ")", ";", "if", "(", "minRow", "<", "matrixHeight", "&&", "maxRow", ">=", "0", ")", "{", "if", "(", "minRow", "<", "0", ")", "{", "minRow", "=", "0", ";", "}", "if", "(", "maxRow", ">=", "matrixHeight", ")", "{", "maxRow", "=", "matrixHeight", "-", "1", ";", "}", "}", "TileGrid", "tileGrid", "=", "new", "TileGrid", "(", "minColumn", ",", "minRow", ",", "maxColumn", ",", "maxRow", ")", ";", "return", "tileGrid", ";", "}" ]
Get the tile grid @param totalBox total bounding box @param matrixWidth matrix width @param matrixHeight matrix height @param boundingBox bounding box @return tile grid
[ "Get", "the", "tile", "grid" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L798-L832
6,217
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileColumn
public static long getTileColumn(BoundingBox totalBox, long matrixWidth, double longitude) { double minX = totalBox.getMinLongitude(); double maxX = totalBox.getMaxLongitude(); long tileId; if (longitude < minX) { tileId = -1; } else if (longitude >= maxX) { tileId = matrixWidth; } else { double matrixWidthMeters = totalBox.getMaxLongitude() - totalBox.getMinLongitude(); double tileWidth = matrixWidthMeters / matrixWidth; tileId = (long) ((longitude - minX) / tileWidth); } return tileId; }
java
public static long getTileColumn(BoundingBox totalBox, long matrixWidth, double longitude) { double minX = totalBox.getMinLongitude(); double maxX = totalBox.getMaxLongitude(); long tileId; if (longitude < minX) { tileId = -1; } else if (longitude >= maxX) { tileId = matrixWidth; } else { double matrixWidthMeters = totalBox.getMaxLongitude() - totalBox.getMinLongitude(); double tileWidth = matrixWidthMeters / matrixWidth; tileId = (long) ((longitude - minX) / tileWidth); } return tileId; }
[ "public", "static", "long", "getTileColumn", "(", "BoundingBox", "totalBox", ",", "long", "matrixWidth", ",", "double", "longitude", ")", "{", "double", "minX", "=", "totalBox", ".", "getMinLongitude", "(", ")", ";", "double", "maxX", "=", "totalBox", ".", "getMaxLongitude", "(", ")", ";", "long", "tileId", ";", "if", "(", "longitude", "<", "minX", ")", "{", "tileId", "=", "-", "1", ";", "}", "else", "if", "(", "longitude", ">=", "maxX", ")", "{", "tileId", "=", "matrixWidth", ";", "}", "else", "{", "double", "matrixWidthMeters", "=", "totalBox", ".", "getMaxLongitude", "(", ")", "-", "totalBox", ".", "getMinLongitude", "(", ")", ";", "double", "tileWidth", "=", "matrixWidthMeters", "/", "matrixWidth", ";", "tileId", "=", "(", "long", ")", "(", "(", "longitude", "-", "minX", ")", "/", "tileWidth", ")", ";", "}", "return", "tileId", ";", "}" ]
Get the tile column of the longitude in constant units @param totalBox total bounding box @param matrixWidth matrix width @param longitude in constant units @return tile column if in the range, -1 if before, {@link TileMatrix#getMatrixWidth()} if after
[ "Get", "the", "tile", "column", "of", "the", "longitude", "in", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L846-L865
6,218
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileRow
public static long getTileRow(BoundingBox totalBox, long matrixHeight, double latitude) { double minY = totalBox.getMinLatitude(); double maxY = totalBox.getMaxLatitude(); long tileId; if (latitude <= minY) { tileId = matrixHeight; } else if (latitude > maxY) { tileId = -1; } else { double matrixHeightMeters = totalBox.getMaxLatitude() - totalBox.getMinLatitude(); double tileHeight = matrixHeightMeters / matrixHeight; tileId = (long) ((maxY - latitude) / tileHeight); } return tileId; }
java
public static long getTileRow(BoundingBox totalBox, long matrixHeight, double latitude) { double minY = totalBox.getMinLatitude(); double maxY = totalBox.getMaxLatitude(); long tileId; if (latitude <= minY) { tileId = matrixHeight; } else if (latitude > maxY) { tileId = -1; } else { double matrixHeightMeters = totalBox.getMaxLatitude() - totalBox.getMinLatitude(); double tileHeight = matrixHeightMeters / matrixHeight; tileId = (long) ((maxY - latitude) / tileHeight); } return tileId; }
[ "public", "static", "long", "getTileRow", "(", "BoundingBox", "totalBox", ",", "long", "matrixHeight", ",", "double", "latitude", ")", "{", "double", "minY", "=", "totalBox", ".", "getMinLatitude", "(", ")", ";", "double", "maxY", "=", "totalBox", ".", "getMaxLatitude", "(", ")", ";", "long", "tileId", ";", "if", "(", "latitude", "<=", "minY", ")", "{", "tileId", "=", "matrixHeight", ";", "}", "else", "if", "(", "latitude", ">", "maxY", ")", "{", "tileId", "=", "-", "1", ";", "}", "else", "{", "double", "matrixHeightMeters", "=", "totalBox", ".", "getMaxLatitude", "(", ")", "-", "totalBox", ".", "getMinLatitude", "(", ")", ";", "double", "tileHeight", "=", "matrixHeightMeters", "/", "matrixHeight", ";", "tileId", "=", "(", "long", ")", "(", "(", "maxY", "-", "latitude", ")", "/", "tileHeight", ")", ";", "}", "return", "tileId", ";", "}" ]
Get the tile row of the latitude in constant units @param totalBox total bounding box @param matrixHeight matrix height @param latitude in constant units @return tile row if in the range, -1 if before, {@link TileMatrix#getMatrixHeight()} if after
[ "Get", "the", "tile", "row", "of", "the", "latitude", "in", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L879-L898
6,219
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, long tileColumn, long tileRow) { return getBoundingBox(totalBox, tileMatrix.getMatrixWidth(), tileMatrix.getMatrixHeight(), tileColumn, tileRow); }
java
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, long tileColumn, long tileRow) { return getBoundingBox(totalBox, tileMatrix.getMatrixWidth(), tileMatrix.getMatrixHeight(), tileColumn, tileRow); }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "BoundingBox", "totalBox", ",", "TileMatrix", "tileMatrix", ",", "long", "tileColumn", ",", "long", "tileRow", ")", "{", "return", "getBoundingBox", "(", "totalBox", ",", "tileMatrix", ".", "getMatrixWidth", "(", ")", ",", "tileMatrix", ".", "getMatrixHeight", "(", ")", ",", "tileColumn", ",", "tileRow", ")", ";", "}" ]
Get the bounding box of the tile column and row in the tile matrix using the total bounding box with constant units @param totalBox total bounding box @param tileMatrix tile matrix @param tileColumn tile column @param tileRow tile row @return bounding box @since 1.2.0
[ "Get", "the", "bounding", "box", "of", "the", "tile", "column", "and", "row", "in", "the", "tile", "matrix", "using", "the", "total", "bounding", "box", "with", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L915-L919
6,220
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, long tileColumn, long tileRow) { TileGrid tileGrid = new TileGrid(tileColumn, tileRow, tileColumn, tileRow); return getBoundingBox(totalBox, tileMatrixWidth, tileMatrixHeight, tileGrid); }
java
public static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, long tileColumn, long tileRow) { TileGrid tileGrid = new TileGrid(tileColumn, tileRow, tileColumn, tileRow); return getBoundingBox(totalBox, tileMatrixWidth, tileMatrixHeight, tileGrid); }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "BoundingBox", "totalBox", ",", "long", "tileMatrixWidth", ",", "long", "tileMatrixHeight", ",", "long", "tileColumn", ",", "long", "tileRow", ")", "{", "TileGrid", "tileGrid", "=", "new", "TileGrid", "(", "tileColumn", ",", "tileRow", ",", "tileColumn", ",", "tileRow", ")", ";", "return", "getBoundingBox", "(", "totalBox", ",", "tileMatrixWidth", ",", "tileMatrixHeight", ",", "tileGrid", ")", ";", "}" ]
Get the bounding box of the tile column and row in the tile width and height bounds using the total bounding box with constant units @param totalBox total bounding box @param tileMatrixWidth matrix width @param tileMatrixHeight matrix height @param tileColumn tile column @param tileRow tile row @return bounding box @since 1.2.0
[ "Get", "the", "bounding", "box", "of", "the", "tile", "column", "and", "row", "in", "the", "tile", "width", "and", "height", "bounds", "using", "the", "total", "bounding", "box", "with", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L938-L945
6,221
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, TileGrid tileGrid) { return getBoundingBox(totalBox, tileMatrix.getMatrixWidth(), tileMatrix.getMatrixHeight(), tileGrid); }
java
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, TileGrid tileGrid) { return getBoundingBox(totalBox, tileMatrix.getMatrixWidth(), tileMatrix.getMatrixHeight(), tileGrid); }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "BoundingBox", "totalBox", ",", "TileMatrix", "tileMatrix", ",", "TileGrid", "tileGrid", ")", "{", "return", "getBoundingBox", "(", "totalBox", ",", "tileMatrix", ".", "getMatrixWidth", "(", ")", ",", "tileMatrix", ".", "getMatrixHeight", "(", ")", ",", "tileGrid", ")", ";", "}" ]
Get the bounding box of the tile grid in the tile matrix using the total bounding box with constant units @param totalBox total bounding box @param tileMatrix tile matrix @param tileGrid tile grid @return bounding box @since 1.2.0
[ "Get", "the", "bounding", "box", "of", "the", "tile", "grid", "in", "the", "tile", "matrix", "using", "the", "total", "bounding", "box", "with", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L960-L964
6,222
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, TileGrid tileGrid) { // Get the tile width double matrixMinX = totalBox.getMinLongitude(); double matrixMaxX = totalBox.getMaxLongitude(); double matrixWidth = matrixMaxX - matrixMinX; double tileWidth = matrixWidth / tileMatrixWidth; // Find the longitude range double minLon = matrixMinX + (tileWidth * tileGrid.getMinX()); double maxLon = matrixMinX + (tileWidth * (tileGrid.getMaxX() + 1)); // Get the tile height double matrixMinY = totalBox.getMinLatitude(); double matrixMaxY = totalBox.getMaxLatitude(); double matrixHeight = matrixMaxY - matrixMinY; double tileHeight = matrixHeight / tileMatrixHeight; // Find the latitude range double maxLat = matrixMaxY - (tileHeight * tileGrid.getMinY()); double minLat = matrixMaxY - (tileHeight * (tileGrid.getMaxY() + 1)); BoundingBox boundingBox = new BoundingBox(minLon, minLat, maxLon, maxLat); return boundingBox; }
java
public static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, TileGrid tileGrid) { // Get the tile width double matrixMinX = totalBox.getMinLongitude(); double matrixMaxX = totalBox.getMaxLongitude(); double matrixWidth = matrixMaxX - matrixMinX; double tileWidth = matrixWidth / tileMatrixWidth; // Find the longitude range double minLon = matrixMinX + (tileWidth * tileGrid.getMinX()); double maxLon = matrixMinX + (tileWidth * (tileGrid.getMaxX() + 1)); // Get the tile height double matrixMinY = totalBox.getMinLatitude(); double matrixMaxY = totalBox.getMaxLatitude(); double matrixHeight = matrixMaxY - matrixMinY; double tileHeight = matrixHeight / tileMatrixHeight; // Find the latitude range double maxLat = matrixMaxY - (tileHeight * tileGrid.getMinY()); double minLat = matrixMaxY - (tileHeight * (tileGrid.getMaxY() + 1)); BoundingBox boundingBox = new BoundingBox(minLon, minLat, maxLon, maxLat); return boundingBox; }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "BoundingBox", "totalBox", ",", "long", "tileMatrixWidth", ",", "long", "tileMatrixHeight", ",", "TileGrid", "tileGrid", ")", "{", "// Get the tile width", "double", "matrixMinX", "=", "totalBox", ".", "getMinLongitude", "(", ")", ";", "double", "matrixMaxX", "=", "totalBox", ".", "getMaxLongitude", "(", ")", ";", "double", "matrixWidth", "=", "matrixMaxX", "-", "matrixMinX", ";", "double", "tileWidth", "=", "matrixWidth", "/", "tileMatrixWidth", ";", "// Find the longitude range", "double", "minLon", "=", "matrixMinX", "+", "(", "tileWidth", "*", "tileGrid", ".", "getMinX", "(", ")", ")", ";", "double", "maxLon", "=", "matrixMinX", "+", "(", "tileWidth", "*", "(", "tileGrid", ".", "getMaxX", "(", ")", "+", "1", ")", ")", ";", "// Get the tile height", "double", "matrixMinY", "=", "totalBox", ".", "getMinLatitude", "(", ")", ";", "double", "matrixMaxY", "=", "totalBox", ".", "getMaxLatitude", "(", ")", ";", "double", "matrixHeight", "=", "matrixMaxY", "-", "matrixMinY", ";", "double", "tileHeight", "=", "matrixHeight", "/", "tileMatrixHeight", ";", "// Find the latitude range", "double", "maxLat", "=", "matrixMaxY", "-", "(", "tileHeight", "*", "tileGrid", ".", "getMinY", "(", ")", ")", ";", "double", "minLat", "=", "matrixMaxY", "-", "(", "tileHeight", "*", "(", "tileGrid", ".", "getMaxY", "(", ")", "+", "1", ")", ")", ";", "BoundingBox", "boundingBox", "=", "new", "BoundingBox", "(", "minLon", ",", "minLat", ",", "maxLon", ",", "maxLat", ")", ";", "return", "boundingBox", ";", "}" ]
Get the bounding box of the tile grid in the tile width and height bounds using the total bounding box with constant units @param totalBox total bounding box @param tileMatrixWidth matrix width @param tileMatrixHeight matrix height @param tileGrid tile grid @return bounding box @since 1.2.0
[ "Get", "the", "bounding", "box", "of", "the", "tile", "grid", "in", "the", "tile", "width", "and", "height", "bounds", "using", "the", "total", "bounding", "box", "with", "constant", "units" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L981-L1008
6,223
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getZoomLevel
public static int getZoomLevel(BoundingBox webMercatorBoundingBox) { double worldLength = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH * 2; double longitudeDistance = webMercatorBoundingBox.getMaxLongitude() - webMercatorBoundingBox.getMinLongitude(); double latitudeDistance = webMercatorBoundingBox.getMaxLatitude() - webMercatorBoundingBox.getMinLatitude(); if (longitudeDistance <= 0) { longitudeDistance = Double.MIN_VALUE; } if (latitudeDistance <= 0) { latitudeDistance = Double.MIN_VALUE; } int widthTiles = (int) (worldLength / longitudeDistance); int heightTiles = (int) (worldLength / latitudeDistance); int tilesPerSide = Math.min(widthTiles, heightTiles); tilesPerSide = Math.max(tilesPerSide, 1); int zoom = zoomFromTilesPerSide(tilesPerSide); return zoom; }
java
public static int getZoomLevel(BoundingBox webMercatorBoundingBox) { double worldLength = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH * 2; double longitudeDistance = webMercatorBoundingBox.getMaxLongitude() - webMercatorBoundingBox.getMinLongitude(); double latitudeDistance = webMercatorBoundingBox.getMaxLatitude() - webMercatorBoundingBox.getMinLatitude(); if (longitudeDistance <= 0) { longitudeDistance = Double.MIN_VALUE; } if (latitudeDistance <= 0) { latitudeDistance = Double.MIN_VALUE; } int widthTiles = (int) (worldLength / longitudeDistance); int heightTiles = (int) (worldLength / latitudeDistance); int tilesPerSide = Math.min(widthTiles, heightTiles); tilesPerSide = Math.max(tilesPerSide, 1); int zoom = zoomFromTilesPerSide(tilesPerSide); return zoom; }
[ "public", "static", "int", "getZoomLevel", "(", "BoundingBox", "webMercatorBoundingBox", ")", "{", "double", "worldLength", "=", "ProjectionConstants", ".", "WEB_MERCATOR_HALF_WORLD_WIDTH", "*", "2", ";", "double", "longitudeDistance", "=", "webMercatorBoundingBox", ".", "getMaxLongitude", "(", ")", "-", "webMercatorBoundingBox", ".", "getMinLongitude", "(", ")", ";", "double", "latitudeDistance", "=", "webMercatorBoundingBox", ".", "getMaxLatitude", "(", ")", "-", "webMercatorBoundingBox", ".", "getMinLatitude", "(", ")", ";", "if", "(", "longitudeDistance", "<=", "0", ")", "{", "longitudeDistance", "=", "Double", ".", "MIN_VALUE", ";", "}", "if", "(", "latitudeDistance", "<=", "0", ")", "{", "latitudeDistance", "=", "Double", ".", "MIN_VALUE", ";", "}", "int", "widthTiles", "=", "(", "int", ")", "(", "worldLength", "/", "longitudeDistance", ")", ";", "int", "heightTiles", "=", "(", "int", ")", "(", "worldLength", "/", "latitudeDistance", ")", ";", "int", "tilesPerSide", "=", "Math", ".", "min", "(", "widthTiles", ",", "heightTiles", ")", ";", "tilesPerSide", "=", "Math", ".", "max", "(", "tilesPerSide", ",", "1", ")", ";", "int", "zoom", "=", "zoomFromTilesPerSide", "(", "tilesPerSide", ")", ";", "return", "zoom", ";", "}" ]
Get the zoom level of where the web mercator bounding box fits into the complete world @param webMercatorBoundingBox web mercator bounding box @return zoom level
[ "Get", "the", "zoom", "level", "of", "where", "the", "web", "mercator", "bounding", "box", "fits", "into", "the", "complete", "world" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1018-L1043
6,224
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getPixelXSize
public static double getPixelXSize(BoundingBox webMercatorBoundingBox, long matrixWidth, int tileWidth) { double pixelXSize = (webMercatorBoundingBox.getMaxLongitude() - webMercatorBoundingBox .getMinLongitude()) / matrixWidth / tileWidth; return pixelXSize; }
java
public static double getPixelXSize(BoundingBox webMercatorBoundingBox, long matrixWidth, int tileWidth) { double pixelXSize = (webMercatorBoundingBox.getMaxLongitude() - webMercatorBoundingBox .getMinLongitude()) / matrixWidth / tileWidth; return pixelXSize; }
[ "public", "static", "double", "getPixelXSize", "(", "BoundingBox", "webMercatorBoundingBox", ",", "long", "matrixWidth", ",", "int", "tileWidth", ")", "{", "double", "pixelXSize", "=", "(", "webMercatorBoundingBox", ".", "getMaxLongitude", "(", ")", "-", "webMercatorBoundingBox", ".", "getMinLongitude", "(", ")", ")", "/", "matrixWidth", "/", "tileWidth", ";", "return", "pixelXSize", ";", "}" ]
Get the pixel x size for the bounding box with matrix width and tile width @param webMercatorBoundingBox web mercator bounding box @param matrixWidth matrix width @param tileWidth tile width @return pixel x size
[ "Get", "the", "pixel", "x", "size", "for", "the", "bounding", "box", "with", "matrix", "width", "and", "tile", "width" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1057-L1062
6,225
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getPixelYSize
public static double getPixelYSize(BoundingBox webMercatorBoundingBox, long matrixHeight, int tileHeight) { double pixelYSize = (webMercatorBoundingBox.getMaxLatitude() - webMercatorBoundingBox .getMinLatitude()) / matrixHeight / tileHeight; return pixelYSize; }
java
public static double getPixelYSize(BoundingBox webMercatorBoundingBox, long matrixHeight, int tileHeight) { double pixelYSize = (webMercatorBoundingBox.getMaxLatitude() - webMercatorBoundingBox .getMinLatitude()) / matrixHeight / tileHeight; return pixelYSize; }
[ "public", "static", "double", "getPixelYSize", "(", "BoundingBox", "webMercatorBoundingBox", ",", "long", "matrixHeight", ",", "int", "tileHeight", ")", "{", "double", "pixelYSize", "=", "(", "webMercatorBoundingBox", ".", "getMaxLatitude", "(", ")", "-", "webMercatorBoundingBox", ".", "getMinLatitude", "(", ")", ")", "/", "matrixHeight", "/", "tileHeight", ";", "return", "pixelYSize", ";", "}" ]
Get the pixel y size for the bounding box with matrix height and tile height @param webMercatorBoundingBox web mercator bounding box @param matrixHeight matrix height @param tileHeight tile height @return pixel y size
[ "Get", "the", "pixel", "y", "size", "for", "the", "bounding", "box", "with", "matrix", "height", "and", "tile", "height" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1076-L1081
6,226
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.boundDegreesBoundingBoxWithWebMercatorLimits
public static BoundingBox boundDegreesBoundingBoxWithWebMercatorLimits( BoundingBox boundingBox) { BoundingBox bounded = new BoundingBox(boundingBox); if (bounded.getMinLatitude() < ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE) { bounded.setMinLatitude(ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); } if (bounded.getMaxLatitude() < ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE) { bounded.setMaxLatitude(ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); } if (bounded.getMaxLatitude() > ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE) { bounded.setMaxLatitude(ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); } if (bounded.getMinLatitude() > ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE) { bounded.setMinLatitude(ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); } return bounded; }
java
public static BoundingBox boundDegreesBoundingBoxWithWebMercatorLimits( BoundingBox boundingBox) { BoundingBox bounded = new BoundingBox(boundingBox); if (bounded.getMinLatitude() < ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE) { bounded.setMinLatitude(ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); } if (bounded.getMaxLatitude() < ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE) { bounded.setMaxLatitude(ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE); } if (bounded.getMaxLatitude() > ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE) { bounded.setMaxLatitude(ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); } if (bounded.getMinLatitude() > ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE) { bounded.setMinLatitude(ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE); } return bounded; }
[ "public", "static", "BoundingBox", "boundDegreesBoundingBoxWithWebMercatorLimits", "(", "BoundingBox", "boundingBox", ")", "{", "BoundingBox", "bounded", "=", "new", "BoundingBox", "(", "boundingBox", ")", ";", "if", "(", "bounded", ".", "getMinLatitude", "(", ")", "<", "ProjectionConstants", ".", "WEB_MERCATOR_MIN_LAT_RANGE", ")", "{", "bounded", ".", "setMinLatitude", "(", "ProjectionConstants", ".", "WEB_MERCATOR_MIN_LAT_RANGE", ")", ";", "}", "if", "(", "bounded", ".", "getMaxLatitude", "(", ")", "<", "ProjectionConstants", ".", "WEB_MERCATOR_MIN_LAT_RANGE", ")", "{", "bounded", ".", "setMaxLatitude", "(", "ProjectionConstants", ".", "WEB_MERCATOR_MIN_LAT_RANGE", ")", ";", "}", "if", "(", "bounded", ".", "getMaxLatitude", "(", ")", ">", "ProjectionConstants", ".", "WEB_MERCATOR_MAX_LAT_RANGE", ")", "{", "bounded", ".", "setMaxLatitude", "(", "ProjectionConstants", ".", "WEB_MERCATOR_MAX_LAT_RANGE", ")", ";", "}", "if", "(", "bounded", ".", "getMinLatitude", "(", ")", ">", "ProjectionConstants", ".", "WEB_MERCATOR_MAX_LAT_RANGE", ")", "{", "bounded", ".", "setMinLatitude", "(", "ProjectionConstants", ".", "WEB_MERCATOR_MAX_LAT_RANGE", ")", ";", "}", "return", "bounded", ";", "}" ]
Bound the upper and lower bounds of the degrees bounding box with web mercator limits @param boundingBox degrees bounding box @return bounding box @since 1.3.1
[ "Bound", "the", "upper", "and", "lower", "bounds", "of", "the", "degrees", "bounding", "box", "with", "web", "mercator", "limits" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1106-L1122
6,227
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getWGS84BoundingBox
public static BoundingBox getWGS84BoundingBox(TileGrid tileGrid, int zoom) { int tilesPerLat = tilesPerWGS84LatSide(zoom); int tilesPerLon = tilesPerWGS84LonSide(zoom); double tileSizeLat = tileSizeLatPerWGS84Side(tilesPerLat); double tileSizeLon = tileSizeLonPerWGS84Side(tilesPerLon); double minLon = (-1 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH) + (tileGrid.getMinX() * tileSizeLon); double maxLon = (-1 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH) + ((tileGrid.getMaxX() + 1) * tileSizeLon); double minLat = ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT - ((tileGrid.getMaxY() + 1) * tileSizeLat); double maxLat = ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT - (tileGrid.getMinY() * tileSizeLat); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
java
public static BoundingBox getWGS84BoundingBox(TileGrid tileGrid, int zoom) { int tilesPerLat = tilesPerWGS84LatSide(zoom); int tilesPerLon = tilesPerWGS84LonSide(zoom); double tileSizeLat = tileSizeLatPerWGS84Side(tilesPerLat); double tileSizeLon = tileSizeLonPerWGS84Side(tilesPerLon); double minLon = (-1 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH) + (tileGrid.getMinX() * tileSizeLon); double maxLon = (-1 * ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH) + ((tileGrid.getMaxX() + 1) * tileSizeLon); double minLat = ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT - ((tileGrid.getMaxY() + 1) * tileSizeLat); double maxLat = ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT - (tileGrid.getMinY() * tileSizeLat); BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat); return box; }
[ "public", "static", "BoundingBox", "getWGS84BoundingBox", "(", "TileGrid", "tileGrid", ",", "int", "zoom", ")", "{", "int", "tilesPerLat", "=", "tilesPerWGS84LatSide", "(", "zoom", ")", ";", "int", "tilesPerLon", "=", "tilesPerWGS84LonSide", "(", "zoom", ")", ";", "double", "tileSizeLat", "=", "tileSizeLatPerWGS84Side", "(", "tilesPerLat", ")", ";", "double", "tileSizeLon", "=", "tileSizeLonPerWGS84Side", "(", "tilesPerLon", ")", ";", "double", "minLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WGS84_HALF_WORLD_LON_WIDTH", ")", "+", "(", "tileGrid", ".", "getMinX", "(", ")", "*", "tileSizeLon", ")", ";", "double", "maxLon", "=", "(", "-", "1", "*", "ProjectionConstants", ".", "WGS84_HALF_WORLD_LON_WIDTH", ")", "+", "(", "(", "tileGrid", ".", "getMaxX", "(", ")", "+", "1", ")", "*", "tileSizeLon", ")", ";", "double", "minLat", "=", "ProjectionConstants", ".", "WGS84_HALF_WORLD_LAT_HEIGHT", "-", "(", "(", "tileGrid", ".", "getMaxY", "(", ")", "+", "1", ")", "*", "tileSizeLat", ")", ";", "double", "maxLat", "=", "ProjectionConstants", ".", "WGS84_HALF_WORLD_LAT_HEIGHT", "-", "(", "tileGrid", ".", "getMinY", "(", ")", "*", "tileSizeLat", ")", ";", "BoundingBox", "box", "=", "new", "BoundingBox", "(", "minLon", ",", "minLat", ",", "maxLon", ",", "maxLat", ")", ";", "return", "box", ";", "}" ]
Get the WGS84 tile bounding box from the tile grid and zoom level @param tileGrid tile grid @param zoom zoom @return wgs84 bounding box @since 1.2.0
[ "Get", "the", "WGS84", "tile", "bounding", "box", "from", "the", "tile", "grid", "and", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1177-L1197
6,228
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.tileGridZoom
public static TileGrid tileGridZoom(TileGrid tileGrid, int fromZoom, int toZoom) { TileGrid newTileGrid = null; int zoomChange = toZoom - fromZoom; if (zoomChange > 0) { newTileGrid = tileGridZoomIncrease(tileGrid, zoomChange); } else if (zoomChange < 0) { zoomChange = Math.abs(zoomChange); newTileGrid = tileGridZoomDecrease(tileGrid, zoomChange); } else { newTileGrid = tileGrid; } return newTileGrid; }
java
public static TileGrid tileGridZoom(TileGrid tileGrid, int fromZoom, int toZoom) { TileGrid newTileGrid = null; int zoomChange = toZoom - fromZoom; if (zoomChange > 0) { newTileGrid = tileGridZoomIncrease(tileGrid, zoomChange); } else if (zoomChange < 0) { zoomChange = Math.abs(zoomChange); newTileGrid = tileGridZoomDecrease(tileGrid, zoomChange); } else { newTileGrid = tileGrid; } return newTileGrid; }
[ "public", "static", "TileGrid", "tileGridZoom", "(", "TileGrid", "tileGrid", ",", "int", "fromZoom", ",", "int", "toZoom", ")", "{", "TileGrid", "newTileGrid", "=", "null", ";", "int", "zoomChange", "=", "toZoom", "-", "fromZoom", ";", "if", "(", "zoomChange", ">", "0", ")", "{", "newTileGrid", "=", "tileGridZoomIncrease", "(", "tileGrid", ",", "zoomChange", ")", ";", "}", "else", "if", "(", "zoomChange", "<", "0", ")", "{", "zoomChange", "=", "Math", ".", "abs", "(", "zoomChange", ")", ";", "newTileGrid", "=", "tileGridZoomDecrease", "(", "tileGrid", ",", "zoomChange", ")", ";", "}", "else", "{", "newTileGrid", "=", "tileGrid", ";", "}", "return", "newTileGrid", ";", "}" ]
Get the tile grid starting from the tile grid and current zoom to the new zoom level @param tileGrid current tile grid @param fromZoom current zoom level @param toZoom new zoom level @return tile grid at new zoom level @since 2.0.1
[ "Get", "the", "tile", "grid", "starting", "from", "the", "tile", "grid", "and", "current", "zoom", "to", "the", "new", "zoom", "level" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1266-L1282
6,229
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.deleteCascade
public int deleteCascade(TableIndex tableIndex) throws SQLException { int count = 0; if (tableIndex != null) { // Delete Geometry Indices GeometryIndexDao geometryIndexDao = getGeometryIndexDao(); if (geometryIndexDao.isTableExists()) { DeleteBuilder<GeometryIndex, GeometryIndexKey> db = geometryIndexDao .deleteBuilder(); db.where().eq(GeometryIndex.COLUMN_TABLE_NAME, tableIndex.getTableName()); PreparedDelete<GeometryIndex> deleteQuery = db.prepare(); geometryIndexDao.delete(deleteQuery); } count = delete(tableIndex); } return count; }
java
public int deleteCascade(TableIndex tableIndex) throws SQLException { int count = 0; if (tableIndex != null) { // Delete Geometry Indices GeometryIndexDao geometryIndexDao = getGeometryIndexDao(); if (geometryIndexDao.isTableExists()) { DeleteBuilder<GeometryIndex, GeometryIndexKey> db = geometryIndexDao .deleteBuilder(); db.where().eq(GeometryIndex.COLUMN_TABLE_NAME, tableIndex.getTableName()); PreparedDelete<GeometryIndex> deleteQuery = db.prepare(); geometryIndexDao.delete(deleteQuery); } count = delete(tableIndex); } return count; }
[ "public", "int", "deleteCascade", "(", "TableIndex", "tableIndex", ")", "throws", "SQLException", "{", "int", "count", "=", "0", ";", "if", "(", "tableIndex", "!=", "null", ")", "{", "// Delete Geometry Indices", "GeometryIndexDao", "geometryIndexDao", "=", "getGeometryIndexDao", "(", ")", ";", "if", "(", "geometryIndexDao", ".", "isTableExists", "(", ")", ")", "{", "DeleteBuilder", "<", "GeometryIndex", ",", "GeometryIndexKey", ">", "db", "=", "geometryIndexDao", ".", "deleteBuilder", "(", ")", ";", "db", ".", "where", "(", ")", ".", "eq", "(", "GeometryIndex", ".", "COLUMN_TABLE_NAME", ",", "tableIndex", ".", "getTableName", "(", ")", ")", ";", "PreparedDelete", "<", "GeometryIndex", ">", "deleteQuery", "=", "db", ".", "prepare", "(", ")", ";", "geometryIndexDao", ".", "delete", "(", "deleteQuery", ")", ";", "}", "count", "=", "delete", "(", "tableIndex", ")", ";", "}", "return", "count", ";", "}" ]
Delete the TableIndex, cascading @param tableIndex table index @return rows deleted @throws SQLException upon deletion error
[ "Delete", "the", "TableIndex", "cascading" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L53-L72
6,230
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.deleteCascade
public int deleteCascade(Collection<TableIndex> tableIndexCollection) throws SQLException { int count = 0; if (tableIndexCollection != null) { for (TableIndex tableIndex : tableIndexCollection) { count += deleteCascade(tableIndex); } } return count; }
java
public int deleteCascade(Collection<TableIndex> tableIndexCollection) throws SQLException { int count = 0; if (tableIndexCollection != null) { for (TableIndex tableIndex : tableIndexCollection) { count += deleteCascade(tableIndex); } } return count; }
[ "public", "int", "deleteCascade", "(", "Collection", "<", "TableIndex", ">", "tableIndexCollection", ")", "throws", "SQLException", "{", "int", "count", "=", "0", ";", "if", "(", "tableIndexCollection", "!=", "null", ")", "{", "for", "(", "TableIndex", "tableIndex", ":", "tableIndexCollection", ")", "{", "count", "+=", "deleteCascade", "(", "tableIndex", ")", ";", "}", "}", "return", "count", ";", "}" ]
Delete the collection of TableIndex, cascading @param tableIndexCollection table index collection @return rows deleted @throws SQLException upon deletion failure
[ "Delete", "the", "collection", "of", "TableIndex", "cascading" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L83-L92
6,231
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.deleteCascade
public int deleteCascade(PreparedQuery<TableIndex> preparedDelete) throws SQLException { int count = 0; if (preparedDelete != null) { List<TableIndex> tableIndexList = query(preparedDelete); count = deleteCascade(tableIndexList); } return count; }
java
public int deleteCascade(PreparedQuery<TableIndex> preparedDelete) throws SQLException { int count = 0; if (preparedDelete != null) { List<TableIndex> tableIndexList = query(preparedDelete); count = deleteCascade(tableIndexList); } return count; }
[ "public", "int", "deleteCascade", "(", "PreparedQuery", "<", "TableIndex", ">", "preparedDelete", ")", "throws", "SQLException", "{", "int", "count", "=", "0", ";", "if", "(", "preparedDelete", "!=", "null", ")", "{", "List", "<", "TableIndex", ">", "tableIndexList", "=", "query", "(", "preparedDelete", ")", ";", "count", "=", "deleteCascade", "(", "tableIndexList", ")", ";", "}", "return", "count", ";", "}" ]
Delete the TableIndex matching the prepared query, cascading @param preparedDelete prepared query @return rows deleted @throws SQLException upon deletion failure
[ "Delete", "the", "TableIndex", "matching", "the", "prepared", "query", "cascading" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L103-L111
6,232
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.deleteByIdCascade
public int deleteByIdCascade(String id) throws SQLException { int count = 0; if (id != null) { TableIndex tableIndex = queryForId(id); if (tableIndex != null) { count = deleteCascade(tableIndex); } } return count; }
java
public int deleteByIdCascade(String id) throws SQLException { int count = 0; if (id != null) { TableIndex tableIndex = queryForId(id); if (tableIndex != null) { count = deleteCascade(tableIndex); } } return count; }
[ "public", "int", "deleteByIdCascade", "(", "String", "id", ")", "throws", "SQLException", "{", "int", "count", "=", "0", ";", "if", "(", "id", "!=", "null", ")", "{", "TableIndex", "tableIndex", "=", "queryForId", "(", "id", ")", ";", "if", "(", "tableIndex", "!=", "null", ")", "{", "count", "=", "deleteCascade", "(", "tableIndex", ")", ";", "}", "}", "return", "count", ";", "}" ]
Delete a TableIndex by id, cascading @param id id @return rows deleted @throws SQLException upon deletion failure
[ "Delete", "a", "TableIndex", "by", "id", "cascading" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L122-L131
6,233
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.getGeometryIndexDao
private GeometryIndexDao getGeometryIndexDao() throws SQLException { if (geometryIndexDao == null) { geometryIndexDao = DaoManager.createDao(connectionSource, GeometryIndex.class); } return geometryIndexDao; }
java
private GeometryIndexDao getGeometryIndexDao() throws SQLException { if (geometryIndexDao == null) { geometryIndexDao = DaoManager.createDao(connectionSource, GeometryIndex.class); } return geometryIndexDao; }
[ "private", "GeometryIndexDao", "getGeometryIndexDao", "(", ")", "throws", "SQLException", "{", "if", "(", "geometryIndexDao", "==", "null", ")", "{", "geometryIndexDao", "=", "DaoManager", ".", "createDao", "(", "connectionSource", ",", "GeometryIndex", ".", "class", ")", ";", "}", "return", "geometryIndexDao", ";", "}" ]
Get or create a Geometry Index DAO @return geometry index dao @throws SQLException
[ "Get", "or", "create", "a", "Geometry", "Index", "DAO" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L173-L179
6,234
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java
TableIndexDao.deleteAll
public int deleteAll() throws SQLException { int count = 0; if (isTableExists()) { DeleteBuilder<TableIndex, String> db = deleteBuilder(); PreparedDelete<TableIndex> deleteQuery = db.prepare(); count = delete(deleteQuery); } return count; }
java
public int deleteAll() throws SQLException { int count = 0; if (isTableExists()) { DeleteBuilder<TableIndex, String> db = deleteBuilder(); PreparedDelete<TableIndex> deleteQuery = db.prepare(); count = delete(deleteQuery); } return count; }
[ "public", "int", "deleteAll", "(", ")", "throws", "SQLException", "{", "int", "count", "=", "0", ";", "if", "(", "isTableExists", "(", ")", ")", "{", "DeleteBuilder", "<", "TableIndex", ",", "String", ">", "db", "=", "deleteBuilder", "(", ")", ";", "PreparedDelete", "<", "TableIndex", ">", "deleteQuery", "=", "db", ".", "prepare", "(", ")", ";", "count", "=", "delete", "(", "deleteQuery", ")", ";", "}", "return", "count", ";", "}" ]
Delete all table indices @return rows deleted @throws SQLException upon deletion failure @since 1.1.5
[ "Delete", "all", "table", "indices" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/TableIndexDao.java#L207-L218
6,235
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java
CoreSQLUtils.quoteWrap
public static String quoteWrap(String name) { String quoteName = null; if (name != null) { if (name.startsWith("\"") && name.endsWith("\"")) { quoteName = name; } else { quoteName = "\"" + name + "\""; } } return quoteName; }
java
public static String quoteWrap(String name) { String quoteName = null; if (name != null) { if (name.startsWith("\"") && name.endsWith("\"")) { quoteName = name; } else { quoteName = "\"" + name + "\""; } } return quoteName; }
[ "public", "static", "String", "quoteWrap", "(", "String", "name", ")", "{", "String", "quoteName", "=", "null", ";", "if", "(", "name", "!=", "null", ")", "{", "if", "(", "name", ".", "startsWith", "(", "\"\\\"\"", ")", "&&", "name", ".", "endsWith", "(", "\"\\\"\"", ")", ")", "{", "quoteName", "=", "name", ";", "}", "else", "{", "quoteName", "=", "\"\\\"\"", "+", "name", "+", "\"\\\"\"", ";", "}", "}", "return", "quoteName", ";", "}" ]
Wrap the name in double quotes @param name name @return quoted name
[ "Wrap", "the", "name", "in", "double", "quotes" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java#L18-L28
6,236
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java
CoreSQLUtils.quoteWrap
public static String[] quoteWrap(String[] names) { String[] quoteNames = null; if (names != null) { quoteNames = new String[names.length]; for (int i = 0; i < names.length; i++) { quoteNames[i] = quoteWrap(names[i]); } } return quoteNames; }
java
public static String[] quoteWrap(String[] names) { String[] quoteNames = null; if (names != null) { quoteNames = new String[names.length]; for (int i = 0; i < names.length; i++) { quoteNames[i] = quoteWrap(names[i]); } } return quoteNames; }
[ "public", "static", "String", "[", "]", "quoteWrap", "(", "String", "[", "]", "names", ")", "{", "String", "[", "]", "quoteNames", "=", "null", ";", "if", "(", "names", "!=", "null", ")", "{", "quoteNames", "=", "new", "String", "[", "names", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "names", ".", "length", ";", "i", "++", ")", "{", "quoteNames", "[", "i", "]", "=", "quoteWrap", "(", "names", "[", "i", "]", ")", ";", "}", "}", "return", "quoteNames", ";", "}" ]
Wrap the names in double quotes @param names names @return quoted names
[ "Wrap", "the", "names", "in", "double", "quotes" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java#L37-L46
6,237
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java
CoreSQLUtils.buildColumnsAs
public static String[] buildColumnsAs(String[] columns, String[] columnsAs) { String[] columnsWithAs = null; if (columnsAs != null) { columnsWithAs = new String[columns.length]; for (int i = 0; i < columns.length; i++) { String column = columns[i]; String columnsAsValue = columnsAs[i]; String columnWithAs = null; if (columnsAsValue != null) { columnWithAs = columnsAsValue + " AS " + column; } else { columnWithAs = column; } columnsWithAs[i] = columnWithAs; } } else { columnsWithAs = columns; } return columnsWithAs; }
java
public static String[] buildColumnsAs(String[] columns, String[] columnsAs) { String[] columnsWithAs = null; if (columnsAs != null) { columnsWithAs = new String[columns.length]; for (int i = 0; i < columns.length; i++) { String column = columns[i]; String columnsAsValue = columnsAs[i]; String columnWithAs = null; if (columnsAsValue != null) { columnWithAs = columnsAsValue + " AS " + column; } else { columnWithAs = column; } columnsWithAs[i] = columnWithAs; } } else { columnsWithAs = columns; } return columnsWithAs; }
[ "public", "static", "String", "[", "]", "buildColumnsAs", "(", "String", "[", "]", "columns", ",", "String", "[", "]", "columnsAs", ")", "{", "String", "[", "]", "columnsWithAs", "=", "null", ";", "if", "(", "columnsAs", "!=", "null", ")", "{", "columnsWithAs", "=", "new", "String", "[", "columns", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "columns", ".", "length", ";", "i", "++", ")", "{", "String", "column", "=", "columns", "[", "i", "]", ";", "String", "columnsAsValue", "=", "columnsAs", "[", "i", "]", ";", "String", "columnWithAs", "=", "null", ";", "if", "(", "columnsAsValue", "!=", "null", ")", "{", "columnWithAs", "=", "columnsAsValue", "+", "\" AS \"", "+", "column", ";", "}", "else", "{", "columnWithAs", "=", "column", ";", "}", "columnsWithAs", "[", "i", "]", "=", "columnWithAs", ";", "}", "}", "else", "{", "columnsWithAs", "=", "columns", ";", "}", "return", "columnsWithAs", ";", "}" ]
Build the "columns as" query values for the provided columns and "columns as" values for use in select statements. The columns as size should equal the number of columns and only provide values at the indices for desired columns. Example: columns = [column1, column2], columnsAs = [null, value] creates [column1, value as column2] @param columns columns array @param columnsAs columns as values @return columns with as values @since 2.0.0
[ "Build", "the", "columns", "as", "query", "values", "for", "the", "provided", "columns", "and", "columns", "as", "values", "for", "use", "in", "select", "statements", ".", "The", "columns", "as", "size", "should", "equal", "the", "number", "of", "columns", "and", "only", "provide", "values", "at", "the", "indices", "for", "desired", "columns", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/CoreSQLUtils.java#L64-L83
6,238
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.setContents
public void setContents(UserTable<? extends UserColumn> table) { ContentsDao dao = geoPackage.getContentsDao(); Contents contents = null; try { contents = dao.queryForId(table.getTableName()); } catch (SQLException e) { throw new GeoPackageException("Failed to retrieve " + Contents.class.getSimpleName() + " for table name: " + table.getTableName(), e); } if (contents == null) { throw new GeoPackageException( "No Contents Table exists for table name: " + table.getTableName()); } table.setContents(contents); }
java
public void setContents(UserTable<? extends UserColumn> table) { ContentsDao dao = geoPackage.getContentsDao(); Contents contents = null; try { contents = dao.queryForId(table.getTableName()); } catch (SQLException e) { throw new GeoPackageException("Failed to retrieve " + Contents.class.getSimpleName() + " for table name: " + table.getTableName(), e); } if (contents == null) { throw new GeoPackageException( "No Contents Table exists for table name: " + table.getTableName()); } table.setContents(contents); }
[ "public", "void", "setContents", "(", "UserTable", "<", "?", "extends", "UserColumn", ">", "table", ")", "{", "ContentsDao", "dao", "=", "geoPackage", ".", "getContentsDao", "(", ")", ";", "Contents", "contents", "=", "null", ";", "try", "{", "contents", "=", "dao", ".", "queryForId", "(", "table", ".", "getTableName", "(", ")", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to retrieve \"", "+", "Contents", ".", "class", ".", "getSimpleName", "(", ")", "+", "\" for table name: \"", "+", "table", ".", "getTableName", "(", ")", ",", "e", ")", ";", "}", "if", "(", "contents", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"No Contents Table exists for table name: \"", "+", "table", ".", "getTableName", "(", ")", ")", ";", "}", "table", ".", "setContents", "(", "contents", ")", ";", "}" ]
Set the contents in the user table @param table user table
[ "Set", "the", "contents", "in", "the", "user", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L149-L165
6,239
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.getRelationships
public List<ExtendedRelation> getRelationships() { List<ExtendedRelation> result = null; try { if (extendedRelationsDao.isTableExists()) { result = extendedRelationsDao.queryForAll(); } else { result = new ArrayList<>(); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for relationships " + "in " + EXTENSION_NAME, e); } return result; }
java
public List<ExtendedRelation> getRelationships() { List<ExtendedRelation> result = null; try { if (extendedRelationsDao.isTableExists()) { result = extendedRelationsDao.queryForAll(); } else { result = new ArrayList<>(); } } catch (SQLException e) { throw new GeoPackageException("Failed to query for relationships " + "in " + EXTENSION_NAME, e); } return result; }
[ "public", "List", "<", "ExtendedRelation", ">", "getRelationships", "(", ")", "{", "List", "<", "ExtendedRelation", ">", "result", "=", "null", ";", "try", "{", "if", "(", "extendedRelationsDao", ".", "isTableExists", "(", ")", ")", "{", "result", "=", "extendedRelationsDao", ".", "queryForAll", "(", ")", ";", "}", "else", "{", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to query for relationships \"", "+", "\"in \"", "+", "EXTENSION_NAME", ",", "e", ")", ";", "}", "return", "result", ";", "}" ]
Returns the relationships defined through this extension @return a list of ExtendedRelation objects
[ "Returns", "the", "relationships", "defined", "through", "this", "extension" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L172-L185
6,240
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addFeaturesRelationship
public ExtendedRelation addFeaturesRelationship( String baseFeaturesTableName, String relatedFeaturesTableName, String mappingTableName) { return addRelationship(baseFeaturesTableName, relatedFeaturesTableName, mappingTableName, RelationType.FEATURES); }
java
public ExtendedRelation addFeaturesRelationship( String baseFeaturesTableName, String relatedFeaturesTableName, String mappingTableName) { return addRelationship(baseFeaturesTableName, relatedFeaturesTableName, mappingTableName, RelationType.FEATURES); }
[ "public", "ExtendedRelation", "addFeaturesRelationship", "(", "String", "baseFeaturesTableName", ",", "String", "relatedFeaturesTableName", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseFeaturesTableName", ",", "relatedFeaturesTableName", ",", "mappingTableName", ",", "RelationType", ".", "FEATURES", ")", ";", "}" ]
Adds a features relationship between the base feature and related feature table. Creates a default user mapping table if needed. @param baseFeaturesTableName base features table name @param relatedFeaturesTableName related features table name @param mappingTableName mapping table name @return The relationship that was added
[ "Adds", "a", "features", "relationship", "between", "the", "base", "feature", "and", "related", "feature", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L488-L493
6,241
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addFeaturesRelationship
public ExtendedRelation addFeaturesRelationship( String baseFeaturesTableName, String relatedFeaturesTableName, UserMappingTable userMappingTable) { return addRelationship(baseFeaturesTableName, relatedFeaturesTableName, userMappingTable, RelationType.FEATURES); }
java
public ExtendedRelation addFeaturesRelationship( String baseFeaturesTableName, String relatedFeaturesTableName, UserMappingTable userMappingTable) { return addRelationship(baseFeaturesTableName, relatedFeaturesTableName, userMappingTable, RelationType.FEATURES); }
[ "public", "ExtendedRelation", "addFeaturesRelationship", "(", "String", "baseFeaturesTableName", ",", "String", "relatedFeaturesTableName", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseFeaturesTableName", ",", "relatedFeaturesTableName", ",", "userMappingTable", ",", "RelationType", ".", "FEATURES", ")", ";", "}" ]
Adds a features relationship between the base feature and related feature table. Creates the user mapping table if needed. @param baseFeaturesTableName base features table name @param relatedFeaturesTableName related features table name @param userMappingTable user mapping table @return The relationship that was added
[ "Adds", "a", "features", "relationship", "between", "the", "base", "feature", "and", "related", "feature", "table", ".", "Creates", "the", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L507-L512
6,242
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addMediaRelationship
public ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, String mappingTableName) { return addRelationship(baseTableName, mediaTable, mappingTableName); }
java
public ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, String mappingTableName) { return addRelationship(baseTableName, mediaTable, mappingTableName); }
[ "public", "ExtendedRelation", "addMediaRelationship", "(", "String", "baseTableName", ",", "MediaTable", "mediaTable", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "mediaTable", ",", "mappingTableName", ")", ";", "}" ]
Adds a media relationship between the base table and user media related table. Creates a default user mapping table and the media table if needed. @param baseTableName base table name @param mediaTable user media table @param mappingTableName user mapping table name @return The relationship that was added
[ "Adds", "a", "media", "relationship", "between", "the", "base", "table", "and", "user", "media", "related", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "and", "the", "media", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L527-L530
6,243
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addMediaRelationship
public ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, mediaTable, userMappingTable); }
java
public ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, mediaTable, userMappingTable); }
[ "public", "ExtendedRelation", "addMediaRelationship", "(", "String", "baseTableName", ",", "MediaTable", "mediaTable", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "mediaTable", ",", "userMappingTable", ")", ";", "}" ]
Adds a media relationship between the base table and user media related table. Creates the user mapping table and media table if needed. @param baseTableName base table name @param mediaTable user media table @param userMappingTable user mapping table @return The relationship that was added
[ "Adds", "a", "media", "relationship", "between", "the", "base", "table", "and", "user", "media", "related", "table", ".", "Creates", "the", "user", "mapping", "table", "and", "media", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L544-L547
6,244
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addSimpleAttributesRelationship
public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, String mappingTableName) { return addRelationship(baseTableName, simpleAttributesTable, mappingTableName); }
java
public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, String mappingTableName) { return addRelationship(baseTableName, simpleAttributesTable, mappingTableName); }
[ "public", "ExtendedRelation", "addSimpleAttributesRelationship", "(", "String", "baseTableName", ",", "SimpleAttributesTable", "simpleAttributesTable", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "simpleAttributesTable", ",", "mappingTableName", ")", ";", "}" ]
Adds a simple attributes relationship between the base table and user simple attributes related table. Creates a default user mapping table and the simple attributes table if needed. @param baseTableName base table name @param simpleAttributesTable user simple attributes table @param mappingTableName user mapping table name @return The relationship that was added
[ "Adds", "a", "simple", "attributes", "relationship", "between", "the", "base", "table", "and", "user", "simple", "attributes", "related", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "and", "the", "simple", "attributes", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L562-L567
6,245
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addSimpleAttributesRelationship
public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, simpleAttributesTable, userMappingTable); }
java
public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, simpleAttributesTable, userMappingTable); }
[ "public", "ExtendedRelation", "addSimpleAttributesRelationship", "(", "String", "baseTableName", ",", "SimpleAttributesTable", "simpleAttributesTable", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "simpleAttributesTable", ",", "userMappingTable", ")", ";", "}" ]
Adds a simple attributes relationship between the base table and user simple attributes related table. Creates the user mapping table and simple attributes table if needed. @param baseTableName base table name @param simpleAttributesTable user simple attributes table @param userMappingTable user mapping table @return The relationship that was added
[ "Adds", "a", "simple", "attributes", "relationship", "between", "the", "base", "table", "and", "user", "simple", "attributes", "related", "table", ".", "Creates", "the", "user", "mapping", "table", "and", "simple", "attributes", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L582-L587
6,246
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addAttributesRelationship
public ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, String mappingTableName) { return addRelationship(baseTableName, relatedAttributesTableName, mappingTableName, RelationType.ATTRIBUTES); }
java
public ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, String mappingTableName) { return addRelationship(baseTableName, relatedAttributesTableName, mappingTableName, RelationType.ATTRIBUTES); }
[ "public", "ExtendedRelation", "addAttributesRelationship", "(", "String", "baseTableName", ",", "String", "relatedAttributesTableName", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "relatedAttributesTableName", ",", "mappingTableName", ",", "RelationType", ".", "ATTRIBUTES", ")", ";", "}" ]
Adds an attributes relationship between the base table and related attributes table. Creates a default user mapping table if needed. @param baseTableName base table name @param relatedAttributesTableName related attributes table name @param mappingTableName mapping table name @return The relationship that was added @since 3.2.0
[ "Adds", "an", "attributes", "relationship", "between", "the", "base", "table", "and", "related", "attributes", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L602-L606
6,247
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addAttributesRelationship
public ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, UserMappingTable userMappingTable) { return addRelationship(baseTableName, relatedAttributesTableName, userMappingTable, RelationType.ATTRIBUTES); }
java
public ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, UserMappingTable userMappingTable) { return addRelationship(baseTableName, relatedAttributesTableName, userMappingTable, RelationType.ATTRIBUTES); }
[ "public", "ExtendedRelation", "addAttributesRelationship", "(", "String", "baseTableName", ",", "String", "relatedAttributesTableName", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "relatedAttributesTableName", ",", "userMappingTable", ",", "RelationType", ".", "ATTRIBUTES", ")", ";", "}" ]
Adds an attributes relationship between the base table and related attributes table. Creates the user mapping table if needed. @param baseTableName base table name @param relatedAttributesTableName related attributes table name @param userMappingTable user mapping table @return The relationship that was added @since 3.2.0
[ "Adds", "an", "attributes", "relationship", "between", "the", "base", "table", "and", "related", "attributes", "table", ".", "Creates", "the", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L621-L625
6,248
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addAttributesRelationship
public ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, String mappingTableName) { return addRelationship(baseTableName, attributesTable, mappingTableName); }
java
public ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, String mappingTableName) { return addRelationship(baseTableName, attributesTable, mappingTableName); }
[ "public", "ExtendedRelation", "addAttributesRelationship", "(", "String", "baseTableName", ",", "AttributesTable", "attributesTable", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "attributesTable", ",", "mappingTableName", ")", ";", "}" ]
Adds an attributes relationship between the base table and user attributes related table. Creates a default user mapping table and the attributes table if needed. @param baseTableName base table name @param attributesTable user attributes table @param mappingTableName user mapping table name @return The relationship that was added @since 3.2.0
[ "Adds", "an", "attributes", "relationship", "between", "the", "base", "table", "and", "user", "attributes", "related", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "and", "the", "attributes", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L641-L644
6,249
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addAttributesRelationship
public ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, attributesTable, userMappingTable); }
java
public ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, attributesTable, userMappingTable); }
[ "public", "ExtendedRelation", "addAttributesRelationship", "(", "String", "baseTableName", ",", "AttributesTable", "attributesTable", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "attributesTable", ",", "userMappingTable", ")", ";", "}" ]
Adds an attributes relationship between the base table and user attributes related table. Creates the user mapping table and an attributes table if needed. @param baseTableName base table name @param attributesTable user attributes table @param userMappingTable user mapping table @return The relationship that was added @since 3.2.0
[ "Adds", "an", "attributes", "relationship", "between", "the", "base", "table", "and", "user", "attributes", "related", "table", ".", "Creates", "the", "user", "mapping", "table", "and", "an", "attributes", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L660-L663
6,250
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addTilesRelationship
public ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, String mappingTableName) { return addRelationship(baseTableName, relatedTilesTableName, mappingTableName, RelationType.TILES); }
java
public ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, String mappingTableName) { return addRelationship(baseTableName, relatedTilesTableName, mappingTableName, RelationType.TILES); }
[ "public", "ExtendedRelation", "addTilesRelationship", "(", "String", "baseTableName", ",", "String", "relatedTilesTableName", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "relatedTilesTableName", ",", "mappingTableName", ",", "RelationType", ".", "TILES", ")", ";", "}" ]
Adds a tiles relationship between the base table and related tiles table. Creates a default user mapping table if needed. @param baseTableName base table name @param relatedTilesTableName related tiles table name @param mappingTableName mapping table name @return The relationship that was added @since 3.2.0
[ "Adds", "a", "tiles", "relationship", "between", "the", "base", "table", "and", "related", "tiles", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L678-L682
6,251
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addTilesRelationship
public ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, UserMappingTable userMappingTable) { return addRelationship(baseTableName, relatedTilesTableName, userMappingTable, RelationType.TILES); }
java
public ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, UserMappingTable userMappingTable) { return addRelationship(baseTableName, relatedTilesTableName, userMappingTable, RelationType.TILES); }
[ "public", "ExtendedRelation", "addTilesRelationship", "(", "String", "baseTableName", ",", "String", "relatedTilesTableName", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "relatedTilesTableName", ",", "userMappingTable", ",", "RelationType", ".", "TILES", ")", ";", "}" ]
Adds a tiles relationship between the base table and related tiles table. Creates the user mapping table if needed. @param baseTableName base table name @param relatedTilesTableName related tiles table name @param userMappingTable user mapping table @return The relationship that was added @since 3.2.0
[ "Adds", "a", "tiles", "relationship", "between", "the", "base", "table", "and", "related", "tiles", "table", ".", "Creates", "the", "user", "mapping", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L697-L701
6,252
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addTilesRelationship
public ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, String mappingTableName) { return addRelationship(baseTableName, tileTable, mappingTableName); }
java
public ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, String mappingTableName) { return addRelationship(baseTableName, tileTable, mappingTableName); }
[ "public", "ExtendedRelation", "addTilesRelationship", "(", "String", "baseTableName", ",", "TileTable", "tileTable", ",", "String", "mappingTableName", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "tileTable", ",", "mappingTableName", ")", ";", "}" ]
Adds a tiles relationship between the base table and user tiles related table. Creates a default user mapping table and the tile table if needed. @param baseTableName base table name @param tileTable user tile table @param mappingTableName user mapping table name @return The relationship that was added @since 3.2.0
[ "Adds", "a", "tiles", "relationship", "between", "the", "base", "table", "and", "user", "tiles", "related", "table", ".", "Creates", "a", "default", "user", "mapping", "table", "and", "the", "tile", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L716-L719
6,253
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.addTilesRelationship
public ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, tileTable, userMappingTable); }
java
public ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, tileTable, userMappingTable); }
[ "public", "ExtendedRelation", "addTilesRelationship", "(", "String", "baseTableName", ",", "TileTable", "tileTable", ",", "UserMappingTable", "userMappingTable", ")", "{", "return", "addRelationship", "(", "baseTableName", ",", "tileTable", ",", "userMappingTable", ")", ";", "}" ]
Adds a tiles relationship between the base table and user tiles related table. Creates the user mapping table and a tile table if needed. @param baseTableName base table name @param tileTable user tile table @param userMappingTable user mapping table @return The relationship that was added @since 3.2.0
[ "Adds", "a", "tiles", "relationship", "between", "the", "base", "table", "and", "user", "tiles", "related", "table", ".", "Creates", "the", "user", "mapping", "table", "and", "a", "tile", "table", "if", "needed", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L734-L737
6,254
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.validateRelationship
private void validateRelationship(String baseTableName, String relatedTableName, String relationName) { // Verify the base and related tables exist if (!geoPackage.isTable(baseTableName)) { throw new GeoPackageException( "Base Relationship table does not exist: " + baseTableName + ", Relation: " + relationName); } if (!geoPackage.isTable(relatedTableName)) { throw new GeoPackageException( "Related Relationship table does not exist: " + relatedTableName + ", Relation: " + relationName); } // Verify spec defined relation types RelationType relationType = RelationType.fromName(relationName); if (relationType != null) { validateRelationship(baseTableName, relatedTableName, relationType); } }
java
private void validateRelationship(String baseTableName, String relatedTableName, String relationName) { // Verify the base and related tables exist if (!geoPackage.isTable(baseTableName)) { throw new GeoPackageException( "Base Relationship table does not exist: " + baseTableName + ", Relation: " + relationName); } if (!geoPackage.isTable(relatedTableName)) { throw new GeoPackageException( "Related Relationship table does not exist: " + relatedTableName + ", Relation: " + relationName); } // Verify spec defined relation types RelationType relationType = RelationType.fromName(relationName); if (relationType != null) { validateRelationship(baseTableName, relatedTableName, relationType); } }
[ "private", "void", "validateRelationship", "(", "String", "baseTableName", ",", "String", "relatedTableName", ",", "String", "relationName", ")", "{", "// Verify the base and related tables exist", "if", "(", "!", "geoPackage", ".", "isTable", "(", "baseTableName", ")", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Base Relationship table does not exist: \"", "+", "baseTableName", "+", "\", Relation: \"", "+", "relationName", ")", ";", "}", "if", "(", "!", "geoPackage", ".", "isTable", "(", "relatedTableName", ")", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Related Relationship table does not exist: \"", "+", "relatedTableName", "+", "\", Relation: \"", "+", "relationName", ")", ";", "}", "// Verify spec defined relation types", "RelationType", "relationType", "=", "RelationType", ".", "fromName", "(", "relationName", ")", ";", "if", "(", "relationType", "!=", "null", ")", "{", "validateRelationship", "(", "baseTableName", ",", "relatedTableName", ",", "relationType", ")", ";", "}", "}" ]
Validate that the relation name is valid between the base and related table @param baseTableName base table name @param relatedTableName related table name @param relationName relation name
[ "Validate", "that", "the", "relation", "name", "is", "valid", "between", "the", "base", "and", "related", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L750-L771
6,255
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.validateRelationship
private void validateRelationship(String baseTableName, String relatedTableName, RelationType relationType) { if (relationType != null) { if (!geoPackage.isTableType(relationType.getDataType(), relatedTableName)) { throw new GeoPackageException("The related table must be a " + relationType.getDataType() + " table. Related Table: " + relatedTableName + ", Type: " + geoPackage.getTableType(relatedTableName)); } } }
java
private void validateRelationship(String baseTableName, String relatedTableName, RelationType relationType) { if (relationType != null) { if (!geoPackage.isTableType(relationType.getDataType(), relatedTableName)) { throw new GeoPackageException("The related table must be a " + relationType.getDataType() + " table. Related Table: " + relatedTableName + ", Type: " + geoPackage.getTableType(relatedTableName)); } } }
[ "private", "void", "validateRelationship", "(", "String", "baseTableName", ",", "String", "relatedTableName", ",", "RelationType", "relationType", ")", "{", "if", "(", "relationType", "!=", "null", ")", "{", "if", "(", "!", "geoPackage", ".", "isTableType", "(", "relationType", ".", "getDataType", "(", ")", ",", "relatedTableName", ")", ")", "{", "throw", "new", "GeoPackageException", "(", "\"The related table must be a \"", "+", "relationType", ".", "getDataType", "(", ")", "+", "\" table. Related Table: \"", "+", "relatedTableName", "+", "\", Type: \"", "+", "geoPackage", ".", "getTableType", "(", "relatedTableName", ")", ")", ";", "}", "}", "}" ]
Determine if the relation type is valid between the base and related table @param baseTableName base table name @param relatedTableName related table name @param relationType relation type
[ "Determine", "if", "the", "relation", "type", "is", "valid", "between", "the", "base", "and", "related", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L784-L800
6,256
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.createUserMappingTable
public boolean createUserMappingTable(String mappingTableName) { UserMappingTable userMappingTable = UserMappingTable .create(mappingTableName); return createUserMappingTable(userMappingTable); }
java
public boolean createUserMappingTable(String mappingTableName) { UserMappingTable userMappingTable = UserMappingTable .create(mappingTableName); return createUserMappingTable(userMappingTable); }
[ "public", "boolean", "createUserMappingTable", "(", "String", "mappingTableName", ")", "{", "UserMappingTable", "userMappingTable", "=", "UserMappingTable", ".", "create", "(", "mappingTableName", ")", ";", "return", "createUserMappingTable", "(", "userMappingTable", ")", ";", "}" ]
Create a default user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled. @param mappingTableName user mapping table name @return true if table was created, false if the table already existed
[ "Create", "a", "default", "user", "mapping", "table", "and", "extension", "row", "if", "either", "does", "not", "exist", ".", "When", "not", "created", "there", "is", "no", "guarantee", "that", "an", "existing", "table", "has", "the", "same", "schema", "as", "the", "provided", "tabled", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L811-L817
6,257
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.createUserMappingTable
public boolean createUserMappingTable(UserMappingTable userMappingTable) { boolean created = false; String userMappingTableName = userMappingTable.getTableName(); getOrCreate(userMappingTableName); if (!geoPackage.isTable(userMappingTableName)) { geoPackage.createUserTable(userMappingTable); created = true; } return created; }
java
public boolean createUserMappingTable(UserMappingTable userMappingTable) { boolean created = false; String userMappingTableName = userMappingTable.getTableName(); getOrCreate(userMappingTableName); if (!geoPackage.isTable(userMappingTableName)) { geoPackage.createUserTable(userMappingTable); created = true; } return created; }
[ "public", "boolean", "createUserMappingTable", "(", "UserMappingTable", "userMappingTable", ")", "{", "boolean", "created", "=", "false", ";", "String", "userMappingTableName", "=", "userMappingTable", ".", "getTableName", "(", ")", ";", "getOrCreate", "(", "userMappingTableName", ")", ";", "if", "(", "!", "geoPackage", ".", "isTable", "(", "userMappingTableName", ")", ")", "{", "geoPackage", ".", "createUserTable", "(", "userMappingTable", ")", ";", "created", "=", "true", ";", "}", "return", "created", ";", "}" ]
Create a user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled. @param userMappingTable user mapping table @return true if table was created, false if the table already existed
[ "Create", "a", "user", "mapping", "table", "and", "extension", "row", "if", "either", "does", "not", "exist", ".", "When", "not", "created", "there", "is", "no", "guarantee", "that", "an", "existing", "table", "has", "the", "same", "schema", "as", "the", "provided", "tabled", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L828-L843
6,258
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.createRelatedTable
public boolean createRelatedTable( UserTable<? extends UserColumn> relatedTable) { boolean created = false; String relatedTableName = relatedTable.getTableName(); if (!geoPackage.isTable(relatedTableName)) { geoPackage.createUserTable(relatedTable); try { // Create the contents Contents contents = new Contents(); contents.setTableName(relatedTableName); contents.setDataTypeString(relatedTable.getDataType()); contents.setIdentifier(relatedTableName); ContentsDao contentsDao = geoPackage.getContentsDao(); contentsDao.create(contents); contentsDao.refresh(contents); relatedTable.setContents(contents); } catch (RuntimeException e) { geoPackage.deleteTableQuietly(relatedTableName); throw e; } catch (SQLException e) { geoPackage.deleteTableQuietly(relatedTableName); throw new GeoPackageException( "Failed to create table and metadata: " + relatedTableName, e); } created = true; } return created; }
java
public boolean createRelatedTable( UserTable<? extends UserColumn> relatedTable) { boolean created = false; String relatedTableName = relatedTable.getTableName(); if (!geoPackage.isTable(relatedTableName)) { geoPackage.createUserTable(relatedTable); try { // Create the contents Contents contents = new Contents(); contents.setTableName(relatedTableName); contents.setDataTypeString(relatedTable.getDataType()); contents.setIdentifier(relatedTableName); ContentsDao contentsDao = geoPackage.getContentsDao(); contentsDao.create(contents); contentsDao.refresh(contents); relatedTable.setContents(contents); } catch (RuntimeException e) { geoPackage.deleteTableQuietly(relatedTableName); throw e; } catch (SQLException e) { geoPackage.deleteTableQuietly(relatedTableName); throw new GeoPackageException( "Failed to create table and metadata: " + relatedTableName, e); } created = true; } return created; }
[ "public", "boolean", "createRelatedTable", "(", "UserTable", "<", "?", "extends", "UserColumn", ">", "relatedTable", ")", "{", "boolean", "created", "=", "false", ";", "String", "relatedTableName", "=", "relatedTable", ".", "getTableName", "(", ")", ";", "if", "(", "!", "geoPackage", ".", "isTable", "(", "relatedTableName", ")", ")", "{", "geoPackage", ".", "createUserTable", "(", "relatedTable", ")", ";", "try", "{", "// Create the contents", "Contents", "contents", "=", "new", "Contents", "(", ")", ";", "contents", ".", "setTableName", "(", "relatedTableName", ")", ";", "contents", ".", "setDataTypeString", "(", "relatedTable", ".", "getDataType", "(", ")", ")", ";", "contents", ".", "setIdentifier", "(", "relatedTableName", ")", ";", "ContentsDao", "contentsDao", "=", "geoPackage", ".", "getContentsDao", "(", ")", ";", "contentsDao", ".", "create", "(", "contents", ")", ";", "contentsDao", ".", "refresh", "(", "contents", ")", ";", "relatedTable", ".", "setContents", "(", "contents", ")", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "geoPackage", ".", "deleteTableQuietly", "(", "relatedTableName", ")", ";", "throw", "e", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "geoPackage", ".", "deleteTableQuietly", "(", "relatedTableName", ")", ";", "throw", "new", "GeoPackageException", "(", "\"Failed to create table and metadata: \"", "+", "relatedTableName", ",", "e", ")", ";", "}", "created", "=", "true", ";", "}", "return", "created", ";", "}" ]
Create a user related table if it does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled. @param relatedTable user related table @return true if created, false if the table already existed @since 3.2.0
[ "Create", "a", "user", "related", "table", "if", "it", "does", "not", "exist", ".", "When", "not", "created", "there", "is", "no", "guarantee", "that", "an", "existing", "table", "has", "the", "same", "schema", "as", "the", "provided", "tabled", "." ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L855-L891
6,259
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.removeRelationships
public void removeRelationships(String table) { try { if (extendedRelationsDao.isTableExists()) { List<ExtendedRelation> extendedRelations = extendedRelationsDao .getTableRelations(table); for (ExtendedRelation extendedRelation : extendedRelations) { removeRelationship(extendedRelation); } } } catch (SQLException e) { throw new GeoPackageException( "Failed to remove relationships for table: " + table, e); } }
java
public void removeRelationships(String table) { try { if (extendedRelationsDao.isTableExists()) { List<ExtendedRelation> extendedRelations = extendedRelationsDao .getTableRelations(table); for (ExtendedRelation extendedRelation : extendedRelations) { removeRelationship(extendedRelation); } } } catch (SQLException e) { throw new GeoPackageException( "Failed to remove relationships for table: " + table, e); } }
[ "public", "void", "removeRelationships", "(", "String", "table", ")", "{", "try", "{", "if", "(", "extendedRelationsDao", ".", "isTableExists", "(", ")", ")", "{", "List", "<", "ExtendedRelation", ">", "extendedRelations", "=", "extendedRelationsDao", ".", "getTableRelations", "(", "table", ")", ";", "for", "(", "ExtendedRelation", "extendedRelation", ":", "extendedRelations", ")", "{", "removeRelationship", "(", "extendedRelation", ")", ";", "}", "}", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to remove relationships for table: \"", "+", "table", ",", "e", ")", ";", "}", "}" ]
Remove all relationships that include the table @param table base or related table name @since 3.2.0
[ "Remove", "all", "relationships", "that", "include", "the", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L986-L999
6,260
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.removeRelationshipsWithMappingTable
public void removeRelationshipsWithMappingTable(String mappingTable) { try { if (extendedRelationsDao.isTableExists()) { List<ExtendedRelation> extendedRelations = getRelations(null, null, mappingTable); for (ExtendedRelation extendedRelation : extendedRelations) { removeRelationship(extendedRelation); } } } catch (SQLException e) { throw new GeoPackageException( "Failed to remove relationships for mapping table: " + mappingTable, e); } }
java
public void removeRelationshipsWithMappingTable(String mappingTable) { try { if (extendedRelationsDao.isTableExists()) { List<ExtendedRelation> extendedRelations = getRelations(null, null, mappingTable); for (ExtendedRelation extendedRelation : extendedRelations) { removeRelationship(extendedRelation); } } } catch (SQLException e) { throw new GeoPackageException( "Failed to remove relationships for mapping table: " + mappingTable, e); } }
[ "public", "void", "removeRelationshipsWithMappingTable", "(", "String", "mappingTable", ")", "{", "try", "{", "if", "(", "extendedRelationsDao", ".", "isTableExists", "(", ")", ")", "{", "List", "<", "ExtendedRelation", ">", "extendedRelations", "=", "getRelations", "(", "null", ",", "null", ",", "mappingTable", ")", ";", "for", "(", "ExtendedRelation", "extendedRelation", ":", "extendedRelations", ")", "{", "removeRelationship", "(", "extendedRelation", ")", ";", "}", "}", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Failed to remove relationships for mapping table: \"", "+", "mappingTable", ",", "e", ")", ";", "}", "}" ]
Remove all relationships with the mapping table @param mappingTable mapping table @since 3.2.0
[ "Remove", "all", "relationships", "with", "the", "mapping", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L1008-L1022
6,261
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java
RelatedTablesCoreExtension.getRelations
public List<ExtendedRelation> getRelations(String baseTable, String relatedTable) throws SQLException { return getRelations(baseTable, null, relatedTable, null, null, null); }
java
public List<ExtendedRelation> getRelations(String baseTable, String relatedTable) throws SQLException { return getRelations(baseTable, null, relatedTable, null, null, null); }
[ "public", "List", "<", "ExtendedRelation", ">", "getRelations", "(", "String", "baseTable", ",", "String", "relatedTable", ")", "throws", "SQLException", "{", "return", "getRelations", "(", "baseTable", ",", "null", ",", "relatedTable", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Get the relations to the base table and related table @param baseTable base table name @param relatedTable related table name @return extended relations @throws SQLException upon failure @since 3.2.0
[ "Get", "the", "relations", "to", "the", "base", "table", "and", "related", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L1079-L1082
6,262
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraints.java
DataColumnConstraints.validateRangeValue
private void validateRangeValue(String column, Object value) { if (constraintType != null && value != null && !getConstraintType().equals(DataColumnConstraintType.RANGE)) { throw new GeoPackageException("The " + column + " must be null for " + DataColumnConstraintType.ENUM + " and " + DataColumnConstraintType.GLOB + " constraints"); } }
java
private void validateRangeValue(String column, Object value) { if (constraintType != null && value != null && !getConstraintType().equals(DataColumnConstraintType.RANGE)) { throw new GeoPackageException("The " + column + " must be null for " + DataColumnConstraintType.ENUM + " and " + DataColumnConstraintType.GLOB + " constraints"); } }
[ "private", "void", "validateRangeValue", "(", "String", "column", ",", "Object", "value", ")", "{", "if", "(", "constraintType", "!=", "null", "&&", "value", "!=", "null", "&&", "!", "getConstraintType", "(", ")", ".", "equals", "(", "DataColumnConstraintType", ".", "RANGE", ")", ")", "{", "throw", "new", "GeoPackageException", "(", "\"The \"", "+", "column", "+", "\" must be null for \"", "+", "DataColumnConstraintType", ".", "ENUM", "+", "\" and \"", "+", "DataColumnConstraintType", ".", "GLOB", "+", "\" constraints\"", ")", ";", "}", "}" ]
Validate the constraint type when a range value is set @param column @param value
[ "Validate", "the", "constraint", "type", "when", "a", "range", "value", "is", "set" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraints.java#L251-L258
6,263
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/features/user/FeatureColumn.java
FeatureColumn.createGeometryColumn
public static FeatureColumn createGeometryColumn(int index, String name, GeometryType type, boolean notNull, Object defaultValue) { if (type == null) { throw new GeoPackageException( "Geometry Type is required to create geometry column: " + name); } return new FeatureColumn(index, name, GeoPackageDataType.BLOB, null, notNull, defaultValue, false, type); }
java
public static FeatureColumn createGeometryColumn(int index, String name, GeometryType type, boolean notNull, Object defaultValue) { if (type == null) { throw new GeoPackageException( "Geometry Type is required to create geometry column: " + name); } return new FeatureColumn(index, name, GeoPackageDataType.BLOB, null, notNull, defaultValue, false, type); }
[ "public", "static", "FeatureColumn", "createGeometryColumn", "(", "int", "index", ",", "String", "name", ",", "GeometryType", "type", ",", "boolean", "notNull", ",", "Object", "defaultValue", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Geometry Type is required to create geometry column: \"", "+", "name", ")", ";", "}", "return", "new", "FeatureColumn", "(", "index", ",", "name", ",", "GeoPackageDataType", ".", "BLOB", ",", "null", ",", "notNull", ",", "defaultValue", ",", "false", ",", "type", ")", ";", "}" ]
Create a new geometry column @param index index @param name name @param type geometry type @param notNull not null flag @param defaultValue default value @return feature column
[ "Create", "a", "new", "geometry", "column" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/features/user/FeatureColumn.java#L49-L58
6,264
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/matrixset/TileMatrixSetDao.java
TileMatrixSetDao.getTileTables
public List<String> getTileTables() throws SQLException { List<String> tableNames = new ArrayList<String>(); List<TileMatrixSet> tileMatrixSets = queryForAll(); for (TileMatrixSet tileMatrixSet : tileMatrixSets) { tableNames.add(tileMatrixSet.getTableName()); } return tableNames; }
java
public List<String> getTileTables() throws SQLException { List<String> tableNames = new ArrayList<String>(); List<TileMatrixSet> tileMatrixSets = queryForAll(); for (TileMatrixSet tileMatrixSet : tileMatrixSets) { tableNames.add(tileMatrixSet.getTableName()); } return tableNames; }
[ "public", "List", "<", "String", ">", "getTileTables", "(", ")", "throws", "SQLException", "{", "List", "<", "String", ">", "tableNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "TileMatrixSet", ">", "tileMatrixSets", "=", "queryForAll", "(", ")", ";", "for", "(", "TileMatrixSet", "tileMatrixSet", ":", "tileMatrixSets", ")", "{", "tableNames", ".", "add", "(", "tileMatrixSet", ".", "getTableName", "(", ")", ")", ";", "}", "return", "tableNames", ";", "}" ]
Get all the tile table names @return tile tables @throws SQLException upon failure
[ "Get", "all", "the", "tile", "table", "names" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/matrixset/TileMatrixSetDao.java#L39-L49
6,265
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.create
public static MediaTable create(String tableName, List<UserCustomColumn> additionalColumns) { return create(tableName, null, additionalColumns); }
java
public static MediaTable create(String tableName, List<UserCustomColumn> additionalColumns) { return create(tableName, null, additionalColumns); }
[ "public", "static", "MediaTable", "create", "(", "String", "tableName", ",", "List", "<", "UserCustomColumn", ">", "additionalColumns", ")", "{", "return", "create", "(", "tableName", ",", "null", ",", "additionalColumns", ")", ";", "}" ]
Create a media table with the minimum required columns followed by the additional columns @param tableName table name @param additionalColumns additional columns @return media table
[ "Create", "a", "media", "table", "with", "the", "minimum", "required", "columns", "followed", "by", "the", "additional", "columns" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L61-L64
6,266
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.create
public static MediaTable create(String tableName, String idColumnName) { return create(tableName, idColumnName, null); }
java
public static MediaTable create(String tableName, String idColumnName) { return create(tableName, idColumnName, null); }
[ "public", "static", "MediaTable", "create", "(", "String", "tableName", ",", "String", "idColumnName", ")", "{", "return", "create", "(", "tableName", ",", "idColumnName", ",", "null", ")", ";", "}" ]
Create a media table with the id column and minimum required columns @param tableName table name @param idColumnName id column name @return media table
[ "Create", "a", "media", "table", "with", "the", "id", "column", "and", "minimum", "required", "columns" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L75-L77
6,267
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.create
public static MediaTable create(String tableName, String idColumnName, List<UserCustomColumn> additionalColumns) { List<UserCustomColumn> columns = new ArrayList<>(); columns.addAll(createRequiredColumns(idColumnName)); if (additionalColumns != null) { columns.addAll(additionalColumns); } return new MediaTable(tableName, columns, idColumnName); }
java
public static MediaTable create(String tableName, String idColumnName, List<UserCustomColumn> additionalColumns) { List<UserCustomColumn> columns = new ArrayList<>(); columns.addAll(createRequiredColumns(idColumnName)); if (additionalColumns != null) { columns.addAll(additionalColumns); } return new MediaTable(tableName, columns, idColumnName); }
[ "public", "static", "MediaTable", "create", "(", "String", "tableName", ",", "String", "idColumnName", ",", "List", "<", "UserCustomColumn", ">", "additionalColumns", ")", "{", "List", "<", "UserCustomColumn", ">", "columns", "=", "new", "ArrayList", "<>", "(", ")", ";", "columns", ".", "addAll", "(", "createRequiredColumns", "(", "idColumnName", ")", ")", ";", "if", "(", "additionalColumns", "!=", "null", ")", "{", "columns", ".", "addAll", "(", "additionalColumns", ")", ";", "}", "return", "new", "MediaTable", "(", "tableName", ",", "columns", ",", "idColumnName", ")", ";", "}" ]
Create a media table with the id column and minimum required columns followed by the additional columns @param tableName table name @param idColumnName id column name @param additionalColumns additional columns @return media table
[ "Create", "a", "media", "table", "with", "the", "id", "column", "and", "minimum", "required", "columns", "followed", "by", "the", "additional", "columns" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L91-L102
6,268
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns( int startingIndex, String idColumnName) { if (idColumnName == null) { idColumnName = COLUMN_ID; } List<UserCustomColumn> columns = new ArrayList<>(); columns.add(createIdColumn(startingIndex++, idColumnName)); columns.add(createDataColumn(startingIndex++)); columns.add(createContentTypeColumn(startingIndex++)); return columns; }
java
public static List<UserCustomColumn> createRequiredColumns( int startingIndex, String idColumnName) { if (idColumnName == null) { idColumnName = COLUMN_ID; } List<UserCustomColumn> columns = new ArrayList<>(); columns.add(createIdColumn(startingIndex++, idColumnName)); columns.add(createDataColumn(startingIndex++)); columns.add(createContentTypeColumn(startingIndex++)); return columns; }
[ "public", "static", "List", "<", "UserCustomColumn", ">", "createRequiredColumns", "(", "int", "startingIndex", ",", "String", "idColumnName", ")", "{", "if", "(", "idColumnName", "==", "null", ")", "{", "idColumnName", "=", "COLUMN_ID", ";", "}", "List", "<", "UserCustomColumn", ">", "columns", "=", "new", "ArrayList", "<>", "(", ")", ";", "columns", ".", "add", "(", "createIdColumn", "(", "startingIndex", "++", ",", "idColumnName", ")", ")", ";", "columns", ".", "add", "(", "createDataColumn", "(", "startingIndex", "++", ")", ")", ";", "columns", ".", "add", "(", "createContentTypeColumn", "(", "startingIndex", "++", ")", ")", ";", "return", "columns", ";", "}" ]
Create the required table columns with id column name, starting at the provided index @param startingIndex starting index @param idColumnName id column name @return user custom columns
[ "Create", "the", "required", "table", "columns", "with", "id", "column", "name", "starting", "at", "the", "provided", "index" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L147-L160
6,269
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.createDataColumn
public static UserCustomColumn createDataColumn(int index) { return UserCustomColumn.createColumn(index, COLUMN_DATA, GeoPackageDataType.BLOB, true, null); }
java
public static UserCustomColumn createDataColumn(int index) { return UserCustomColumn.createColumn(index, COLUMN_DATA, GeoPackageDataType.BLOB, true, null); }
[ "public", "static", "UserCustomColumn", "createDataColumn", "(", "int", "index", ")", "{", "return", "UserCustomColumn", ".", "createColumn", "(", "index", ",", "COLUMN_DATA", ",", "GeoPackageDataType", ".", "BLOB", ",", "true", ",", "null", ")", ";", "}" ]
Create a data column @param index column index @return data column
[ "Create", "a", "data", "column" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L182-L185
6,270
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java
MediaTable.createContentTypeColumn
public static UserCustomColumn createContentTypeColumn(int index) { return UserCustomColumn.createColumn(index, COLUMN_CONTENT_TYPE, GeoPackageDataType.TEXT, true, null); }
java
public static UserCustomColumn createContentTypeColumn(int index) { return UserCustomColumn.createColumn(index, COLUMN_CONTENT_TYPE, GeoPackageDataType.TEXT, true, null); }
[ "public", "static", "UserCustomColumn", "createContentTypeColumn", "(", "int", "index", ")", "{", "return", "UserCustomColumn", ".", "createColumn", "(", "index", ",", "COLUMN_CONTENT_TYPE", ",", "GeoPackageDataType", ".", "TEXT", ",", "true", ",", "null", ")", ";", "}" ]
Create a content type column @param index column index @return content type column
[ "Create", "a", "content", "type", "column" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/media/MediaTable.java#L194-L197
6,271
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.getProperties
public List<String> getProperties() { List<String> properties = null; if (has()) { properties = getDao().querySingleColumnTypedResults( "SELECT DISTINCT " + COLUMN_PROPERTY + " FROM " + TABLE_NAME, null); } else { properties = new ArrayList<>(); } return properties; }
java
public List<String> getProperties() { List<String> properties = null; if (has()) { properties = getDao().querySingleColumnTypedResults( "SELECT DISTINCT " + COLUMN_PROPERTY + " FROM " + TABLE_NAME, null); } else { properties = new ArrayList<>(); } return properties; }
[ "public", "List", "<", "String", ">", "getProperties", "(", ")", "{", "List", "<", "String", ">", "properties", "=", "null", ";", "if", "(", "has", "(", ")", ")", "{", "properties", "=", "getDao", "(", ")", ".", "querySingleColumnTypedResults", "(", "\"SELECT DISTINCT \"", "+", "COLUMN_PROPERTY", "+", "\" FROM \"", "+", "TABLE_NAME", ",", "null", ")", ";", "}", "else", "{", "properties", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "return", "properties", ";", "}" ]
Get the properties @return list of properties
[ "Get", "the", "properties" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L170-L180
6,272
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.numValues
public int numValues(String property) { int count = 0; if (has()) { TResult result = queryForValues(property); try { count = result.getCount(); } finally { result.close(); } } return count; }
java
public int numValues(String property) { int count = 0; if (has()) { TResult result = queryForValues(property); try { count = result.getCount(); } finally { result.close(); } } return count; }
[ "public", "int", "numValues", "(", "String", "property", ")", "{", "int", "count", "=", "0", ";", "if", "(", "has", "(", ")", ")", "{", "TResult", "result", "=", "queryForValues", "(", "property", ")", ";", "try", "{", "count", "=", "result", ".", "getCount", "(", ")", ";", "}", "finally", "{", "result", ".", "close", "(", ")", ";", "}", "}", "return", "count", ";", "}" ]
Get the number of values for the property @param property property name @return number of values
[ "Get", "the", "number", "of", "values", "for", "the", "property" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L213-L224
6,273
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.getValue
public String getValue(String property) { String value = null; List<String> values = getValues(property); if (!values.isEmpty()) { value = values.get(0); } return value; }
java
public String getValue(String property) { String value = null; List<String> values = getValues(property); if (!values.isEmpty()) { value = values.get(0); } return value; }
[ "public", "String", "getValue", "(", "String", "property", ")", "{", "String", "value", "=", "null", ";", "List", "<", "String", ">", "values", "=", "getValues", "(", "property", ")", ";", "if", "(", "!", "values", ".", "isEmpty", "(", ")", ")", "{", "value", "=", "values", ".", "get", "(", "0", ")", ";", "}", "return", "value", ";", "}" ]
Get the first value for the property @param property property name @return value or null
[ "Get", "the", "first", "value", "for", "the", "property" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L255-L262
6,274
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.hasValue
public boolean hasValue(String property, String value) { boolean hasValue = false; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property, value); TResult result = getDao().queryForFieldValues(fieldValues); try { hasValue = result.getCount() > 0; } finally { result.close(); } } return hasValue; }
java
public boolean hasValue(String property, String value) { boolean hasValue = false; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property, value); TResult result = getDao().queryForFieldValues(fieldValues); try { hasValue = result.getCount() > 0; } finally { result.close(); } } return hasValue; }
[ "public", "boolean", "hasValue", "(", "String", "property", ",", "String", "value", ")", "{", "boolean", "hasValue", "=", "false", ";", "if", "(", "has", "(", ")", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "buildFieldValues", "(", "property", ",", "value", ")", ";", "TResult", "result", "=", "getDao", "(", ")", ".", "queryForFieldValues", "(", "fieldValues", ")", ";", "try", "{", "hasValue", "=", "result", ".", "getCount", "(", ")", ">", "0", ";", "}", "finally", "{", "result", ".", "close", "(", ")", ";", "}", "}", "return", "hasValue", ";", "}" ]
Check if the property has the value @param property property name @param value property value @return true if property has the value
[ "Check", "if", "the", "property", "has", "the", "value" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L284-L296
6,275
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.addValue
public boolean addValue(String property, String value) { if (!has()) { getOrCreate(); } boolean added = false; if (!hasValue(property, value)) { TRow row = newRow(); row.setValue(COLUMN_PROPERTY, property); row.setValue(COLUMN_VALUE, value); getDao().insert(row); added = true; } return added; }
java
public boolean addValue(String property, String value) { if (!has()) { getOrCreate(); } boolean added = false; if (!hasValue(property, value)) { TRow row = newRow(); row.setValue(COLUMN_PROPERTY, property); row.setValue(COLUMN_VALUE, value); getDao().insert(row); added = true; } return added; }
[ "public", "boolean", "addValue", "(", "String", "property", ",", "String", "value", ")", "{", "if", "(", "!", "has", "(", ")", ")", "{", "getOrCreate", "(", ")", ";", "}", "boolean", "added", "=", "false", ";", "if", "(", "!", "hasValue", "(", "property", ",", "value", ")", ")", "{", "TRow", "row", "=", "newRow", "(", ")", ";", "row", ".", "setValue", "(", "COLUMN_PROPERTY", ",", "property", ")", ";", "row", ".", "setValue", "(", "COLUMN_VALUE", ",", "value", ")", ";", "getDao", "(", ")", ".", "insert", "(", "row", ")", ";", "added", "=", "true", ";", "}", "return", "added", ";", "}" ]
Add a property value, creating the extension if needed @param property property name @param value value @return true if added, false if already existed
[ "Add", "a", "property", "value", "creating", "the", "extension", "if", "needed" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L307-L320
6,276
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.deleteProperty
public int deleteProperty(String property) { int count = 0; if (has()) { TDao dao = getDao(); String where = dao.buildWhere(COLUMN_PROPERTY, property); String[] whereArgs = dao.buildWhereArgs(property); count = dao.delete(where, whereArgs); } return count; }
java
public int deleteProperty(String property) { int count = 0; if (has()) { TDao dao = getDao(); String where = dao.buildWhere(COLUMN_PROPERTY, property); String[] whereArgs = dao.buildWhereArgs(property); count = dao.delete(where, whereArgs); } return count; }
[ "public", "int", "deleteProperty", "(", "String", "property", ")", "{", "int", "count", "=", "0", ";", "if", "(", "has", "(", ")", ")", "{", "TDao", "dao", "=", "getDao", "(", ")", ";", "String", "where", "=", "dao", ".", "buildWhere", "(", "COLUMN_PROPERTY", ",", "property", ")", ";", "String", "[", "]", "whereArgs", "=", "dao", ".", "buildWhereArgs", "(", "property", ")", ";", "count", "=", "dao", ".", "delete", "(", "where", ",", "whereArgs", ")", ";", "}", "return", "count", ";", "}" ]
Delete the property and all the property values @param property property name @return deleted values count
[ "Delete", "the", "property", "and", "all", "the", "property", "values" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L329-L338
6,277
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.deleteValue
public int deleteValue(String property, String value) { int count = 0; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property, value); count = getDao().delete(fieldValues); } return count; }
java
public int deleteValue(String property, String value) { int count = 0; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property, value); count = getDao().delete(fieldValues); } return count; }
[ "public", "int", "deleteValue", "(", "String", "property", ",", "String", "value", ")", "{", "int", "count", "=", "0", ";", "if", "(", "has", "(", ")", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "buildFieldValues", "(", "property", ",", "value", ")", ";", "count", "=", "getDao", "(", ")", ".", "delete", "(", "fieldValues", ")", ";", "}", "return", "count", ";", "}" ]
Delete the property value @param property property name @param value property value @return deleted values count
[ "Delete", "the", "property", "value" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L349-L356
6,278
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.buildFieldValues
private Map<String, Object> buildFieldValues(String property, String value) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(COLUMN_PROPERTY, property); fieldValues.put(COLUMN_VALUE, value); return fieldValues; }
java
private Map<String, Object> buildFieldValues(String property, String value) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(COLUMN_PROPERTY, property); fieldValues.put(COLUMN_VALUE, value); return fieldValues; }
[ "private", "Map", "<", "String", ",", "Object", ">", "buildFieldValues", "(", "String", "property", ",", "String", "value", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "fieldValues", ".", "put", "(", "COLUMN_PROPERTY", ",", "property", ")", ";", "fieldValues", ".", "put", "(", "COLUMN_VALUE", ",", "value", ")", ";", "return", "fieldValues", ";", "}" ]
Build field values from the property and value @param property property name @param value property value @return field values mapping
[ "Build", "field", "values", "from", "the", "property", "and", "value" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L387-L392
6,279
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.queryForValues
private TResult queryForValues(String property) { TResult result = null; if (has()) { result = getDao().queryForEq(COLUMN_PROPERTY, property); } return result; }
java
private TResult queryForValues(String property) { TResult result = null; if (has()) { result = getDao().queryForEq(COLUMN_PROPERTY, property); } return result; }
[ "private", "TResult", "queryForValues", "(", "String", "property", ")", "{", "TResult", "result", "=", "null", ";", "if", "(", "has", "(", ")", ")", "{", "result", "=", "getDao", "(", ")", ".", "queryForEq", "(", "COLUMN_PROPERTY", ",", "property", ")", ";", "}", "return", "result", ";", "}" ]
Query for the property values @param property property name @return result
[ "Query", "for", "the", "property", "values" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L401-L407
6,280
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.getValues
private List<String> getValues(UserCoreResult<?, ?, ?> results) { List<String> values = null; if (results != null) { try { if (results.getCount() > 0) { int columnIndex = results.getColumnIndex(COLUMN_VALUE); values = getColumnResults(columnIndex, results); } else { values = new ArrayList<>(); } } finally { results.close(); } } else { values = new ArrayList<>(); } return values; }
java
private List<String> getValues(UserCoreResult<?, ?, ?> results) { List<String> values = null; if (results != null) { try { if (results.getCount() > 0) { int columnIndex = results.getColumnIndex(COLUMN_VALUE); values = getColumnResults(columnIndex, results); } else { values = new ArrayList<>(); } } finally { results.close(); } } else { values = new ArrayList<>(); } return values; }
[ "private", "List", "<", "String", ">", "getValues", "(", "UserCoreResult", "<", "?", ",", "?", ",", "?", ">", "results", ")", "{", "List", "<", "String", ">", "values", "=", "null", ";", "if", "(", "results", "!=", "null", ")", "{", "try", "{", "if", "(", "results", ".", "getCount", "(", ")", ">", "0", ")", "{", "int", "columnIndex", "=", "results", ".", "getColumnIndex", "(", "COLUMN_VALUE", ")", ";", "values", "=", "getColumnResults", "(", "columnIndex", ",", "results", ")", ";", "}", "else", "{", "values", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "}", "finally", "{", "results", ".", "close", "(", ")", ";", "}", "}", "else", "{", "values", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "return", "values", ";", "}" ]
Get the values from the results and close the results @param results results @return list of values
[ "Get", "the", "values", "from", "the", "results", "and", "close", "the", "results" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L416-L435
6,281
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.getColumnResults
private List<String> getColumnResults(int columnIndex, UserCoreResult<?, ?, ?> results) { List<String> values = new ArrayList<>(); while (results.moveToNext()) { values.add(results.getString(columnIndex)); } return values; }
java
private List<String> getColumnResults(int columnIndex, UserCoreResult<?, ?, ?> results) { List<String> values = new ArrayList<>(); while (results.moveToNext()) { values.add(results.getString(columnIndex)); } return values; }
[ "private", "List", "<", "String", ">", "getColumnResults", "(", "int", "columnIndex", ",", "UserCoreResult", "<", "?", ",", "?", ",", "?", ">", "results", ")", "{", "List", "<", "String", ">", "values", "=", "new", "ArrayList", "<>", "(", ")", ";", "while", "(", "results", ".", "moveToNext", "(", ")", ")", "{", "values", ".", "add", "(", "results", ".", "getString", "(", "columnIndex", ")", ")", ";", "}", "return", "values", ";", "}" ]
Get the results of a column at the index and close the results @param columnIndex column index @param results results @return list of column index values
[ "Get", "the", "results", "of", "a", "column", "at", "the", "index", "and", "close", "the", "results" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L446-L455
6,282
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreRow.java
UserCoreRow.copyValue
protected Object copyValue(TColumn column, Object value) { Object copyValue = value; switch (column.getDataType()) { case BLOB: if (value instanceof byte[]) { byte[] bytes = (byte[]) value; copyValue = Arrays.copyOf(bytes, bytes.length); } else { throw new GeoPackageException( "Unsupported copy value type. column: " + column.getName() + ", value type: " + value.getClass().getName() + ", data type: " + column.getDataType()); } break; case DATE: case DATETIME: if (value instanceof Date) { Date date = (Date) value; copyValue = new Date(date.getTime()); } else if (!(value instanceof String)) { throw new GeoPackageException( "Unsupported copy value type. column: " + column.getName() + ", value type: " + value.getClass().getName() + ", data type: " + column.getDataType()); } break; default: }
java
protected Object copyValue(TColumn column, Object value) { Object copyValue = value; switch (column.getDataType()) { case BLOB: if (value instanceof byte[]) { byte[] bytes = (byte[]) value; copyValue = Arrays.copyOf(bytes, bytes.length); } else { throw new GeoPackageException( "Unsupported copy value type. column: " + column.getName() + ", value type: " + value.getClass().getName() + ", data type: " + column.getDataType()); } break; case DATE: case DATETIME: if (value instanceof Date) { Date date = (Date) value; copyValue = new Date(date.getTime()); } else if (!(value instanceof String)) { throw new GeoPackageException( "Unsupported copy value type. column: " + column.getName() + ", value type: " + value.getClass().getName() + ", data type: " + column.getDataType()); } break; default: }
[ "protected", "Object", "copyValue", "(", "TColumn", "column", ",", "Object", "value", ")", "{", "Object", "copyValue", "=", "value", ";", "switch", "(", "column", ".", "getDataType", "(", ")", ")", "{", "case", "BLOB", ":", "if", "(", "value", "instanceof", "byte", "[", "]", ")", "{", "byte", "[", "]", "bytes", "=", "(", "byte", "[", "]", ")", "value", ";", "copyValue", "=", "Arrays", ".", "copyOf", "(", "bytes", ",", "bytes", ".", "length", ")", ";", "}", "else", "{", "throw", "new", "GeoPackageException", "(", "\"Unsupported copy value type. column: \"", "+", "column", ".", "getName", "(", ")", "+", "\", value type: \"", "+", "value", ".", "getClass", "(", ")", ".", "getName", "(", ")", "+", "\", data type: \"", "+", "column", ".", "getDataType", "(", ")", ")", ";", "}", "break", ";", "case", "DATE", ":", "case", "DATETIME", ":", "if", "(", "value", "instanceof", "Date", ")", "{", "Date", "date", "=", "(", "Date", ")", "value", ";", "copyValue", "=", "new", "Date", "(", "date", ".", "getTime", "(", ")", ")", ";", "}", "else", "if", "(", "!", "(", "value", "instanceof", "String", ")", ")", "{", "throw", "new", "GeoPackageException", "(", "\"Unsupported copy value type. column: \"", "+", "column", ".", "getName", "(", ")", "+", "\", value type: \"", "+", "value", ".", "getClass", "(", ")", ".", "getName", "(", ")", "+", "\", data type: \"", "+", "column", ".", "getDataType", "(", ")", ")", ";", "}", "break", ";", "default", ":", "}" ]
Copy the value of the data type @param column table column @param value value @return copy value
[ "Copy", "the", "value", "of", "the", "data", "type" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreRow.java#L98-L131
6,283
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.getGeoPackages
public List<T> getGeoPackages() { List<T> geoPackages = new ArrayList<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { geoPackages.add(properties.getGeoPackage()); } return geoPackages; }
java
public List<T> getGeoPackages() { List<T> geoPackages = new ArrayList<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { geoPackages.add(properties.getGeoPackage()); } return geoPackages; }
[ "public", "List", "<", "T", ">", "getGeoPackages", "(", ")", "{", "List", "<", "T", ">", "geoPackages", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", ":", "propertiesMap", ".", "values", "(", ")", ")", "{", "geoPackages", ".", "add", "(", "properties", ".", "getGeoPackage", "(", ")", ")", ";", "}", "return", "geoPackages", ";", "}" ]
Get the GeoPackages @return collection of GeoPackages
[ "Get", "the", "GeoPackages" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L101-L108
6,284
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.getGeoPackage
public T getGeoPackage(String name) { T geoPackage = null; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(name); if (properties != null) { geoPackage = properties.getGeoPackage(); } return geoPackage; }
java
public T getGeoPackage(String name) { T geoPackage = null; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(name); if (properties != null) { geoPackage = properties.getGeoPackage(); } return geoPackage; }
[ "public", "T", "getGeoPackage", "(", "String", "name", ")", "{", "T", "geoPackage", "=", "null", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "name", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "geoPackage", "=", "properties", ".", "getGeoPackage", "(", ")", ";", "}", "return", "geoPackage", ";", "}" ]
Get the GeoPackage for the GeoPackage name @param name GeoPackage name @return GeoPackage
[ "Get", "the", "GeoPackage", "for", "the", "GeoPackage", "name" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L128-L136
6,285
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.closeGeoPackages
public void closeGeoPackages() { for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { properties.getGeoPackage().close(); } propertiesMap.clear(); }
java
public void closeGeoPackages() { for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { properties.getGeoPackage().close(); } propertiesMap.clear(); }
[ "public", "void", "closeGeoPackages", "(", ")", "{", "for", "(", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", ":", "propertiesMap", ".", "values", "(", ")", ")", "{", "properties", ".", "getGeoPackage", "(", ")", ".", "close", "(", ")", ";", "}", "propertiesMap", ".", "clear", "(", ")", ";", "}" ]
Close all GeoPackages in the manager
[ "Close", "all", "GeoPackages", "in", "the", "manager" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L164-L170
6,286
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.removeGeoPackage
public T removeGeoPackage(String name) { T removed = null; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .remove(name); if (properties != null) { removed = properties.getGeoPackage(); } return removed; }
java
public T removeGeoPackage(String name) { T removed = null; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .remove(name); if (properties != null) { removed = properties.getGeoPackage(); } return removed; }
[ "public", "T", "removeGeoPackage", "(", "String", "name", ")", "{", "T", "removed", "=", "null", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "remove", "(", "name", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "removed", "=", "properties", ".", "getGeoPackage", "(", ")", ";", "}", "return", "removed", ";", "}" ]
Remove the GeoPackage with the name but does not close it @param name GeoPackage name @return removed GeoPackage
[ "Remove", "the", "GeoPackage", "with", "the", "name", "but", "does", "not", "close", "it" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L179-L187
6,287
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.getProperties
public Set<String> getProperties() { Set<String> allProperties = new HashSet<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { allProperties.addAll(properties.getProperties()); } return allProperties; }
java
public Set<String> getProperties() { Set<String> allProperties = new HashSet<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { allProperties.addAll(properties.getProperties()); } return allProperties; }
[ "public", "Set", "<", "String", ">", "getProperties", "(", ")", "{", "Set", "<", "String", ">", "allProperties", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", ":", "propertiesMap", ".", "values", "(", ")", ")", "{", "allProperties", ".", "addAll", "(", "properties", ".", "getProperties", "(", ")", ")", ";", "}", "return", "allProperties", ";", "}" ]
Get the unique properties @return set of properties
[ "Get", "the", "unique", "properties" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L263-L270
6,288
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.getValues
public Set<String> getValues(String property) { Set<String> allValues = new HashSet<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { allValues.addAll(properties.getValues(property)); } return allValues; }
java
public Set<String> getValues(String property) { Set<String> allValues = new HashSet<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { allValues.addAll(properties.getValues(property)); } return allValues; }
[ "public", "Set", "<", "String", ">", "getValues", "(", "String", "property", ")", "{", "Set", "<", "String", ">", "allValues", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", ":", "propertiesMap", ".", "values", "(", ")", ")", "{", "allValues", ".", "addAll", "(", "properties", ".", "getValues", "(", "property", ")", ")", ";", "}", "return", "allValues", ";", "}" ]
Get the unique values for the property @param property property name @return set of values
[ "Get", "the", "unique", "values", "for", "the", "property" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L337-L344
6,289
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.hasValue
public List<T> hasValue(String property, String value) { List<T> geoPackages = new ArrayList<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { if (properties.hasValue(property, value)) { geoPackages.add(properties.getGeoPackage()); } } return geoPackages; }
java
public List<T> hasValue(String property, String value) { List<T> geoPackages = new ArrayList<>(); for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap .values()) { if (properties.hasValue(property, value)) { geoPackages.add(properties.getGeoPackage()); } } return geoPackages; }
[ "public", "List", "<", "T", ">", "hasValue", "(", "String", "property", ",", "String", "value", ")", "{", "List", "<", "T", ">", "geoPackages", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", ":", "propertiesMap", ".", "values", "(", ")", ")", "{", "if", "(", "properties", ".", "hasValue", "(", "property", ",", "value", ")", ")", "{", "geoPackages", ".", "add", "(", "properties", ".", "getGeoPackage", "(", ")", ")", ";", "}", "}", "return", "geoPackages", ";", "}" ]
Get the GeoPackages with the property name and value @param property property name @param value property value @return GeoPackages
[ "Get", "the", "GeoPackages", "with", "the", "property", "name", "and", "value" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L355-L364
6,290
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.addValue
public int addValue(String property, String value) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (addValue(geoPackage, property, value)) { count++; } } return count; }
java
public int addValue(String property, String value) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (addValue(geoPackage, property, value)) { count++; } } return count; }
[ "public", "int", "addValue", "(", "String", "property", ",", "String", "value", ")", "{", "int", "count", "=", "0", ";", "for", "(", "String", "geoPackage", ":", "propertiesMap", ".", "keySet", "(", ")", ")", "{", "if", "(", "addValue", "(", "geoPackage", ",", "property", ",", "value", ")", ")", "{", "count", "++", ";", "}", "}", "return", "count", ";", "}" ]
Add a property value to all GeoPackages @param property property name @param value value @return number of GeoPackages added to
[ "Add", "a", "property", "value", "to", "all", "GeoPackages" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L395-L403
6,291
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.addValue
public boolean addValue(String geoPackage, String property, String value) { boolean added = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { added = properties.addValue(property, value); } return added; }
java
public boolean addValue(String geoPackage, String property, String value) { boolean added = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { added = properties.addValue(property, value); } return added; }
[ "public", "boolean", "addValue", "(", "String", "geoPackage", ",", "String", "property", ",", "String", "value", ")", "{", "boolean", "added", "=", "false", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "geoPackage", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "added", "=", "properties", ".", "addValue", "(", "property", ",", "value", ")", ";", "}", "return", "added", ";", "}" ]
Add a property value to a specified GeoPackage @param geoPackage GeoPackage name @param property property name @param value value @return true if added
[ "Add", "a", "property", "value", "to", "a", "specified", "GeoPackage" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L416-L424
6,292
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteProperty
public int deleteProperty(String property) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteProperty(geoPackage, property)) { count++; } } return count; }
java
public int deleteProperty(String property) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteProperty(geoPackage, property)) { count++; } } return count; }
[ "public", "int", "deleteProperty", "(", "String", "property", ")", "{", "int", "count", "=", "0", ";", "for", "(", "String", "geoPackage", ":", "propertiesMap", ".", "keySet", "(", ")", ")", "{", "if", "(", "deleteProperty", "(", "geoPackage", ",", "property", ")", ")", "{", "count", "++", ";", "}", "}", "return", "count", ";", "}" ]
Delete the property and values from all GeoPackages @param property property name @return number of GeoPackages deleted from
[ "Delete", "the", "property", "and", "values", "from", "all", "GeoPackages" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L433-L441
6,293
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteProperty
public boolean deleteProperty(String geoPackage, String property) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteProperty(property) > 0; } return deleted; }
java
public boolean deleteProperty(String geoPackage, String property) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteProperty(property) > 0; } return deleted; }
[ "public", "boolean", "deleteProperty", "(", "String", "geoPackage", ",", "String", "property", ")", "{", "boolean", "deleted", "=", "false", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "geoPackage", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "deleted", "=", "properties", ".", "deleteProperty", "(", "property", ")", ">", "0", ";", "}", "return", "deleted", ";", "}" ]
Delete the property and values from a specified GeoPackage @param geoPackage GeoPackage name @param property property name @return true if deleted
[ "Delete", "the", "property", "and", "values", "from", "a", "specified", "GeoPackage" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L452-L460
6,294
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteValue
public int deleteValue(String property, String value) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteValue(geoPackage, property, value)) { count++; } } return count; }
java
public int deleteValue(String property, String value) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteValue(geoPackage, property, value)) { count++; } } return count; }
[ "public", "int", "deleteValue", "(", "String", "property", ",", "String", "value", ")", "{", "int", "count", "=", "0", ";", "for", "(", "String", "geoPackage", ":", "propertiesMap", ".", "keySet", "(", ")", ")", "{", "if", "(", "deleteValue", "(", "geoPackage", ",", "property", ",", "value", ")", ")", "{", "count", "++", ";", "}", "}", "return", "count", ";", "}" ]
Delete the property value from all GeoPackages @param property property name @param value property value @return number of GeoPackages deleted from
[ "Delete", "the", "property", "value", "from", "all", "GeoPackages" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L471-L479
6,295
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteValue
public boolean deleteValue(String geoPackage, String property, String value) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteValue(property, value) > 0; } return deleted; }
java
public boolean deleteValue(String geoPackage, String property, String value) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteValue(property, value) > 0; } return deleted; }
[ "public", "boolean", "deleteValue", "(", "String", "geoPackage", ",", "String", "property", ",", "String", "value", ")", "{", "boolean", "deleted", "=", "false", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "geoPackage", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "deleted", "=", "properties", ".", "deleteValue", "(", "property", ",", "value", ")", ">", "0", ";", "}", "return", "deleted", ";", "}" ]
Delete the property value from a specified GeoPackage @param geoPackage GeoPackage name @param property property name @param value property value @return true if deleted
[ "Delete", "the", "property", "value", "from", "a", "specified", "GeoPackage" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L492-L500
6,296
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteAll
public int deleteAll() { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteAll(geoPackage)) { count++; } } return count; }
java
public int deleteAll() { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteAll(geoPackage)) { count++; } } return count; }
[ "public", "int", "deleteAll", "(", ")", "{", "int", "count", "=", "0", ";", "for", "(", "String", "geoPackage", ":", "propertiesMap", ".", "keySet", "(", ")", ")", "{", "if", "(", "deleteAll", "(", "geoPackage", ")", ")", "{", "count", "++", ";", "}", "}", "return", "count", ";", "}" ]
Delete all properties and values from all GeoPackages @return number of GeoPackages deleted from
[ "Delete", "all", "properties", "and", "values", "from", "all", "GeoPackages" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L507-L515
6,297
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteAll
public boolean deleteAll(String geoPackage) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteAll() > 0; } return deleted; }
java
public boolean deleteAll(String geoPackage) { boolean deleted = false; PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { deleted = properties.deleteAll() > 0; } return deleted; }
[ "public", "boolean", "deleteAll", "(", "String", "geoPackage", ")", "{", "boolean", "deleted", "=", "false", ";", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "geoPackage", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "deleted", "=", "properties", ".", "deleteAll", "(", ")", ">", "0", ";", "}", "return", "deleted", ";", "}" ]
Delete all properties and values from a specified GeoPackage @param geoPackage GeoPackage name @return true if any deleted
[ "Delete", "all", "properties", "and", "values", "from", "a", "specified", "GeoPackage" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L524-L532
6,298
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.removeExtension
public void removeExtension(String geoPackage) { PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { properties.removeExtension(); } }
java
public void removeExtension(String geoPackage) { PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap .get(geoPackage); if (properties != null) { properties.removeExtension(); } }
[ "public", "void", "removeExtension", "(", "String", "geoPackage", ")", "{", "PropertiesCoreExtension", "<", "T", ",", "?", ",", "?", ",", "?", ">", "properties", "=", "propertiesMap", ".", "get", "(", "geoPackage", ")", ";", "if", "(", "properties", "!=", "null", ")", "{", "properties", ".", "removeExtension", "(", ")", ";", "}", "}" ]
Remove the extension from a specified GeoPackage @param geoPackage GeoPackage name
[ "Remove", "the", "extension", "from", "a", "specified", "GeoPackage" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L549-L555
6,299
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java
GeoPackageCoreConnection.addColumn
public void addColumn(String tableName, String columnName, String columnDef) { execSQL("ALTER TABLE " + CoreSQLUtils.quoteWrap(tableName) + " ADD COLUMN " + CoreSQLUtils.quoteWrap(columnName) + " " + columnDef + ";"); }
java
public void addColumn(String tableName, String columnName, String columnDef) { execSQL("ALTER TABLE " + CoreSQLUtils.quoteWrap(tableName) + " ADD COLUMN " + CoreSQLUtils.quoteWrap(columnName) + " " + columnDef + ";"); }
[ "public", "void", "addColumn", "(", "String", "tableName", ",", "String", "columnName", ",", "String", "columnDef", ")", "{", "execSQL", "(", "\"ALTER TABLE \"", "+", "CoreSQLUtils", ".", "quoteWrap", "(", "tableName", ")", "+", "\" ADD COLUMN \"", "+", "CoreSQLUtils", ".", "quoteWrap", "(", "columnName", ")", "+", "\" \"", "+", "columnDef", "+", "\";\"", ")", ";", "}" ]
Add a new column to the table @param tableName table name @param columnName column name @param columnDef column definition @since 1.1.8
[ "Add", "a", "new", "column", "to", "the", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java#L158-L162