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,400 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteFeatureTileLink
|
public static void deleteFeatureTileLink(GeoPackageCore geoPackage,
String table) {
FeatureTileLinkDao featureTileLinkDao = geoPackage
.getFeatureTileLinkDao();
try {
if (featureTileLinkDao.isTableExists()) {
featureTileLinkDao.deleteByTableName(table);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Feature Tile Link. GeoPackage: "
+ geoPackage.getName() + ", Table: " + table, e);
}
}
|
java
|
public static void deleteFeatureTileLink(GeoPackageCore geoPackage,
String table) {
FeatureTileLinkDao featureTileLinkDao = geoPackage
.getFeatureTileLinkDao();
try {
if (featureTileLinkDao.isTableExists()) {
featureTileLinkDao.deleteByTableName(table);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Feature Tile Link. GeoPackage: "
+ geoPackage.getName() + ", Table: " + table, e);
}
}
|
[
"public",
"static",
"void",
"deleteFeatureTileLink",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"FeatureTileLinkDao",
"featureTileLinkDao",
"=",
"geoPackage",
".",
"getFeatureTileLinkDao",
"(",
")",
";",
"try",
"{",
"if",
"(",
"featureTileLinkDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"featureTileLinkDao",
".",
"deleteByTableName",
"(",
"table",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete Feature Tile Link. GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
"+",
"\", Table: \"",
"+",
"table",
",",
"e",
")",
";",
"}",
"}"
] |
Delete the Feature Tile Link extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 1.1.5
|
[
"Delete",
"the",
"Feature",
"Tile",
"Link",
"extensions",
"for",
"the",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L141-L155
|
6,401 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteFeatureTileLinkExtension
|
public static void deleteFeatureTileLinkExtension(GeoPackageCore geoPackage) {
FeatureTileLinkDao featureTileLinkDao = geoPackage
.getFeatureTileLinkDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (featureTileLinkDao.isTableExists()) {
geoPackage.dropTable(featureTileLinkDao.getTableName());
}
if (extensionsDao.isTableExists()) {
extensionsDao
.deleteByExtension(FeatureTileTableCoreLinker.EXTENSION_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Feature Tile Link extension and table. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
java
|
public static void deleteFeatureTileLinkExtension(GeoPackageCore geoPackage) {
FeatureTileLinkDao featureTileLinkDao = geoPackage
.getFeatureTileLinkDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (featureTileLinkDao.isTableExists()) {
geoPackage.dropTable(featureTileLinkDao.getTableName());
}
if (extensionsDao.isTableExists()) {
extensionsDao
.deleteByExtension(FeatureTileTableCoreLinker.EXTENSION_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Feature Tile Link extension and table. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
[
"public",
"static",
"void",
"deleteFeatureTileLinkExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"FeatureTileLinkDao",
"featureTileLinkDao",
"=",
"geoPackage",
".",
"getFeatureTileLinkDao",
"(",
")",
";",
"ExtensionsDao",
"extensionsDao",
"=",
"geoPackage",
".",
"getExtensionsDao",
"(",
")",
";",
"try",
"{",
"if",
"(",
"featureTileLinkDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"geoPackage",
".",
"dropTable",
"(",
"featureTileLinkDao",
".",
"getTableName",
"(",
")",
")",
";",
"}",
"if",
"(",
"extensionsDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"extensionsDao",
".",
"deleteByExtension",
"(",
"FeatureTileTableCoreLinker",
".",
"EXTENSION_NAME",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete Feature Tile Link extension and table. GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
Delete the Feature Tile Link extension including the extension entries
and custom tables
@param geoPackage
GeoPackage
@since 3.2.0
|
[
"Delete",
"the",
"Feature",
"Tile",
"Link",
"extension",
"including",
"the",
"extension",
"entries",
"and",
"custom",
"tables"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L165-L184
|
6,402 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteTileScaling
|
public static void deleteTileScaling(GeoPackageCore geoPackage, String table) {
TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
tileScalingDao.deleteById(table);
}
if (extensionsDao.isTableExists()) {
extensionsDao.deleteByExtension(
TileTableScaling.EXTENSION_NAME, table);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Tile Scaling. GeoPackage: "
+ geoPackage.getName() + ", Table: " + table, e);
}
}
|
java
|
public static void deleteTileScaling(GeoPackageCore geoPackage, String table) {
TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
tileScalingDao.deleteById(table);
}
if (extensionsDao.isTableExists()) {
extensionsDao.deleteByExtension(
TileTableScaling.EXTENSION_NAME, table);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Tile Scaling. GeoPackage: "
+ geoPackage.getName() + ", Table: " + table, e);
}
}
|
[
"public",
"static",
"void",
"deleteTileScaling",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"TileScalingDao",
"tileScalingDao",
"=",
"geoPackage",
".",
"getTileScalingDao",
"(",
")",
";",
"ExtensionsDao",
"extensionsDao",
"=",
"geoPackage",
".",
"getExtensionsDao",
"(",
")",
";",
"try",
"{",
"if",
"(",
"tileScalingDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"tileScalingDao",
".",
"deleteById",
"(",
"table",
")",
";",
"}",
"if",
"(",
"extensionsDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"extensionsDao",
".",
"deleteByExtension",
"(",
"TileTableScaling",
".",
"EXTENSION_NAME",
",",
"table",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete Tile Scaling. GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
"+",
"\", Table: \"",
"+",
"table",
",",
"e",
")",
";",
"}",
"}"
] |
Delete the Tile Scaling extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 2.0.2
|
[
"Delete",
"the",
"Tile",
"Scaling",
"extensions",
"for",
"the",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L195-L213
|
6,403 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteTileScalingExtension
|
public static void deleteTileScalingExtension(GeoPackageCore geoPackage) {
TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
geoPackage.dropTable(tileScalingDao.getTableName());
}
if (extensionsDao.isTableExists()) {
extensionsDao
.deleteByExtension(TileTableScaling.EXTENSION_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Tile Scaling extension and table. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
java
|
public static void deleteTileScalingExtension(GeoPackageCore geoPackage) {
TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
geoPackage.dropTable(tileScalingDao.getTableName());
}
if (extensionsDao.isTableExists()) {
extensionsDao
.deleteByExtension(TileTableScaling.EXTENSION_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Tile Scaling extension and table. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
[
"public",
"static",
"void",
"deleteTileScalingExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"TileScalingDao",
"tileScalingDao",
"=",
"geoPackage",
".",
"getTileScalingDao",
"(",
")",
";",
"ExtensionsDao",
"extensionsDao",
"=",
"geoPackage",
".",
"getExtensionsDao",
"(",
")",
";",
"try",
"{",
"if",
"(",
"tileScalingDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"geoPackage",
".",
"dropTable",
"(",
"tileScalingDao",
".",
"getTableName",
"(",
")",
")",
";",
"}",
"if",
"(",
"extensionsDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"extensionsDao",
".",
"deleteByExtension",
"(",
"TileTableScaling",
".",
"EXTENSION_NAME",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete Tile Scaling extension and table. GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
Delete the Tile Scaling extension including the extension entries and
custom tables
@param geoPackage
GeoPackage
@since 3.2.0
|
[
"Delete",
"the",
"Tile",
"Scaling",
"extension",
"including",
"the",
"extension",
"entries",
"and",
"custom",
"tables"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L223-L241
|
6,404 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteProperties
|
public static void deleteProperties(GeoPackageCore geoPackage, String table) {
if (table.equalsIgnoreCase(PropertiesCoreExtension.TABLE_NAME)) {
deletePropertiesExtension(geoPackage);
}
}
|
java
|
public static void deleteProperties(GeoPackageCore geoPackage, String table) {
if (table.equalsIgnoreCase(PropertiesCoreExtension.TABLE_NAME)) {
deletePropertiesExtension(geoPackage);
}
}
|
[
"public",
"static",
"void",
"deleteProperties",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"if",
"(",
"table",
".",
"equalsIgnoreCase",
"(",
"PropertiesCoreExtension",
".",
"TABLE_NAME",
")",
")",
"{",
"deletePropertiesExtension",
"(",
"geoPackage",
")",
";",
"}",
"}"
] |
Delete the Properties extension if the deleted table is the properties
table
@param geoPackage
GeoPackage
@param table
table name
@since 3.2.0
|
[
"Delete",
"the",
"Properties",
"extension",
"if",
"the",
"deleted",
"table",
"is",
"the",
"properties",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L253-L259
|
6,405 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deletePropertiesExtension
|
public static void deletePropertiesExtension(GeoPackageCore geoPackage) {
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
if (geoPackage.isTable(PropertiesCoreExtension.TABLE_NAME)) {
ContentsDao contentsDao = geoPackage.getContentsDao();
contentsDao.deleteTable(PropertiesCoreExtension.TABLE_NAME);
}
try {
if (extensionsDao.isTableExists()) {
extensionsDao.deleteByExtension(
PropertiesCoreExtension.EXTENSION_NAME,
PropertiesCoreExtension.TABLE_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Properties extension. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
java
|
public static void deletePropertiesExtension(GeoPackageCore geoPackage) {
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
if (geoPackage.isTable(PropertiesCoreExtension.TABLE_NAME)) {
ContentsDao contentsDao = geoPackage.getContentsDao();
contentsDao.deleteTable(PropertiesCoreExtension.TABLE_NAME);
}
try {
if (extensionsDao.isTableExists()) {
extensionsDao.deleteByExtension(
PropertiesCoreExtension.EXTENSION_NAME,
PropertiesCoreExtension.TABLE_NAME);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete Properties extension. GeoPackage: "
+ geoPackage.getName(), e);
}
}
|
[
"public",
"static",
"void",
"deletePropertiesExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"ExtensionsDao",
"extensionsDao",
"=",
"geoPackage",
".",
"getExtensionsDao",
"(",
")",
";",
"if",
"(",
"geoPackage",
".",
"isTable",
"(",
"PropertiesCoreExtension",
".",
"TABLE_NAME",
")",
")",
"{",
"ContentsDao",
"contentsDao",
"=",
"geoPackage",
".",
"getContentsDao",
"(",
")",
";",
"contentsDao",
".",
"deleteTable",
"(",
"PropertiesCoreExtension",
".",
"TABLE_NAME",
")",
";",
"}",
"try",
"{",
"if",
"(",
"extensionsDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"extensionsDao",
".",
"deleteByExtension",
"(",
"PropertiesCoreExtension",
".",
"EXTENSION_NAME",
",",
"PropertiesCoreExtension",
".",
"TABLE_NAME",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete Properties extension. GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] |
Delete the properties extension from the GeoPackage
@param geoPackage
GeoPackage
@since 3.0.2
|
[
"Delete",
"the",
"properties",
"extension",
"from",
"the",
"GeoPackage"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L268-L289
|
6,406 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteFeatureStyle
|
public static void deleteFeatureStyle(GeoPackageCore geoPackage,
String table) {
FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
if (featureStyleExtension.has(table)) {
featureStyleExtension.deleteRelationships(table);
}
}
|
java
|
public static void deleteFeatureStyle(GeoPackageCore geoPackage,
String table) {
FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
if (featureStyleExtension.has(table)) {
featureStyleExtension.deleteRelationships(table);
}
}
|
[
"public",
"static",
"void",
"deleteFeatureStyle",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"FeatureCoreStyleExtension",
"featureStyleExtension",
"=",
"getFeatureStyleExtension",
"(",
"geoPackage",
")",
";",
"if",
"(",
"featureStyleExtension",
".",
"has",
"(",
"table",
")",
")",
"{",
"featureStyleExtension",
".",
"deleteRelationships",
"(",
"table",
")",
";",
"}",
"}"
] |
Delete the Feature Style extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 3.2.0
|
[
"Delete",
"the",
"Feature",
"Style",
"extensions",
"for",
"the",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L300-L308
|
6,407 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteFeatureStyleExtension
|
public static void deleteFeatureStyleExtension(GeoPackageCore geoPackage) {
FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
if (featureStyleExtension.has()) {
featureStyleExtension.removeExtension();
}
}
|
java
|
public static void deleteFeatureStyleExtension(GeoPackageCore geoPackage) {
FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
if (featureStyleExtension.has()) {
featureStyleExtension.removeExtension();
}
}
|
[
"public",
"static",
"void",
"deleteFeatureStyleExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"FeatureCoreStyleExtension",
"featureStyleExtension",
"=",
"getFeatureStyleExtension",
"(",
"geoPackage",
")",
";",
"if",
"(",
"featureStyleExtension",
".",
"has",
"(",
")",
")",
"{",
"featureStyleExtension",
".",
"removeExtension",
"(",
")",
";",
"}",
"}"
] |
Delete the Feature Style extension including the extension entries and
custom tables
@param geoPackage
GeoPackage
@since 3.2.0
|
[
"Delete",
"the",
"Feature",
"Style",
"extension",
"including",
"the",
"extension",
"entries",
"and",
"custom",
"tables"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L318-L325
|
6,408 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.getFeatureStyleExtension
|
private static FeatureCoreStyleExtension getFeatureStyleExtension(
GeoPackageCore geoPackage) {
RelatedTablesCoreExtension relatedTables = new RelatedTablesCoreExtension(
geoPackage) {
@Override
public String getPrimaryKeyColumnName(String tableName) {
return null;
}
};
return new FeatureCoreStyleExtension(geoPackage, relatedTables) {
};
}
|
java
|
private static FeatureCoreStyleExtension getFeatureStyleExtension(
GeoPackageCore geoPackage) {
RelatedTablesCoreExtension relatedTables = new RelatedTablesCoreExtension(
geoPackage) {
@Override
public String getPrimaryKeyColumnName(String tableName) {
return null;
}
};
return new FeatureCoreStyleExtension(geoPackage, relatedTables) {
};
}
|
[
"private",
"static",
"FeatureCoreStyleExtension",
"getFeatureStyleExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"RelatedTablesCoreExtension",
"relatedTables",
"=",
"new",
"RelatedTablesCoreExtension",
"(",
"geoPackage",
")",
"{",
"@",
"Override",
"public",
"String",
"getPrimaryKeyColumnName",
"(",
"String",
"tableName",
")",
"{",
"return",
"null",
";",
"}",
"}",
";",
"return",
"new",
"FeatureCoreStyleExtension",
"(",
"geoPackage",
",",
"relatedTables",
")",
"{",
"}",
";",
"}"
] |
Get a Feature Style Extension used only for deletions
@param geoPackage
GeoPackage
@return Feature Style Extension
|
[
"Get",
"a",
"Feature",
"Style",
"Extension",
"used",
"only",
"for",
"deletions"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L334-L347
|
6,409 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteContentsId
|
public static void deleteContentsId(GeoPackageCore geoPackage, String table) {
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsIdExtension.has()) {
contentsIdExtension.delete(table);
}
}
|
java
|
public static void deleteContentsId(GeoPackageCore geoPackage, String table) {
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsIdExtension.has()) {
contentsIdExtension.delete(table);
}
}
|
[
"public",
"static",
"void",
"deleteContentsId",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"table",
")",
"{",
"ContentsIdExtension",
"contentsIdExtension",
"=",
"new",
"ContentsIdExtension",
"(",
"geoPackage",
")",
";",
"if",
"(",
"contentsIdExtension",
".",
"has",
"(",
")",
")",
"{",
"contentsIdExtension",
".",
"delete",
"(",
"table",
")",
";",
"}",
"}"
] |
Delete the Contents Id extensions for the table
@param geoPackage
GeoPackage
@param table
table name
@since 3.2.0
|
[
"Delete",
"the",
"Contents",
"Id",
"extensions",
"for",
"the",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L358-L366
|
6,410 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
|
NGAExtensions.deleteContentsIdExtension
|
public static void deleteContentsIdExtension(GeoPackageCore geoPackage) {
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsIdExtension.has()) {
contentsIdExtension.removeExtension();
}
}
|
java
|
public static void deleteContentsIdExtension(GeoPackageCore geoPackage) {
ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
geoPackage);
if (contentsIdExtension.has()) {
contentsIdExtension.removeExtension();
}
}
|
[
"public",
"static",
"void",
"deleteContentsIdExtension",
"(",
"GeoPackageCore",
"geoPackage",
")",
"{",
"ContentsIdExtension",
"contentsIdExtension",
"=",
"new",
"ContentsIdExtension",
"(",
"geoPackage",
")",
";",
"if",
"(",
"contentsIdExtension",
".",
"has",
"(",
")",
")",
"{",
"contentsIdExtension",
".",
"removeExtension",
"(",
")",
";",
"}",
"}"
] |
Delete the Contents Id extension including the extension entries and
custom tables
@param geoPackage
GeoPackage
@since 3.2.0
|
[
"Delete",
"the",
"Contents",
"Id",
"extension",
"including",
"the",
"extension",
"entries",
"and",
"custom",
"tables"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L376-L384
|
6,411 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.buildEnvelope
|
public static GeometryEnvelope buildEnvelope(BoundingBox boundingBox) {
GeometryEnvelope envelope = new GeometryEnvelope();
envelope.setMinX(boundingBox.getMinLongitude());
envelope.setMaxX(boundingBox.getMaxLongitude());
envelope.setMinY(boundingBox.getMinLatitude());
envelope.setMaxY(boundingBox.getMaxLatitude());
return envelope;
}
|
java
|
public static GeometryEnvelope buildEnvelope(BoundingBox boundingBox) {
GeometryEnvelope envelope = new GeometryEnvelope();
envelope.setMinX(boundingBox.getMinLongitude());
envelope.setMaxX(boundingBox.getMaxLongitude());
envelope.setMinY(boundingBox.getMinLatitude());
envelope.setMaxY(boundingBox.getMaxLatitude());
return envelope;
}
|
[
"public",
"static",
"GeometryEnvelope",
"buildEnvelope",
"(",
"BoundingBox",
"boundingBox",
")",
"{",
"GeometryEnvelope",
"envelope",
"=",
"new",
"GeometryEnvelope",
"(",
")",
";",
"envelope",
".",
"setMinX",
"(",
"boundingBox",
".",
"getMinLongitude",
"(",
")",
")",
";",
"envelope",
".",
"setMaxX",
"(",
"boundingBox",
".",
"getMaxLongitude",
"(",
")",
")",
";",
"envelope",
".",
"setMinY",
"(",
"boundingBox",
".",
"getMinLatitude",
"(",
")",
")",
";",
"envelope",
".",
"setMaxY",
"(",
"boundingBox",
".",
"getMaxLatitude",
"(",
")",
")",
";",
"return",
"envelope",
";",
"}"
] |
Build a Geometry Envelope from the bounding box
@param boundingBox
bounding box
@return geometry envelope
@since 3.2.0
|
[
"Build",
"a",
"Geometry",
"Envelope",
"from",
"the",
"bounding",
"box"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L186-L193
|
6,412 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.complementary
|
public BoundingBox complementary(double maxProjectionLongitude) {
BoundingBox complementary = null;
Double adjust = null;
if (this.maxLongitude > maxProjectionLongitude) {
if (this.minLongitude >= -maxProjectionLongitude) {
adjust = -2 * maxProjectionLongitude;
}
} else if (this.minLongitude < -maxProjectionLongitude) {
if (this.maxLongitude <= maxProjectionLongitude) {
adjust = 2 * maxProjectionLongitude;
}
}
if (adjust != null) {
complementary = new BoundingBox(this);
complementary.setMinLongitude(complementary.getMinLongitude()
+ adjust);
complementary.setMaxLongitude(complementary.getMaxLongitude()
+ adjust);
}
return complementary;
}
|
java
|
public BoundingBox complementary(double maxProjectionLongitude) {
BoundingBox complementary = null;
Double adjust = null;
if (this.maxLongitude > maxProjectionLongitude) {
if (this.minLongitude >= -maxProjectionLongitude) {
adjust = -2 * maxProjectionLongitude;
}
} else if (this.minLongitude < -maxProjectionLongitude) {
if (this.maxLongitude <= maxProjectionLongitude) {
adjust = 2 * maxProjectionLongitude;
}
}
if (adjust != null) {
complementary = new BoundingBox(this);
complementary.setMinLongitude(complementary.getMinLongitude()
+ adjust);
complementary.setMaxLongitude(complementary.getMaxLongitude()
+ adjust);
}
return complementary;
}
|
[
"public",
"BoundingBox",
"complementary",
"(",
"double",
"maxProjectionLongitude",
")",
"{",
"BoundingBox",
"complementary",
"=",
"null",
";",
"Double",
"adjust",
"=",
"null",
";",
"if",
"(",
"this",
".",
"maxLongitude",
">",
"maxProjectionLongitude",
")",
"{",
"if",
"(",
"this",
".",
"minLongitude",
">=",
"-",
"maxProjectionLongitude",
")",
"{",
"adjust",
"=",
"-",
"2",
"*",
"maxProjectionLongitude",
";",
"}",
"}",
"else",
"if",
"(",
"this",
".",
"minLongitude",
"<",
"-",
"maxProjectionLongitude",
")",
"{",
"if",
"(",
"this",
".",
"maxLongitude",
"<=",
"maxProjectionLongitude",
")",
"{",
"adjust",
"=",
"2",
"*",
"maxProjectionLongitude",
";",
"}",
"}",
"if",
"(",
"adjust",
"!=",
"null",
")",
"{",
"complementary",
"=",
"new",
"BoundingBox",
"(",
"this",
")",
";",
"complementary",
".",
"setMinLongitude",
"(",
"complementary",
".",
"getMinLongitude",
"(",
")",
"+",
"adjust",
")",
";",
"complementary",
".",
"setMaxLongitude",
"(",
"complementary",
".",
"getMaxLongitude",
"(",
")",
"+",
"adjust",
")",
";",
"}",
"return",
"complementary",
";",
"}"
] |
If the bounding box spans the Anti-Meridian, attempt to get a
complementary bounding box using the max longitude of the unit projection
@param maxProjectionLongitude
max longitude of the world for the current bounding box units
@return complementary bounding box or nil if none
@since 2.0.0
|
[
"If",
"the",
"bounding",
"box",
"spans",
"the",
"Anti",
"-",
"Meridian",
"attempt",
"to",
"get",
"a",
"complementary",
"bounding",
"box",
"using",
"the",
"max",
"longitude",
"of",
"the",
"unit",
"projection"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L205-L230
|
6,413 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.boundCoordinates
|
public BoundingBox boundCoordinates(double maxProjectionLongitude) {
BoundingBox bounded = new BoundingBox(this);
double minLongitude = (getMinLongitude() + maxProjectionLongitude)
% (2 * maxProjectionLongitude) - maxProjectionLongitude;
double maxLongitude = (getMaxLongitude() + maxProjectionLongitude)
% (2 * maxProjectionLongitude) - maxProjectionLongitude;
bounded.setMinLongitude(minLongitude);
bounded.setMaxLongitude(maxLongitude);
return bounded;
}
|
java
|
public BoundingBox boundCoordinates(double maxProjectionLongitude) {
BoundingBox bounded = new BoundingBox(this);
double minLongitude = (getMinLongitude() + maxProjectionLongitude)
% (2 * maxProjectionLongitude) - maxProjectionLongitude;
double maxLongitude = (getMaxLongitude() + maxProjectionLongitude)
% (2 * maxProjectionLongitude) - maxProjectionLongitude;
bounded.setMinLongitude(minLongitude);
bounded.setMaxLongitude(maxLongitude);
return bounded;
}
|
[
"public",
"BoundingBox",
"boundCoordinates",
"(",
"double",
"maxProjectionLongitude",
")",
"{",
"BoundingBox",
"bounded",
"=",
"new",
"BoundingBox",
"(",
"this",
")",
";",
"double",
"minLongitude",
"=",
"(",
"getMinLongitude",
"(",
")",
"+",
"maxProjectionLongitude",
")",
"%",
"(",
"2",
"*",
"maxProjectionLongitude",
")",
"-",
"maxProjectionLongitude",
";",
"double",
"maxLongitude",
"=",
"(",
"getMaxLongitude",
"(",
")",
"+",
"maxProjectionLongitude",
")",
"%",
"(",
"2",
"*",
"maxProjectionLongitude",
")",
"-",
"maxProjectionLongitude",
";",
"bounded",
".",
"setMinLongitude",
"(",
"minLongitude",
")",
";",
"bounded",
".",
"setMaxLongitude",
"(",
"maxLongitude",
")",
";",
"return",
"bounded",
";",
"}"
] |
Bound the bounding box longitudes within the min and max possible
projection values. This may result in a max longitude numerically lower
than the min longitude.
@param maxProjectionLongitude
max longitude of the world for the current bounding box units
@return bounded bounding box
@since 2.0.0
|
[
"Bound",
"the",
"bounding",
"box",
"longitudes",
"within",
"the",
"min",
"and",
"max",
"possible",
"projection",
"values",
".",
"This",
"may",
"result",
"in",
"a",
"max",
"longitude",
"numerically",
"lower",
"than",
"the",
"min",
"longitude",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L264-L277
|
6,414 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.expandCoordinates
|
public BoundingBox expandCoordinates(double maxProjectionLongitude) {
BoundingBox expanded = new BoundingBox(this);
double minLongitude = getMinLongitude();
double maxLongitude = getMaxLongitude();
if (minLongitude > maxLongitude) {
int worldWraps = 1 + (int) ((minLongitude - maxLongitude) / (2 * maxProjectionLongitude));
maxLongitude += (worldWraps * 2 * maxProjectionLongitude);
expanded.setMaxLongitude(maxLongitude);
}
return expanded;
}
|
java
|
public BoundingBox expandCoordinates(double maxProjectionLongitude) {
BoundingBox expanded = new BoundingBox(this);
double minLongitude = getMinLongitude();
double maxLongitude = getMaxLongitude();
if (minLongitude > maxLongitude) {
int worldWraps = 1 + (int) ((minLongitude - maxLongitude) / (2 * maxProjectionLongitude));
maxLongitude += (worldWraps * 2 * maxProjectionLongitude);
expanded.setMaxLongitude(maxLongitude);
}
return expanded;
}
|
[
"public",
"BoundingBox",
"expandCoordinates",
"(",
"double",
"maxProjectionLongitude",
")",
"{",
"BoundingBox",
"expanded",
"=",
"new",
"BoundingBox",
"(",
"this",
")",
";",
"double",
"minLongitude",
"=",
"getMinLongitude",
"(",
")",
";",
"double",
"maxLongitude",
"=",
"getMaxLongitude",
"(",
")",
";",
"if",
"(",
"minLongitude",
">",
"maxLongitude",
")",
"{",
"int",
"worldWraps",
"=",
"1",
"+",
"(",
"int",
")",
"(",
"(",
"minLongitude",
"-",
"maxLongitude",
")",
"/",
"(",
"2",
"*",
"maxProjectionLongitude",
")",
")",
";",
"maxLongitude",
"+=",
"(",
"worldWraps",
"*",
"2",
"*",
"maxProjectionLongitude",
")",
";",
"expanded",
".",
"setMaxLongitude",
"(",
"maxLongitude",
")",
";",
"}",
"return",
"expanded",
";",
"}"
] |
Expand the bounding box max longitude above the max possible projection
value if needed to create a bounding box where the max longitude is
numerically larger than the min longitude.
@param maxProjectionLongitude
max longitude of the world for the current bounding box units
@return expanded bounding box
@since 2.0.0
|
[
"Expand",
"the",
"bounding",
"box",
"max",
"longitude",
"above",
"the",
"max",
"possible",
"projection",
"value",
"if",
"needed",
"to",
"create",
"a",
"bounding",
"box",
"where",
"the",
"max",
"longitude",
"is",
"numerically",
"larger",
"than",
"the",
"min",
"longitude",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L309-L323
|
6,415 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.transform
|
public BoundingBox transform(ProjectionTransform transform) {
BoundingBox transformed = this;
if (transform.isSameProjection()) {
transformed = new BoundingBox(transformed);
} else {
if (transform.getFromProjection().isUnit(Units.DEGREES)) {
transformed = TileBoundingBoxUtils
.boundDegreesBoundingBoxWithWebMercatorLimits(transformed);
}
GeometryEnvelope envelope = buildEnvelope(transformed);
GeometryEnvelope transformedEnvelope = transform
.transform(envelope);
transformed = new BoundingBox(transformedEnvelope);
}
return transformed;
}
|
java
|
public BoundingBox transform(ProjectionTransform transform) {
BoundingBox transformed = this;
if (transform.isSameProjection()) {
transformed = new BoundingBox(transformed);
} else {
if (transform.getFromProjection().isUnit(Units.DEGREES)) {
transformed = TileBoundingBoxUtils
.boundDegreesBoundingBoxWithWebMercatorLimits(transformed);
}
GeometryEnvelope envelope = buildEnvelope(transformed);
GeometryEnvelope transformedEnvelope = transform
.transform(envelope);
transformed = new BoundingBox(transformedEnvelope);
}
return transformed;
}
|
[
"public",
"BoundingBox",
"transform",
"(",
"ProjectionTransform",
"transform",
")",
"{",
"BoundingBox",
"transformed",
"=",
"this",
";",
"if",
"(",
"transform",
".",
"isSameProjection",
"(",
")",
")",
"{",
"transformed",
"=",
"new",
"BoundingBox",
"(",
"transformed",
")",
";",
"}",
"else",
"{",
"if",
"(",
"transform",
".",
"getFromProjection",
"(",
")",
".",
"isUnit",
"(",
"Units",
".",
"DEGREES",
")",
")",
"{",
"transformed",
"=",
"TileBoundingBoxUtils",
".",
"boundDegreesBoundingBoxWithWebMercatorLimits",
"(",
"transformed",
")",
";",
"}",
"GeometryEnvelope",
"envelope",
"=",
"buildEnvelope",
"(",
"transformed",
")",
";",
"GeometryEnvelope",
"transformedEnvelope",
"=",
"transform",
".",
"transform",
"(",
"envelope",
")",
";",
"transformed",
"=",
"new",
"BoundingBox",
"(",
"transformedEnvelope",
")",
";",
"}",
"return",
"transformed",
";",
"}"
] |
Transform the bounding box using the provided projection transform
@param transform
projection transform
@return transformed bounding box
@since 3.0.0
|
[
"Transform",
"the",
"bounding",
"box",
"using",
"the",
"provided",
"projection",
"transform"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L357-L372
|
6,416 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.overlap
|
public BoundingBox overlap(BoundingBox boundingBox, boolean allowEmpty) {
double minLongitude = Math.max(getMinLongitude(),
boundingBox.getMinLongitude());
double maxLongitude = Math.min(getMaxLongitude(),
boundingBox.getMaxLongitude());
double minLatitude = Math.max(getMinLatitude(),
boundingBox.getMinLatitude());
double maxLatitude = Math.min(getMaxLatitude(),
boundingBox.getMaxLatitude());
BoundingBox overlap = null;
if ((minLongitude < maxLongitude && minLatitude < maxLatitude)
|| (allowEmpty && minLongitude <= maxLongitude && minLatitude <= maxLatitude)) {
overlap = new BoundingBox(minLongitude, minLatitude, maxLongitude,
maxLatitude);
}
return overlap;
}
|
java
|
public BoundingBox overlap(BoundingBox boundingBox, boolean allowEmpty) {
double minLongitude = Math.max(getMinLongitude(),
boundingBox.getMinLongitude());
double maxLongitude = Math.min(getMaxLongitude(),
boundingBox.getMaxLongitude());
double minLatitude = Math.max(getMinLatitude(),
boundingBox.getMinLatitude());
double maxLatitude = Math.min(getMaxLatitude(),
boundingBox.getMaxLatitude());
BoundingBox overlap = null;
if ((minLongitude < maxLongitude && minLatitude < maxLatitude)
|| (allowEmpty && minLongitude <= maxLongitude && minLatitude <= maxLatitude)) {
overlap = new BoundingBox(minLongitude, minLatitude, maxLongitude,
maxLatitude);
}
return overlap;
}
|
[
"public",
"BoundingBox",
"overlap",
"(",
"BoundingBox",
"boundingBox",
",",
"boolean",
"allowEmpty",
")",
"{",
"double",
"minLongitude",
"=",
"Math",
".",
"max",
"(",
"getMinLongitude",
"(",
")",
",",
"boundingBox",
".",
"getMinLongitude",
"(",
")",
")",
";",
"double",
"maxLongitude",
"=",
"Math",
".",
"min",
"(",
"getMaxLongitude",
"(",
")",
",",
"boundingBox",
".",
"getMaxLongitude",
"(",
")",
")",
";",
"double",
"minLatitude",
"=",
"Math",
".",
"max",
"(",
"getMinLatitude",
"(",
")",
",",
"boundingBox",
".",
"getMinLatitude",
"(",
")",
")",
";",
"double",
"maxLatitude",
"=",
"Math",
".",
"min",
"(",
"getMaxLatitude",
"(",
")",
",",
"boundingBox",
".",
"getMaxLatitude",
"(",
")",
")",
";",
"BoundingBox",
"overlap",
"=",
"null",
";",
"if",
"(",
"(",
"minLongitude",
"<",
"maxLongitude",
"&&",
"minLatitude",
"<",
"maxLatitude",
")",
"||",
"(",
"allowEmpty",
"&&",
"minLongitude",
"<=",
"maxLongitude",
"&&",
"minLatitude",
"<=",
"maxLatitude",
")",
")",
"{",
"overlap",
"=",
"new",
"BoundingBox",
"(",
"minLongitude",
",",
"minLatitude",
",",
"maxLongitude",
",",
"maxLatitude",
")",
";",
"}",
"return",
"overlap",
";",
"}"
] |
Get the overlapping bounding box with the provided bounding box
@param boundingBox
bounding box
@param allowEmpty
allow empty ranges when determining overlap
@return bounding box
@since 3.1.0
|
[
"Get",
"the",
"overlapping",
"bounding",
"box",
"with",
"the",
"provided",
"bounding",
"box"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L424-L444
|
6,417 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/BoundingBox.java
|
BoundingBox.contains
|
public boolean contains(BoundingBox boundingBox) {
return getMinLongitude() <= boundingBox.getMinLongitude()
&& getMaxLongitude() >= boundingBox.getMaxLongitude()
&& getMinLatitude() <= boundingBox.getMinLatitude()
&& getMaxLatitude() >= boundingBox.getMaxLatitude();
}
|
java
|
public boolean contains(BoundingBox boundingBox) {
return getMinLongitude() <= boundingBox.getMinLongitude()
&& getMaxLongitude() >= boundingBox.getMaxLongitude()
&& getMinLatitude() <= boundingBox.getMinLatitude()
&& getMaxLatitude() >= boundingBox.getMaxLatitude();
}
|
[
"public",
"boolean",
"contains",
"(",
"BoundingBox",
"boundingBox",
")",
"{",
"return",
"getMinLongitude",
"(",
")",
"<=",
"boundingBox",
".",
"getMinLongitude",
"(",
")",
"&&",
"getMaxLongitude",
"(",
")",
">=",
"boundingBox",
".",
"getMaxLongitude",
"(",
")",
"&&",
"getMinLatitude",
"(",
")",
"<=",
"boundingBox",
".",
"getMinLatitude",
"(",
")",
"&&",
"getMaxLatitude",
"(",
")",
">=",
"boundingBox",
".",
"getMaxLatitude",
"(",
")",
";",
"}"
] |
Determine if inclusively contains the provided bounding box
@param boundingBox
bounding box
@return true if contains
@since 3.1.0
|
[
"Determine",
"if",
"inclusively",
"contains",
"the",
"provided",
"bounding",
"box"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/BoundingBox.java#L483-L488
|
6,418 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/index/GeometryIndex.java
|
GeometryIndex.setTableIndex
|
public void setTableIndex(TableIndex tableIndex) {
this.tableIndex = tableIndex;
if (tableIndex != null) {
tableName = tableIndex.getTableName();
} else {
tableName = null;
}
}
|
java
|
public void setTableIndex(TableIndex tableIndex) {
this.tableIndex = tableIndex;
if (tableIndex != null) {
tableName = tableIndex.getTableName();
} else {
tableName = null;
}
}
|
[
"public",
"void",
"setTableIndex",
"(",
"TableIndex",
"tableIndex",
")",
"{",
"this",
".",
"tableIndex",
"=",
"tableIndex",
";",
"if",
"(",
"tableIndex",
"!=",
"null",
")",
"{",
"tableName",
"=",
"tableIndex",
".",
"getTableName",
"(",
")",
";",
"}",
"else",
"{",
"tableName",
"=",
"null",
";",
"}",
"}"
] |
Set the table index
@param tableIndex
table index
|
[
"Set",
"the",
"table",
"index"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/GeometryIndex.java#L199-L206
|
6,419 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.projectBoundingBox
|
public BoundingBox projectBoundingBox(BoundingBox boundingBox,
Projection projection) {
ProjectionTransform projectionTransform = projection
.getTransformation(getProjection());
BoundingBox projectedBoundingBox = boundingBox
.transform(projectionTransform);
return projectedBoundingBox;
}
|
java
|
public BoundingBox projectBoundingBox(BoundingBox boundingBox,
Projection projection) {
ProjectionTransform projectionTransform = projection
.getTransformation(getProjection());
BoundingBox projectedBoundingBox = boundingBox
.transform(projectionTransform);
return projectedBoundingBox;
}
|
[
"public",
"BoundingBox",
"projectBoundingBox",
"(",
"BoundingBox",
"boundingBox",
",",
"Projection",
"projection",
")",
"{",
"ProjectionTransform",
"projectionTransform",
"=",
"projection",
".",
"getTransformation",
"(",
"getProjection",
"(",
")",
")",
";",
"BoundingBox",
"projectedBoundingBox",
"=",
"boundingBox",
".",
"transform",
"(",
"projectionTransform",
")",
";",
"return",
"projectedBoundingBox",
";",
"}"
] |
Project the provided bounding box in the declared projection to the user
DAO projection
@param boundingBox
bounding box
@param projection
projection
@return projected bounding box
@since 3.1.0
|
[
"Project",
"the",
"provided",
"bounding",
"box",
"in",
"the",
"declared",
"projection",
"to",
"the",
"user",
"DAO",
"projection"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L121-L128
|
6,420 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.queryForAll
|
public TResult queryForAll() {
TResult result = userDb.query(getTableName(), table.getColumnNames(),
null, null, null, null, null);
prepareResult(result);
return result;
}
|
java
|
public TResult queryForAll() {
TResult result = userDb.query(getTableName(), table.getColumnNames(),
null, null, null, null, null);
prepareResult(result);
return result;
}
|
[
"public",
"TResult",
"queryForAll",
"(",
")",
"{",
"TResult",
"result",
"=",
"userDb",
".",
"query",
"(",
"getTableName",
"(",
")",
",",
"table",
".",
"getColumnNames",
"(",
")",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"prepareResult",
"(",
"result",
")",
";",
"return",
"result",
";",
"}"
] |
Query for all rows
@return result
|
[
"Query",
"for",
"all",
"rows"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L207-L212
|
6,421 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.queryForChunk
|
public TResult queryForChunk(int limit, long offset) {
return queryForChunk(table.getPkColumn().getName(), limit, offset);
}
|
java
|
public TResult queryForChunk(int limit, long offset) {
return queryForChunk(table.getPkColumn().getName(), limit, offset);
}
|
[
"public",
"TResult",
"queryForChunk",
"(",
"int",
"limit",
",",
"long",
"offset",
")",
"{",
"return",
"queryForChunk",
"(",
"table",
".",
"getPkColumn",
"(",
")",
".",
"getName",
"(",
")",
",",
"limit",
",",
"offset",
")",
";",
"}"
] |
Query for id ordered rows starting at the offset and returning no more
than the limit.
@param limit
chunk limit
@param offset
chunk query offset
@return result
@since 3.1.0
|
[
"Query",
"for",
"id",
"ordered",
"rows",
"starting",
"at",
"the",
"offset",
"and",
"returning",
"no",
"more",
"than",
"the",
"limit",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L487-L489
|
6,422 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.queryForChunk
|
public TResult queryForChunk(String orderBy, int limit, long offset) {
return query(null, null, null, null, orderBy, buildLimit(limit, offset));
}
|
java
|
public TResult queryForChunk(String orderBy, int limit, long offset) {
return query(null, null, null, null, orderBy, buildLimit(limit, offset));
}
|
[
"public",
"TResult",
"queryForChunk",
"(",
"String",
"orderBy",
",",
"int",
"limit",
",",
"long",
"offset",
")",
"{",
"return",
"query",
"(",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"orderBy",
",",
"buildLimit",
"(",
"limit",
",",
"offset",
")",
")",
";",
"}"
] |
Query for ordered rows starting at the offset and returning no more than
the limit.
@param orderBy
order by
@param limit
chunk limit
@param offset
chunk query offset
@return result
@since 3.1.0
|
[
"Query",
"for",
"ordered",
"rows",
"starting",
"at",
"the",
"offset",
"and",
"returning",
"no",
"more",
"than",
"the",
"limit",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L504-L506
|
6,423 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.delete
|
public int delete(TRow row) {
int numDeleted;
if (row.hasId()) {
numDeleted = deleteById(row.getId());
} else {
numDeleted = delete(buildValueWhere(row.getAsMap()),
buildWhereArgs(row.getValues()));
}
return numDeleted;
}
|
java
|
public int delete(TRow row) {
int numDeleted;
if (row.hasId()) {
numDeleted = deleteById(row.getId());
} else {
numDeleted = delete(buildValueWhere(row.getAsMap()),
buildWhereArgs(row.getValues()));
}
return numDeleted;
}
|
[
"public",
"int",
"delete",
"(",
"TRow",
"row",
")",
"{",
"int",
"numDeleted",
";",
"if",
"(",
"row",
".",
"hasId",
"(",
")",
")",
"{",
"numDeleted",
"=",
"deleteById",
"(",
"row",
".",
"getId",
"(",
")",
")",
";",
"}",
"else",
"{",
"numDeleted",
"=",
"delete",
"(",
"buildValueWhere",
"(",
"row",
".",
"getAsMap",
"(",
")",
")",
",",
"buildWhereArgs",
"(",
"row",
".",
"getValues",
"(",
")",
")",
")",
";",
"}",
"return",
"numDeleted",
";",
"}"
] |
Delete the row
@param row
row
@return number of rows affected, should be 0 or 1 unless the table has
duplicate rows in it
|
[
"Delete",
"the",
"row"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L539-L548
|
6,424 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.delete
|
public int delete(String whereClause, String[] whereArgs) {
return db.delete(getTableName(), whereClause, whereArgs);
}
|
java
|
public int delete(String whereClause, String[] whereArgs) {
return db.delete(getTableName(), whereClause, whereArgs);
}
|
[
"public",
"int",
"delete",
"(",
"String",
"whereClause",
",",
"String",
"[",
"]",
"whereArgs",
")",
"{",
"return",
"db",
".",
"delete",
"(",
"getTableName",
"(",
")",
",",
"whereClause",
",",
"whereArgs",
")",
";",
"}"
] |
Delete rows matching the where clause
@param whereClause
where clause
@param whereArgs
where arguments
@return deleted count
|
[
"Delete",
"rows",
"matching",
"the",
"where",
"clause"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L570-L572
|
6,425 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.delete
|
public int delete(Map<String, Object> fieldValues) {
String whereClause = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return delete(whereClause, whereArgs);
}
|
java
|
public int delete(Map<String, Object> fieldValues) {
String whereClause = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return delete(whereClause, whereArgs);
}
|
[
"public",
"int",
"delete",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"fieldValues",
")",
"{",
"String",
"whereClause",
"=",
"buildWhere",
"(",
"fieldValues",
".",
"entrySet",
"(",
")",
")",
";",
"String",
"[",
"]",
"whereArgs",
"=",
"buildWhereArgs",
"(",
"fieldValues",
".",
"values",
"(",
")",
")",
";",
"return",
"delete",
"(",
"whereClause",
",",
"whereArgs",
")",
";",
"}"
] |
Delete rows matching the field values
@param fieldValues
field values
@return deleted count
@since 3.0.2
|
[
"Delete",
"rows",
"matching",
"the",
"field",
"values"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L582-L586
|
6,426 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.count
|
public int count(String where, String[] args) {
return db.count(getTableName(), where, args);
}
|
java
|
public int count(String where, String[] args) {
return db.count(getTableName(), where, args);
}
|
[
"public",
"int",
"count",
"(",
"String",
"where",
",",
"String",
"[",
"]",
"args",
")",
"{",
"return",
"db",
".",
"count",
"(",
"getTableName",
"(",
")",
",",
"where",
",",
"args",
")",
";",
"}"
] |
Get the count
@param where
where clause
@param args
where arguments
@return count
|
[
"Get",
"the",
"count"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L887-L889
|
6,427 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.min
|
public Integer min(String column, String where, String[] args) {
return db.min(getTableName(), column, where, args);
}
|
java
|
public Integer min(String column, String where, String[] args) {
return db.min(getTableName(), column, where, args);
}
|
[
"public",
"Integer",
"min",
"(",
"String",
"column",
",",
"String",
"where",
",",
"String",
"[",
"]",
"args",
")",
"{",
"return",
"db",
".",
"min",
"(",
"getTableName",
"(",
")",
",",
"column",
",",
"where",
",",
"args",
")",
";",
"}"
] |
Get the min result of the column
@param column
column name
@param where
where clause
@param args
where arugments
@return min or null
|
[
"Get",
"the",
"min",
"result",
"of",
"the",
"column"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L902-L904
|
6,428 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.max
|
public Integer max(String column, String where, String[] args) {
return db.max(getTableName(), column, where, args);
}
|
java
|
public Integer max(String column, String where, String[] args) {
return db.max(getTableName(), column, where, args);
}
|
[
"public",
"Integer",
"max",
"(",
"String",
"column",
",",
"String",
"where",
",",
"String",
"[",
"]",
"args",
")",
"{",
"return",
"db",
".",
"max",
"(",
"getTableName",
"(",
")",
",",
"column",
",",
"where",
",",
"args",
")",
";",
"}"
] |
Get the max result of the column
@param column
column name
@param where
where clause
@param args
where arguments
@return max or null
|
[
"Get",
"the",
"max",
"result",
"of",
"the",
"column"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L917-L919
|
6,429 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.querySingleTypedResult
|
public <T> T querySingleTypedResult(String sql, String[] args, int column) {
return db.querySingleTypedResult(sql, args, column);
}
|
java
|
public <T> T querySingleTypedResult(String sql, String[] args, int column) {
return db.querySingleTypedResult(sql, args, column);
}
|
[
"public",
"<",
"T",
">",
"T",
"querySingleTypedResult",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
",",
"int",
"column",
")",
"{",
"return",
"db",
".",
"querySingleTypedResult",
"(",
"sql",
",",
"args",
",",
"column",
")",
";",
"}"
] |
Query the SQL for a single result typed object
@param <T>
result value type
@param sql
sql statement
@param args
arguments
@param column
column index
@return result, null if no result
@since 3.1.0
|
[
"Query",
"the",
"SQL",
"for",
"a",
"single",
"result",
"typed",
"object"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1019-L1021
|
6,430 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.querySingleTypedResult
|
public <T> T querySingleTypedResult(String sql, String[] args, int column,
GeoPackageDataType dataType) {
return db.querySingleTypedResult(sql, args, column, dataType);
}
|
java
|
public <T> T querySingleTypedResult(String sql, String[] args, int column,
GeoPackageDataType dataType) {
return db.querySingleTypedResult(sql, args, column, dataType);
}
|
[
"public",
"<",
"T",
">",
"T",
"querySingleTypedResult",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
",",
"int",
"column",
",",
"GeoPackageDataType",
"dataType",
")",
"{",
"return",
"db",
".",
"querySingleTypedResult",
"(",
"sql",
",",
"args",
",",
"column",
",",
"dataType",
")",
";",
"}"
] |
Query the SQL for a single result typed object with the expected data
type
@param <T>
result value type
@param sql
sql statement
@param args
arguments
@param column
column index
@param dataType
GeoPackage data type
@return result, null if no result
@since 3.1.0
|
[
"Query",
"the",
"SQL",
"for",
"a",
"single",
"result",
"typed",
"object",
"with",
"the",
"expected",
"data",
"type"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1059-L1062
|
6,431 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.querySingleColumnResults
|
public List<Object> querySingleColumnResults(String sql, String[] args,
int column) {
return db.querySingleColumnResults(sql, args, column);
}
|
java
|
public List<Object> querySingleColumnResults(String sql, String[] args,
int column) {
return db.querySingleColumnResults(sql, args, column);
}
|
[
"public",
"List",
"<",
"Object",
">",
"querySingleColumnResults",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
",",
"int",
"column",
")",
"{",
"return",
"db",
".",
"querySingleColumnResults",
"(",
"sql",
",",
"args",
",",
"column",
")",
";",
"}"
] |
Query for values from a single column
@param sql
sql statement
@param args
arguments
@param column
column index
@return single column results
@since 3.1.0
|
[
"Query",
"for",
"values",
"from",
"a",
"single",
"column"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1142-L1145
|
6,432 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.querySingleColumnTypedResults
|
public <T> List<T> querySingleColumnTypedResults(String sql, String[] args,
int column) {
return db.querySingleColumnTypedResults(sql, args, column);
}
|
java
|
public <T> List<T> querySingleColumnTypedResults(String sql, String[] args,
int column) {
return db.querySingleColumnTypedResults(sql, args, column);
}
|
[
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"querySingleColumnTypedResults",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
",",
"int",
"column",
")",
"{",
"return",
"db",
".",
"querySingleColumnTypedResults",
"(",
"sql",
",",
"args",
",",
"column",
")",
";",
"}"
] |
Query for typed values from a single column
@param <T>
result value type
@param sql
sql statement
@param args
arguments
@param column
column index
@return single column results
@since 3.1.0
|
[
"Query",
"for",
"typed",
"values",
"from",
"a",
"single",
"column"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1161-L1164
|
6,433 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.getZoomLevel
|
public int getZoomLevel() {
Projection projection = getProjection();
if (projection == null) {
throw new GeoPackageException(
"No projection was set which is required to determine the zoom level");
}
int zoomLevel = 0;
BoundingBox boundingBox = getBoundingBox();
if (boundingBox != null) {
if (projection.isUnit(Units.DEGREES)) {
boundingBox = TileBoundingBoxUtils
.boundDegreesBoundingBoxWithWebMercatorLimits(boundingBox);
}
ProjectionTransform webMercatorTransform = projection
.getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
BoundingBox webMercatorBoundingBox = boundingBox
.transform(webMercatorTransform);
zoomLevel = TileBoundingBoxUtils
.getZoomLevel(webMercatorBoundingBox);
}
return zoomLevel;
}
|
java
|
public int getZoomLevel() {
Projection projection = getProjection();
if (projection == null) {
throw new GeoPackageException(
"No projection was set which is required to determine the zoom level");
}
int zoomLevel = 0;
BoundingBox boundingBox = getBoundingBox();
if (boundingBox != null) {
if (projection.isUnit(Units.DEGREES)) {
boundingBox = TileBoundingBoxUtils
.boundDegreesBoundingBoxWithWebMercatorLimits(boundingBox);
}
ProjectionTransform webMercatorTransform = projection
.getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
BoundingBox webMercatorBoundingBox = boundingBox
.transform(webMercatorTransform);
zoomLevel = TileBoundingBoxUtils
.getZoomLevel(webMercatorBoundingBox);
}
return zoomLevel;
}
|
[
"public",
"int",
"getZoomLevel",
"(",
")",
"{",
"Projection",
"projection",
"=",
"getProjection",
"(",
")",
";",
"if",
"(",
"projection",
"==",
"null",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"No projection was set which is required to determine the zoom level\"",
")",
";",
"}",
"int",
"zoomLevel",
"=",
"0",
";",
"BoundingBox",
"boundingBox",
"=",
"getBoundingBox",
"(",
")",
";",
"if",
"(",
"boundingBox",
"!=",
"null",
")",
"{",
"if",
"(",
"projection",
".",
"isUnit",
"(",
"Units",
".",
"DEGREES",
")",
")",
"{",
"boundingBox",
"=",
"TileBoundingBoxUtils",
".",
"boundDegreesBoundingBoxWithWebMercatorLimits",
"(",
"boundingBox",
")",
";",
"}",
"ProjectionTransform",
"webMercatorTransform",
"=",
"projection",
".",
"getTransformation",
"(",
"ProjectionConstants",
".",
"EPSG_WEB_MERCATOR",
")",
";",
"BoundingBox",
"webMercatorBoundingBox",
"=",
"boundingBox",
".",
"transform",
"(",
"webMercatorTransform",
")",
";",
"zoomLevel",
"=",
"TileBoundingBoxUtils",
".",
"getZoomLevel",
"(",
"webMercatorBoundingBox",
")",
";",
"}",
"return",
"zoomLevel",
";",
"}"
] |
Get the approximate zoom level of where the bounding box of the user data
fits into the world
@return zoom level
@since 1.1.0
|
[
"Get",
"the",
"approximate",
"zoom",
"level",
"of",
"where",
"the",
"bounding",
"box",
"of",
"the",
"user",
"data",
"fits",
"into",
"the",
"world"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1506-L1527
|
6,434 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.buildColumnsAs
|
public String[] buildColumnsAs(Map<String, String> columns) {
String[] columnNames = table.getColumnNames();
String[] columnsAs = new String[columnNames.length];
for (int i = 0; i < columnNames.length; i++) {
String column = columnNames[i];
columnsAs[i] = columns.get(column);
}
return columnsAs;
}
|
java
|
public String[] buildColumnsAs(Map<String, String> columns) {
String[] columnNames = table.getColumnNames();
String[] columnsAs = new String[columnNames.length];
for (int i = 0; i < columnNames.length; i++) {
String column = columnNames[i];
columnsAs[i] = columns.get(column);
}
return columnsAs;
}
|
[
"public",
"String",
"[",
"]",
"buildColumnsAs",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"columns",
")",
"{",
"String",
"[",
"]",
"columnNames",
"=",
"table",
".",
"getColumnNames",
"(",
")",
";",
"String",
"[",
"]",
"columnsAs",
"=",
"new",
"String",
"[",
"columnNames",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columnNames",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"column",
"=",
"columnNames",
"[",
"i",
"]",
";",
"columnsAs",
"[",
"i",
"]",
"=",
"columns",
".",
"get",
"(",
"column",
")",
";",
"}",
"return",
"columnsAs",
";",
"}"
] |
Build "columns as" values for the table column to value mapping
@param columns
mapping between columns and values
@return "columns as" values
@since 2.0.0
|
[
"Build",
"columns",
"as",
"values",
"for",
"the",
"table",
"column",
"to",
"value",
"mapping"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1643-L1654
|
6,435 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.buildColumnsArray
|
private String[] buildColumnsArray(List<TColumn> columns) {
String[] columnsArray = new String[columns.size()];
for (int i = 0; i < columns.size(); i++) {
TColumn column = columns.get(i);
columnsArray[i] = column.getName();
}
return columnsArray;
}
|
java
|
private String[] buildColumnsArray(List<TColumn> columns) {
String[] columnsArray = new String[columns.size()];
for (int i = 0; i < columns.size(); i++) {
TColumn column = columns.get(i);
columnsArray[i] = column.getName();
}
return columnsArray;
}
|
[
"private",
"String",
"[",
"]",
"buildColumnsArray",
"(",
"List",
"<",
"TColumn",
">",
"columns",
")",
"{",
"String",
"[",
"]",
"columnsArray",
"=",
"new",
"String",
"[",
"columns",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columns",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"TColumn",
"column",
"=",
"columns",
".",
"get",
"(",
"i",
")",
";",
"columnsArray",
"[",
"i",
"]",
"=",
"column",
".",
"getName",
"(",
")",
";",
"}",
"return",
"columnsArray",
";",
"}"
] |
Build a columns name array from the list of columns
@param columns
column list
@return column names array
|
[
"Build",
"a",
"columns",
"name",
"array",
"from",
"the",
"list",
"of",
"columns"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1663-L1670
|
6,436 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
|
UserCoreDao.getValueToleranceRange
|
private String[] getValueToleranceRange(ColumnValue value) {
double doubleValue = ((Number) value.getValue()).doubleValue();
double tolerance = value.getTolerance();
return new String[] { Double.toString(doubleValue - tolerance),
Double.toString(doubleValue + tolerance) };
}
|
java
|
private String[] getValueToleranceRange(ColumnValue value) {
double doubleValue = ((Number) value.getValue()).doubleValue();
double tolerance = value.getTolerance();
return new String[] { Double.toString(doubleValue - tolerance),
Double.toString(doubleValue + tolerance) };
}
|
[
"private",
"String",
"[",
"]",
"getValueToleranceRange",
"(",
"ColumnValue",
"value",
")",
"{",
"double",
"doubleValue",
"=",
"(",
"(",
"Number",
")",
"value",
".",
"getValue",
"(",
")",
")",
".",
"doubleValue",
"(",
")",
";",
"double",
"tolerance",
"=",
"value",
".",
"getTolerance",
"(",
")",
";",
"return",
"new",
"String",
"[",
"]",
"{",
"Double",
".",
"toString",
"(",
"doubleValue",
"-",
"tolerance",
")",
",",
"Double",
".",
"toString",
"(",
"doubleValue",
"+",
"tolerance",
")",
"}",
";",
"}"
] |
Get the value tolerance range min and max values
@param value
@return tolerance range
|
[
"Get",
"the",
"value",
"tolerance",
"range",
"min",
"and",
"max",
"values"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1678-L1683
|
6,437 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/columns/DataColumnsDao.java
|
DataColumnsDao.getDataColumn
|
public DataColumns getDataColumn(String tableName, String columnName)
throws SQLException {
TableColumnKey id = new TableColumnKey(tableName, columnName);
return queryForId(id);
}
|
java
|
public DataColumns getDataColumn(String tableName, String columnName)
throws SQLException {
TableColumnKey id = new TableColumnKey(tableName, columnName);
return queryForId(id);
}
|
[
"public",
"DataColumns",
"getDataColumn",
"(",
"String",
"tableName",
",",
"String",
"columnName",
")",
"throws",
"SQLException",
"{",
"TableColumnKey",
"id",
"=",
"new",
"TableColumnKey",
"(",
"tableName",
",",
"columnName",
")",
";",
"return",
"queryForId",
"(",
"id",
")",
";",
"}"
] |
Get DataColumn by column name and table name
@param tableName
table name to query for
@param columnName
column name to query for
@return DataColumns
@throws SQLException
upon failure
|
[
"Get",
"DataColumn",
"by",
"column",
"name",
"and",
"table",
"name"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/columns/DataColumnsDao.java#L204-L208
|
6,438 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
|
DataColumnConstraintsDao.deleteCascade
|
public int deleteCascade(DataColumnConstraints constraints)
throws SQLException {
int count = 0;
if (constraints != null) {
// Check if the last remaining constraint with the constraint name
// is being deleted
List<DataColumnConstraints> remainingConstraints = queryByConstraintName(constraints
.getConstraintName());
if (remainingConstraints.size() == 1) {
DataColumnConstraints remainingConstraint = remainingConstraints
.get(0);
// Compare the name, type, and value
if (remainingConstraint.getConstraintName().equals(
constraints.getConstraintName())
&& remainingConstraint.getConstraintType().equals(
constraints.getConstraintType())
&& (remainingConstraint.getValue() == null ? constraints
.getValue() == null : remainingConstraint
.getValue().equals(constraints.getValue()))) {
// Delete Data Columns
DataColumnsDao dao = getDataColumnsDao();
List<DataColumns> dataColumnsCollection = dao
.queryByConstraintName(constraints
.getConstraintName());
if (!dataColumnsCollection.isEmpty()) {
dao.delete(dataColumnsCollection);
}
}
}
// Delete
count = delete(constraints);
}
return count;
}
|
java
|
public int deleteCascade(DataColumnConstraints constraints)
throws SQLException {
int count = 0;
if (constraints != null) {
// Check if the last remaining constraint with the constraint name
// is being deleted
List<DataColumnConstraints> remainingConstraints = queryByConstraintName(constraints
.getConstraintName());
if (remainingConstraints.size() == 1) {
DataColumnConstraints remainingConstraint = remainingConstraints
.get(0);
// Compare the name, type, and value
if (remainingConstraint.getConstraintName().equals(
constraints.getConstraintName())
&& remainingConstraint.getConstraintType().equals(
constraints.getConstraintType())
&& (remainingConstraint.getValue() == null ? constraints
.getValue() == null : remainingConstraint
.getValue().equals(constraints.getValue()))) {
// Delete Data Columns
DataColumnsDao dao = getDataColumnsDao();
List<DataColumns> dataColumnsCollection = dao
.queryByConstraintName(constraints
.getConstraintName());
if (!dataColumnsCollection.isEmpty()) {
dao.delete(dataColumnsCollection);
}
}
}
// Delete
count = delete(constraints);
}
return count;
}
|
[
"public",
"int",
"deleteCascade",
"(",
"DataColumnConstraints",
"constraints",
")",
"throws",
"SQLException",
"{",
"int",
"count",
"=",
"0",
";",
"if",
"(",
"constraints",
"!=",
"null",
")",
"{",
"// Check if the last remaining constraint with the constraint name",
"// is being deleted",
"List",
"<",
"DataColumnConstraints",
">",
"remainingConstraints",
"=",
"queryByConstraintName",
"(",
"constraints",
".",
"getConstraintName",
"(",
")",
")",
";",
"if",
"(",
"remainingConstraints",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"DataColumnConstraints",
"remainingConstraint",
"=",
"remainingConstraints",
".",
"get",
"(",
"0",
")",
";",
"// Compare the name, type, and value",
"if",
"(",
"remainingConstraint",
".",
"getConstraintName",
"(",
")",
".",
"equals",
"(",
"constraints",
".",
"getConstraintName",
"(",
")",
")",
"&&",
"remainingConstraint",
".",
"getConstraintType",
"(",
")",
".",
"equals",
"(",
"constraints",
".",
"getConstraintType",
"(",
")",
")",
"&&",
"(",
"remainingConstraint",
".",
"getValue",
"(",
")",
"==",
"null",
"?",
"constraints",
".",
"getValue",
"(",
")",
"==",
"null",
":",
"remainingConstraint",
".",
"getValue",
"(",
")",
".",
"equals",
"(",
"constraints",
".",
"getValue",
"(",
")",
")",
")",
")",
"{",
"// Delete Data Columns",
"DataColumnsDao",
"dao",
"=",
"getDataColumnsDao",
"(",
")",
";",
"List",
"<",
"DataColumns",
">",
"dataColumnsCollection",
"=",
"dao",
".",
"queryByConstraintName",
"(",
"constraints",
".",
"getConstraintName",
"(",
")",
")",
";",
"if",
"(",
"!",
"dataColumnsCollection",
".",
"isEmpty",
"(",
")",
")",
"{",
"dao",
".",
"delete",
"(",
"dataColumnsCollection",
")",
";",
"}",
"}",
"}",
"// Delete",
"count",
"=",
"delete",
"(",
"constraints",
")",
";",
"}",
"return",
"count",
";",
"}"
] |
Delete the Data Columns Constraints, cascading
@param constraints
data column constraints
@return deleted count
@throws SQLException
upon failure
|
[
"Delete",
"the",
"Data",
"Columns",
"Constraints",
"cascading"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L58-L97
|
6,439 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
|
DataColumnConstraintsDao.deleteCascade
|
public int deleteCascade(
Collection<DataColumnConstraints> constraintsCollection)
throws SQLException {
int count = 0;
if (constraintsCollection != null) {
for (DataColumnConstraints constraints : constraintsCollection) {
count += deleteCascade(constraints);
}
}
return count;
}
|
java
|
public int deleteCascade(
Collection<DataColumnConstraints> constraintsCollection)
throws SQLException {
int count = 0;
if (constraintsCollection != null) {
for (DataColumnConstraints constraints : constraintsCollection) {
count += deleteCascade(constraints);
}
}
return count;
}
|
[
"public",
"int",
"deleteCascade",
"(",
"Collection",
"<",
"DataColumnConstraints",
">",
"constraintsCollection",
")",
"throws",
"SQLException",
"{",
"int",
"count",
"=",
"0",
";",
"if",
"(",
"constraintsCollection",
"!=",
"null",
")",
"{",
"for",
"(",
"DataColumnConstraints",
"constraints",
":",
"constraintsCollection",
")",
"{",
"count",
"+=",
"deleteCascade",
"(",
"constraints",
")",
";",
"}",
"}",
"return",
"count",
";",
"}"
] |
Delete the collection of Data Column Constraints, cascading
@param constraintsCollection
constraints collection
@return deleted count
@throws SQLException
upon failure
|
[
"Delete",
"the",
"collection",
"of",
"Data",
"Column",
"Constraints",
"cascading"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L108-L118
|
6,440 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
|
DataColumnConstraintsDao.deleteCascade
|
public int deleteCascade(PreparedQuery<DataColumnConstraints> preparedDelete)
throws SQLException {
int count = 0;
if (preparedDelete != null) {
List<DataColumnConstraints> constraintsList = query(preparedDelete);
count = deleteCascade(constraintsList);
}
return count;
}
|
java
|
public int deleteCascade(PreparedQuery<DataColumnConstraints> preparedDelete)
throws SQLException {
int count = 0;
if (preparedDelete != null) {
List<DataColumnConstraints> constraintsList = query(preparedDelete);
count = deleteCascade(constraintsList);
}
return count;
}
|
[
"public",
"int",
"deleteCascade",
"(",
"PreparedQuery",
"<",
"DataColumnConstraints",
">",
"preparedDelete",
")",
"throws",
"SQLException",
"{",
"int",
"count",
"=",
"0",
";",
"if",
"(",
"preparedDelete",
"!=",
"null",
")",
"{",
"List",
"<",
"DataColumnConstraints",
">",
"constraintsList",
"=",
"query",
"(",
"preparedDelete",
")",
";",
"count",
"=",
"deleteCascade",
"(",
"constraintsList",
")",
";",
"}",
"return",
"count",
";",
"}"
] |
Delete the Data Column Constraints matching the prepared query, cascading
@param preparedDelete
prepared delete query
@return deleted count
@throws SQLException
upon failure
|
[
"Delete",
"the",
"Data",
"Column",
"Constraints",
"matching",
"the",
"prepared",
"query",
"cascading"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L129-L137
|
6,441 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
|
DataColumnConstraintsDao.getDataColumnsDao
|
private DataColumnsDao getDataColumnsDao() throws SQLException {
if (dataColumnsDao == null) {
dataColumnsDao = DaoManager.createDao(connectionSource,
DataColumns.class);
}
return dataColumnsDao;
}
|
java
|
private DataColumnsDao getDataColumnsDao() throws SQLException {
if (dataColumnsDao == null) {
dataColumnsDao = DaoManager.createDao(connectionSource,
DataColumns.class);
}
return dataColumnsDao;
}
|
[
"private",
"DataColumnsDao",
"getDataColumnsDao",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"dataColumnsDao",
"==",
"null",
")",
"{",
"dataColumnsDao",
"=",
"DaoManager",
".",
"createDao",
"(",
"connectionSource",
",",
"DataColumns",
".",
"class",
")",
";",
"}",
"return",
"dataColumnsDao",
";",
"}"
] |
Get or create a Data Columns DAO
@return data columns dao
@throws SQLException
|
[
"Get",
"or",
"create",
"a",
"Data",
"Columns",
"DAO"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L145-L151
|
6,442 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
|
DataColumnConstraintsDao.queryByUnique
|
public DataColumnConstraints queryByUnique(String constraintName,
DataColumnConstraintType constraintType, String value)
throws SQLException {
DataColumnConstraints constraint = null;
QueryBuilder<DataColumnConstraints, Void> qb = queryBuilder();
setUniqueWhere(qb.where(), constraintName, constraintType, value);
List<DataColumnConstraints> constraints = qb.query();
if (!constraints.isEmpty()) {
if (constraints.size() > 1) {
throw new GeoPackageException("More than one "
+ DataColumnConstraints.class.getSimpleName()
+ " was found for unique constraint. Name: "
+ constraintName + ", Type: " + constraintType
+ ", Value: " + value);
}
constraint = constraints.get(0);
}
return constraint;
}
|
java
|
public DataColumnConstraints queryByUnique(String constraintName,
DataColumnConstraintType constraintType, String value)
throws SQLException {
DataColumnConstraints constraint = null;
QueryBuilder<DataColumnConstraints, Void> qb = queryBuilder();
setUniqueWhere(qb.where(), constraintName, constraintType, value);
List<DataColumnConstraints> constraints = qb.query();
if (!constraints.isEmpty()) {
if (constraints.size() > 1) {
throw new GeoPackageException("More than one "
+ DataColumnConstraints.class.getSimpleName()
+ " was found for unique constraint. Name: "
+ constraintName + ", Type: " + constraintType
+ ", Value: " + value);
}
constraint = constraints.get(0);
}
return constraint;
}
|
[
"public",
"DataColumnConstraints",
"queryByUnique",
"(",
"String",
"constraintName",
",",
"DataColumnConstraintType",
"constraintType",
",",
"String",
"value",
")",
"throws",
"SQLException",
"{",
"DataColumnConstraints",
"constraint",
"=",
"null",
";",
"QueryBuilder",
"<",
"DataColumnConstraints",
",",
"Void",
">",
"qb",
"=",
"queryBuilder",
"(",
")",
";",
"setUniqueWhere",
"(",
"qb",
".",
"where",
"(",
")",
",",
"constraintName",
",",
"constraintType",
",",
"value",
")",
";",
"List",
"<",
"DataColumnConstraints",
">",
"constraints",
"=",
"qb",
".",
"query",
"(",
")",
";",
"if",
"(",
"!",
"constraints",
".",
"isEmpty",
"(",
")",
")",
"{",
"if",
"(",
"constraints",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"More than one \"",
"+",
"DataColumnConstraints",
".",
"class",
".",
"getSimpleName",
"(",
")",
"+",
"\" was found for unique constraint. Name: \"",
"+",
"constraintName",
"+",
"\", Type: \"",
"+",
"constraintType",
"+",
"\", Value: \"",
"+",
"value",
")",
";",
"}",
"constraint",
"=",
"constraints",
".",
"get",
"(",
"0",
")",
";",
"}",
"return",
"constraint",
";",
"}"
] |
Query by the unique column values
@param constraintName
constraint name
@param constraintType
constraint type
@param value
value
@return data column constraints
@throws SQLException
upon failure
|
[
"Query",
"by",
"the",
"unique",
"column",
"values"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L232-L255
|
6,443 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/GriddedCoverage.java
|
GriddedCoverage.setTileMatrixSet
|
public void setTileMatrixSet(TileMatrixSet tileMatrixSet) {
this.tileMatrixSet = tileMatrixSet;
if (tileMatrixSet != null) {
tileMatrixSetName = tileMatrixSet.getTableName();
} else {
tileMatrixSetName = null;
}
}
|
java
|
public void setTileMatrixSet(TileMatrixSet tileMatrixSet) {
this.tileMatrixSet = tileMatrixSet;
if (tileMatrixSet != null) {
tileMatrixSetName = tileMatrixSet.getTableName();
} else {
tileMatrixSetName = null;
}
}
|
[
"public",
"void",
"setTileMatrixSet",
"(",
"TileMatrixSet",
"tileMatrixSet",
")",
"{",
"this",
".",
"tileMatrixSet",
"=",
"tileMatrixSet",
";",
"if",
"(",
"tileMatrixSet",
"!=",
"null",
")",
"{",
"tileMatrixSetName",
"=",
"tileMatrixSet",
".",
"getTableName",
"(",
")",
";",
"}",
"else",
"{",
"tileMatrixSetName",
"=",
"null",
";",
"}",
"}"
] |
Set the tile matrix set
@param tileMatrixSet
tile matrix set
|
[
"Set",
"the",
"tile",
"matrix",
"set"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/GriddedCoverage.java#L210-L217
|
6,444 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/custom/UserCustomColumn.java
|
UserCustomColumn.createPrimaryKeyColumn
|
public static UserCustomColumn createPrimaryKeyColumn(int index, String name) {
return new UserCustomColumn(index, name, GeoPackageDataType.INTEGER,
null, true, null, true);
}
|
java
|
public static UserCustomColumn createPrimaryKeyColumn(int index, String name) {
return new UserCustomColumn(index, name, GeoPackageDataType.INTEGER,
null, true, null, true);
}
|
[
"public",
"static",
"UserCustomColumn",
"createPrimaryKeyColumn",
"(",
"int",
"index",
",",
"String",
"name",
")",
"{",
"return",
"new",
"UserCustomColumn",
"(",
"index",
",",
"name",
",",
"GeoPackageDataType",
".",
"INTEGER",
",",
"null",
",",
"true",
",",
"null",
",",
"true",
")",
";",
"}"
] |
Create a new primary key column
@param index
index
@param name
name
@return user custom column
|
[
"Create",
"a",
"new",
"primary",
"key",
"column"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/custom/UserCustomColumn.java#L24-L27
|
6,445 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java
|
TileTableScaling.get
|
public TileScaling get() {
TileScaling tileScaling = null;
if (has()) {
try {
tileScaling = tileScalingDao.queryForId(tableName);
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to query for tile scaling for GeoPackage: "
+ geoPackage.getName() + ", Tile Table: "
+ tableName, e);
}
}
return tileScaling;
}
|
java
|
public TileScaling get() {
TileScaling tileScaling = null;
if (has()) {
try {
tileScaling = tileScalingDao.queryForId(tableName);
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to query for tile scaling for GeoPackage: "
+ geoPackage.getName() + ", Tile Table: "
+ tableName, e);
}
}
return tileScaling;
}
|
[
"public",
"TileScaling",
"get",
"(",
")",
"{",
"TileScaling",
"tileScaling",
"=",
"null",
";",
"if",
"(",
"has",
"(",
")",
")",
"{",
"try",
"{",
"tileScaling",
"=",
"tileScalingDao",
".",
"queryForId",
"(",
"tableName",
")",
";",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to query for tile scaling for GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
"+",
"\", Tile Table: \"",
"+",
"tableName",
",",
"e",
")",
";",
"}",
"}",
"return",
"tileScaling",
";",
"}"
] |
Get the tile scaling
@return tile scaling
|
[
"Get",
"the",
"tile",
"scaling"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java#L166-L179
|
6,446 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java
|
TileTableScaling.createOrUpdate
|
public boolean createOrUpdate(TileScaling tileScaling) {
boolean success = false;
tileScaling.setTableName(tableName);
getOrCreateExtension();
try {
if (!tileScalingDao.isTableExists()) {
geoPackage.createTileScalingTable();
}
CreateOrUpdateStatus status = tileScalingDao
.createOrUpdate(tileScaling);
success = status.isCreated() || status.isUpdated();
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to create or update tile scaling for GeoPackage: "
+ geoPackage.getName() + ", Tile Table: "
+ tableName, e);
}
return success;
}
|
java
|
public boolean createOrUpdate(TileScaling tileScaling) {
boolean success = false;
tileScaling.setTableName(tableName);
getOrCreateExtension();
try {
if (!tileScalingDao.isTableExists()) {
geoPackage.createTileScalingTable();
}
CreateOrUpdateStatus status = tileScalingDao
.createOrUpdate(tileScaling);
success = status.isCreated() || status.isUpdated();
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to create or update tile scaling for GeoPackage: "
+ geoPackage.getName() + ", Tile Table: "
+ tableName, e);
}
return success;
}
|
[
"public",
"boolean",
"createOrUpdate",
"(",
"TileScaling",
"tileScaling",
")",
"{",
"boolean",
"success",
"=",
"false",
";",
"tileScaling",
".",
"setTableName",
"(",
"tableName",
")",
";",
"getOrCreateExtension",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"tileScalingDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"geoPackage",
".",
"createTileScalingTable",
"(",
")",
";",
"}",
"CreateOrUpdateStatus",
"status",
"=",
"tileScalingDao",
".",
"createOrUpdate",
"(",
"tileScaling",
")",
";",
"success",
"=",
"status",
".",
"isCreated",
"(",
")",
"||",
"status",
".",
"isUpdated",
"(",
")",
";",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to create or update tile scaling for GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
"+",
"\", Tile Table: \"",
"+",
"tableName",
",",
"e",
")",
";",
"}",
"return",
"success",
";",
"}"
] |
Create or update the tile scaling
@param tileScaling
tile scaling
@return true upon success
|
[
"Create",
"or",
"update",
"the",
"tile",
"scaling"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java#L212-L235
|
6,447 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java
|
TileTableScaling.delete
|
public boolean delete() {
boolean deleted = false;
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
deleted = tileScalingDao.deleteById(tableName) > 0;
}
if (extensionsDao.isTableExists()) {
deleted = extensionsDao.deleteByExtension(EXTENSION_NAME,
tableName) > 0 || deleted;
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete tile table scaling for GeoPackage: "
+ geoPackage.getName() + ", Table: " + tableName, e);
}
return deleted;
}
|
java
|
public boolean delete() {
boolean deleted = false;
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
try {
if (tileScalingDao.isTableExists()) {
deleted = tileScalingDao.deleteById(tableName) > 0;
}
if (extensionsDao.isTableExists()) {
deleted = extensionsDao.deleteByExtension(EXTENSION_NAME,
tableName) > 0 || deleted;
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to delete tile table scaling for GeoPackage: "
+ geoPackage.getName() + ", Table: " + tableName, e);
}
return deleted;
}
|
[
"public",
"boolean",
"delete",
"(",
")",
"{",
"boolean",
"deleted",
"=",
"false",
";",
"ExtensionsDao",
"extensionsDao",
"=",
"geoPackage",
".",
"getExtensionsDao",
"(",
")",
";",
"try",
"{",
"if",
"(",
"tileScalingDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"deleted",
"=",
"tileScalingDao",
".",
"deleteById",
"(",
"tableName",
")",
">",
"0",
";",
"}",
"if",
"(",
"extensionsDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"deleted",
"=",
"extensionsDao",
".",
"deleteByExtension",
"(",
"EXTENSION_NAME",
",",
"tableName",
")",
">",
"0",
"||",
"deleted",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to delete tile table scaling for GeoPackage: \"",
"+",
"geoPackage",
".",
"getName",
"(",
")",
"+",
"\", Table: \"",
"+",
"tableName",
",",
"e",
")",
";",
"}",
"return",
"deleted",
";",
"}"
] |
Delete the tile table scaling for the tile table
@return true if deleted
|
[
"Delete",
"the",
"tile",
"table",
"scaling",
"for",
"the",
"tile",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/scale/TileTableScaling.java#L242-L262
|
6,448 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.getBaseTables
|
public List<String> getBaseTables() throws SQLException {
List<String> baseTables = new ArrayList<String>();
List<ExtendedRelation> extendedRelations = queryForAll();
for (ExtendedRelation extendedRelation : extendedRelations) {
baseTables.add(extendedRelation.getBaseTableName());
}
return baseTables;
}
|
java
|
public List<String> getBaseTables() throws SQLException {
List<String> baseTables = new ArrayList<String>();
List<ExtendedRelation> extendedRelations = queryForAll();
for (ExtendedRelation extendedRelation : extendedRelations) {
baseTables.add(extendedRelation.getBaseTableName());
}
return baseTables;
}
|
[
"public",
"List",
"<",
"String",
">",
"getBaseTables",
"(",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"String",
">",
"baseTables",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"List",
"<",
"ExtendedRelation",
">",
"extendedRelations",
"=",
"queryForAll",
"(",
")",
";",
"for",
"(",
"ExtendedRelation",
"extendedRelation",
":",
"extendedRelations",
")",
"{",
"baseTables",
".",
"add",
"(",
"extendedRelation",
".",
"getBaseTableName",
"(",
")",
")",
";",
"}",
"return",
"baseTables",
";",
"}"
] |
Get all the base table names
@return base table names
@throws SQLException
upon failure
|
[
"Get",
"all",
"the",
"base",
"table",
"names"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L43-L53
|
6,449 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.getRelatedTables
|
public List<String> getRelatedTables() throws SQLException {
List<String> relatedTables = new ArrayList<String>();
List<ExtendedRelation> extendedRelations = queryForAll();
for (ExtendedRelation extendedRelation : extendedRelations) {
relatedTables.add(extendedRelation.getRelatedTableName());
}
return relatedTables;
}
|
java
|
public List<String> getRelatedTables() throws SQLException {
List<String> relatedTables = new ArrayList<String>();
List<ExtendedRelation> extendedRelations = queryForAll();
for (ExtendedRelation extendedRelation : extendedRelations) {
relatedTables.add(extendedRelation.getRelatedTableName());
}
return relatedTables;
}
|
[
"public",
"List",
"<",
"String",
">",
"getRelatedTables",
"(",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"String",
">",
"relatedTables",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"List",
"<",
"ExtendedRelation",
">",
"extendedRelations",
"=",
"queryForAll",
"(",
")",
";",
"for",
"(",
"ExtendedRelation",
"extendedRelation",
":",
"extendedRelations",
")",
"{",
"relatedTables",
".",
"add",
"(",
"extendedRelation",
".",
"getRelatedTableName",
"(",
")",
")",
";",
"}",
"return",
"relatedTables",
";",
"}"
] |
Get all the related table names
@return related table names
@throws SQLException
upon failure
|
[
"Get",
"all",
"the",
"related",
"table",
"names"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L62-L72
|
6,450 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.getBaseTableRelations
|
public List<ExtendedRelation> getBaseTableRelations(String baseTable)
throws SQLException {
return queryForEq(ExtendedRelation.COLUMN_BASE_TABLE_NAME, baseTable);
}
|
java
|
public List<ExtendedRelation> getBaseTableRelations(String baseTable)
throws SQLException {
return queryForEq(ExtendedRelation.COLUMN_BASE_TABLE_NAME, baseTable);
}
|
[
"public",
"List",
"<",
"ExtendedRelation",
">",
"getBaseTableRelations",
"(",
"String",
"baseTable",
")",
"throws",
"SQLException",
"{",
"return",
"queryForEq",
"(",
"ExtendedRelation",
".",
"COLUMN_BASE_TABLE_NAME",
",",
"baseTable",
")",
";",
"}"
] |
Get the relations to the base table
@param baseTable
base table
@return extended relations
@throws SQLException
upon failure
|
[
"Get",
"the",
"relations",
"to",
"the",
"base",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L83-L86
|
6,451 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.getRelatedTableRelations
|
public List<ExtendedRelation> getRelatedTableRelations(String relatedTable)
throws SQLException {
return queryForEq(ExtendedRelation.COLUMN_RELATED_TABLE_NAME,
relatedTable);
}
|
java
|
public List<ExtendedRelation> getRelatedTableRelations(String relatedTable)
throws SQLException {
return queryForEq(ExtendedRelation.COLUMN_RELATED_TABLE_NAME,
relatedTable);
}
|
[
"public",
"List",
"<",
"ExtendedRelation",
">",
"getRelatedTableRelations",
"(",
"String",
"relatedTable",
")",
"throws",
"SQLException",
"{",
"return",
"queryForEq",
"(",
"ExtendedRelation",
".",
"COLUMN_RELATED_TABLE_NAME",
",",
"relatedTable",
")",
";",
"}"
] |
Get the relations to the related table
@param relatedTable
related table
@return extended relations
@throws SQLException
upon failure
|
[
"Get",
"the",
"relations",
"to",
"the",
"related",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L97-L101
|
6,452 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.getTableRelations
|
public List<ExtendedRelation> getTableRelations(String table)
throws SQLException {
QueryBuilder<ExtendedRelation, Long> qb = queryBuilder();
qb.where().like(ExtendedRelation.COLUMN_BASE_TABLE_NAME, table).or()
.like(ExtendedRelation.COLUMN_RELATED_TABLE_NAME, table);
PreparedQuery<ExtendedRelation> preparedQuery = qb.prepare();
return query(preparedQuery);
}
|
java
|
public List<ExtendedRelation> getTableRelations(String table)
throws SQLException {
QueryBuilder<ExtendedRelation, Long> qb = queryBuilder();
qb.where().like(ExtendedRelation.COLUMN_BASE_TABLE_NAME, table).or()
.like(ExtendedRelation.COLUMN_RELATED_TABLE_NAME, table);
PreparedQuery<ExtendedRelation> preparedQuery = qb.prepare();
return query(preparedQuery);
}
|
[
"public",
"List",
"<",
"ExtendedRelation",
">",
"getTableRelations",
"(",
"String",
"table",
")",
"throws",
"SQLException",
"{",
"QueryBuilder",
"<",
"ExtendedRelation",
",",
"Long",
">",
"qb",
"=",
"queryBuilder",
"(",
")",
";",
"qb",
".",
"where",
"(",
")",
".",
"like",
"(",
"ExtendedRelation",
".",
"COLUMN_BASE_TABLE_NAME",
",",
"table",
")",
".",
"or",
"(",
")",
".",
"like",
"(",
"ExtendedRelation",
".",
"COLUMN_RELATED_TABLE_NAME",
",",
"table",
")",
";",
"PreparedQuery",
"<",
"ExtendedRelation",
">",
"preparedQuery",
"=",
"qb",
".",
"prepare",
"(",
")",
";",
"return",
"query",
"(",
"preparedQuery",
")",
";",
"}"
] |
Get the relations to the table, both base table and related table
@param table
table name
@return extended relations
@throws SQLException
upon failure
|
[
"Get",
"the",
"relations",
"to",
"the",
"table",
"both",
"base",
"table",
"and",
"related",
"table"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L112-L121
|
6,453 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java
|
ExtendedRelationsDao.addToWhere
|
private Where<ExtendedRelation, Long> addToWhere(
QueryBuilder<ExtendedRelation, Long> qb,
Where<ExtendedRelation, Long> where) {
if (where == null) {
where = qb.where();
} else {
where.and();
}
return where;
}
|
java
|
private Where<ExtendedRelation, Long> addToWhere(
QueryBuilder<ExtendedRelation, Long> qb,
Where<ExtendedRelation, Long> where) {
if (where == null) {
where = qb.where();
} else {
where.and();
}
return where;
}
|
[
"private",
"Where",
"<",
"ExtendedRelation",
",",
"Long",
">",
"addToWhere",
"(",
"QueryBuilder",
"<",
"ExtendedRelation",
",",
"Long",
">",
"qb",
",",
"Where",
"<",
"ExtendedRelation",
",",
"Long",
">",
"where",
")",
"{",
"if",
"(",
"where",
"==",
"null",
")",
"{",
"where",
"=",
"qb",
".",
"where",
"(",
")",
";",
"}",
"else",
"{",
"where",
".",
"and",
"(",
")",
";",
"}",
"return",
"where",
";",
"}"
] |
Add to the where clause, either as new or with an and
@param qb
query builder
@param where
where clause
@return where clause
|
[
"Add",
"to",
"the",
"where",
"clause",
"either",
"as",
"new",
"or",
"with",
"an",
"and"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/related/ExtendedRelationsDao.java#L195-L204
|
6,454 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java
|
GeoPackageDaoManager.unregisterDaos
|
public static void unregisterDaos(ConnectionSource connectionSource) {
// TODO when ormlite-core version > 5.1 is released, replace with:
// "DaoManager.unregisterDaos(connectionSource);"
// See https://github.com/j256/ormlite-core/pull/149
unregisterDao(connectionSource, Contents.class,
SpatialReferenceSystem.class,
SpatialReferenceSystemSfSql.class,
SpatialReferenceSystemSqlMm.class, Extensions.class,
GriddedCoverage.class, GriddedTile.class, GeometryIndex.class,
TableIndex.class, FeatureTileLink.class,
ExtendedRelation.class, TileScaling.class,
GeometryColumns.class, GeometryColumnsSfSql.class,
GeometryColumnsSqlMm.class, Metadata.class,
MetadataReference.class, DataColumns.class,
DataColumnConstraints.class, TileMatrix.class,
TileMatrixSet.class, ContentsId.class);
}
|
java
|
public static void unregisterDaos(ConnectionSource connectionSource) {
// TODO when ormlite-core version > 5.1 is released, replace with:
// "DaoManager.unregisterDaos(connectionSource);"
// See https://github.com/j256/ormlite-core/pull/149
unregisterDao(connectionSource, Contents.class,
SpatialReferenceSystem.class,
SpatialReferenceSystemSfSql.class,
SpatialReferenceSystemSqlMm.class, Extensions.class,
GriddedCoverage.class, GriddedTile.class, GeometryIndex.class,
TableIndex.class, FeatureTileLink.class,
ExtendedRelation.class, TileScaling.class,
GeometryColumns.class, GeometryColumnsSfSql.class,
GeometryColumnsSqlMm.class, Metadata.class,
MetadataReference.class, DataColumns.class,
DataColumnConstraints.class, TileMatrix.class,
TileMatrixSet.class, ContentsId.class);
}
|
[
"public",
"static",
"void",
"unregisterDaos",
"(",
"ConnectionSource",
"connectionSource",
")",
"{",
"// TODO when ormlite-core version > 5.1 is released, replace with:",
"// \"DaoManager.unregisterDaos(connectionSource);\"",
"// See https://github.com/j256/ormlite-core/pull/149",
"unregisterDao",
"(",
"connectionSource",
",",
"Contents",
".",
"class",
",",
"SpatialReferenceSystem",
".",
"class",
",",
"SpatialReferenceSystemSfSql",
".",
"class",
",",
"SpatialReferenceSystemSqlMm",
".",
"class",
",",
"Extensions",
".",
"class",
",",
"GriddedCoverage",
".",
"class",
",",
"GriddedTile",
".",
"class",
",",
"GeometryIndex",
".",
"class",
",",
"TableIndex",
".",
"class",
",",
"FeatureTileLink",
".",
"class",
",",
"ExtendedRelation",
".",
"class",
",",
"TileScaling",
".",
"class",
",",
"GeometryColumns",
".",
"class",
",",
"GeometryColumnsSfSql",
".",
"class",
",",
"GeometryColumnsSqlMm",
".",
"class",
",",
"Metadata",
".",
"class",
",",
"MetadataReference",
".",
"class",
",",
"DataColumns",
".",
"class",
",",
"DataColumnConstraints",
".",
"class",
",",
"TileMatrix",
".",
"class",
",",
"TileMatrixSet",
".",
"class",
",",
"ContentsId",
".",
"class",
")",
";",
"}"
] |
Unregister all GeoPackage DAO with the connection source
@param connectionSource
connection source
|
[
"Unregister",
"all",
"GeoPackage",
"DAO",
"with",
"the",
"connection",
"source"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java#L44-L60
|
6,455 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java
|
GeoPackageDaoManager.unregisterDao
|
public static void unregisterDao(ConnectionSource connectionSource,
Class<?>... classes) {
for (Class<?> clazz : classes) {
unregisterDao(connectionSource, clazz);
}
}
|
java
|
public static void unregisterDao(ConnectionSource connectionSource,
Class<?>... classes) {
for (Class<?> clazz : classes) {
unregisterDao(connectionSource, clazz);
}
}
|
[
"public",
"static",
"void",
"unregisterDao",
"(",
"ConnectionSource",
"connectionSource",
",",
"Class",
"<",
"?",
">",
"...",
"classes",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"clazz",
":",
"classes",
")",
"{",
"unregisterDao",
"(",
"connectionSource",
",",
"clazz",
")",
";",
"}",
"}"
] |
Unregister the provided DAO class types with the connection source
@param connectionSource
connection source
@param classes
DAO class types
|
[
"Unregister",
"the",
"provided",
"DAO",
"class",
"types",
"with",
"the",
"connection",
"source"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java#L70-L75
|
6,456 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java
|
GeoPackageDaoManager.unregisterDao
|
public static void unregisterDao(ConnectionSource connectionSource,
Class<?> clazz) {
Dao<?, ?> dao = DaoManager.lookupDao(connectionSource, clazz);
if (dao != null) {
DaoManager.unregisterDao(connectionSource, dao);
}
}
|
java
|
public static void unregisterDao(ConnectionSource connectionSource,
Class<?> clazz) {
Dao<?, ?> dao = DaoManager.lookupDao(connectionSource, clazz);
if (dao != null) {
DaoManager.unregisterDao(connectionSource, dao);
}
}
|
[
"public",
"static",
"void",
"unregisterDao",
"(",
"ConnectionSource",
"connectionSource",
",",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Dao",
"<",
"?",
",",
"?",
">",
"dao",
"=",
"DaoManager",
".",
"lookupDao",
"(",
"connectionSource",
",",
"clazz",
")",
";",
"if",
"(",
"dao",
"!=",
"null",
")",
"{",
"DaoManager",
".",
"unregisterDao",
"(",
"connectionSource",
",",
"dao",
")",
";",
"}",
"}"
] |
Unregister the provided
@param connectionSource
connection source
@param clazz
DAO class type
|
[
"Unregister",
"the",
"provided"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageDaoManager.java#L85-L93
|
6,457 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/core/contents/Contents.java
|
Contents.getGeometryColumns
|
public GeometryColumns getGeometryColumns() {
GeometryColumns result = null;
if (geometryColumns.size() > 1) {
// This shouldn't happen with the unique table name constraint on
// geometry columns
throw new GeoPackageException(
"Unexpected state. More than one GeometryColumn has a foreign key to the Contents. Count: "
+ geometryColumns.size());
} else if (geometryColumns.size() == 1) {
CloseableIterator<GeometryColumns> iterator = geometryColumns
.closeableIterator();
try {
result = iterator.next();
} finally {
try {
iterator.close();
} catch (IOException e) {
throw new GeoPackageException(
"Failed to close the Geometry Columns iterator", e);
}
}
}
return result;
}
|
java
|
public GeometryColumns getGeometryColumns() {
GeometryColumns result = null;
if (geometryColumns.size() > 1) {
// This shouldn't happen with the unique table name constraint on
// geometry columns
throw new GeoPackageException(
"Unexpected state. More than one GeometryColumn has a foreign key to the Contents. Count: "
+ geometryColumns.size());
} else if (geometryColumns.size() == 1) {
CloseableIterator<GeometryColumns> iterator = geometryColumns
.closeableIterator();
try {
result = iterator.next();
} finally {
try {
iterator.close();
} catch (IOException e) {
throw new GeoPackageException(
"Failed to close the Geometry Columns iterator", e);
}
}
}
return result;
}
|
[
"public",
"GeometryColumns",
"getGeometryColumns",
"(",
")",
"{",
"GeometryColumns",
"result",
"=",
"null",
";",
"if",
"(",
"geometryColumns",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"// This shouldn't happen with the unique table name constraint on",
"// geometry columns",
"throw",
"new",
"GeoPackageException",
"(",
"\"Unexpected state. More than one GeometryColumn has a foreign key to the Contents. Count: \"",
"+",
"geometryColumns",
".",
"size",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"geometryColumns",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"CloseableIterator",
"<",
"GeometryColumns",
">",
"iterator",
"=",
"geometryColumns",
".",
"closeableIterator",
"(",
")",
";",
"try",
"{",
"result",
"=",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"iterator",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to close the Geometry Columns iterator\"",
",",
"e",
")",
";",
"}",
"}",
"}",
"return",
"result",
";",
"}"
] |
Get the Geometry Columns, should only return one or no value
@return geometry columns
|
[
"Get",
"the",
"Geometry",
"Columns",
"should",
"only",
"return",
"one",
"or",
"no",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/core/contents/Contents.java#L453-L476
|
6,458 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/core/contents/Contents.java
|
Contents.getTileMatrixSet
|
public TileMatrixSet getTileMatrixSet() {
TileMatrixSet result = null;
if (tileMatrixSet.size() > 1) {
// This shouldn't happen with the table name primary key on tile
// matrix set
throw new GeoPackageException(
"Unexpected state. More than one TileMatrixSet has a foreign key to the Contents. Count: "
+ tileMatrixSet.size());
} else if (tileMatrixSet.size() == 1) {
CloseableIterator<TileMatrixSet> iterator = tileMatrixSet
.closeableIterator();
try {
result = iterator.next();
} finally {
try {
iterator.close();
} catch (IOException e) {
throw new GeoPackageException(
"Failed to close the Tile Matrix Set iterator", e);
}
}
}
return result;
}
|
java
|
public TileMatrixSet getTileMatrixSet() {
TileMatrixSet result = null;
if (tileMatrixSet.size() > 1) {
// This shouldn't happen with the table name primary key on tile
// matrix set
throw new GeoPackageException(
"Unexpected state. More than one TileMatrixSet has a foreign key to the Contents. Count: "
+ tileMatrixSet.size());
} else if (tileMatrixSet.size() == 1) {
CloseableIterator<TileMatrixSet> iterator = tileMatrixSet
.closeableIterator();
try {
result = iterator.next();
} finally {
try {
iterator.close();
} catch (IOException e) {
throw new GeoPackageException(
"Failed to close the Tile Matrix Set iterator", e);
}
}
}
return result;
}
|
[
"public",
"TileMatrixSet",
"getTileMatrixSet",
"(",
")",
"{",
"TileMatrixSet",
"result",
"=",
"null",
";",
"if",
"(",
"tileMatrixSet",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"// This shouldn't happen with the table name primary key on tile",
"// matrix set",
"throw",
"new",
"GeoPackageException",
"(",
"\"Unexpected state. More than one TileMatrixSet has a foreign key to the Contents. Count: \"",
"+",
"tileMatrixSet",
".",
"size",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"tileMatrixSet",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"CloseableIterator",
"<",
"TileMatrixSet",
">",
"iterator",
"=",
"tileMatrixSet",
".",
"closeableIterator",
"(",
")",
";",
"try",
"{",
"result",
"=",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"iterator",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to close the Tile Matrix Set iterator\"",
",",
"e",
")",
";",
"}",
"}",
"}",
"return",
"result",
";",
"}"
] |
Get the Tile Matrix Set, should only return one or no value
@return tile matrix set
|
[
"Get",
"the",
"Tile",
"Matrix",
"Set",
"should",
"only",
"return",
"one",
"or",
"no",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/core/contents/Contents.java#L483-L506
|
6,459 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserColumn.java
|
UserColumn.getTypeName
|
public String getTypeName() {
String type = null;
if (dataType != null) {
type = dataType.name();
}
return type;
}
|
java
|
public String getTypeName() {
String type = null;
if (dataType != null) {
type = dataType.name();
}
return type;
}
|
[
"public",
"String",
"getTypeName",
"(",
")",
"{",
"String",
"type",
"=",
"null",
";",
"if",
"(",
"dataType",
"!=",
"null",
")",
"{",
"type",
"=",
"dataType",
".",
"name",
"(",
")",
";",
"}",
"return",
"type",
";",
"}"
] |
Get the database type name
@return type name
|
[
"Get",
"the",
"database",
"type",
"name"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserColumn.java#L159-L165
|
6,460 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/user/UserColumn.java
|
UserColumn.validateMax
|
private void validateMax() {
if (max != null) {
if (dataType == null) {
throw new GeoPackageException(
"Column max is only supported for data typed columns. column: "
+ name + ", max: " + max);
} else if (dataType != GeoPackageDataType.TEXT
&& dataType != GeoPackageDataType.BLOB) {
throw new GeoPackageException(
"Column max is only supported for "
+ GeoPackageDataType.TEXT.name() + " and "
+ GeoPackageDataType.BLOB.name()
+ " columns. column: " + name + ", max: " + max
+ ", type: " + dataType.name());
}
}
}
|
java
|
private void validateMax() {
if (max != null) {
if (dataType == null) {
throw new GeoPackageException(
"Column max is only supported for data typed columns. column: "
+ name + ", max: " + max);
} else if (dataType != GeoPackageDataType.TEXT
&& dataType != GeoPackageDataType.BLOB) {
throw new GeoPackageException(
"Column max is only supported for "
+ GeoPackageDataType.TEXT.name() + " and "
+ GeoPackageDataType.BLOB.name()
+ " columns. column: " + name + ", max: " + max
+ ", type: " + dataType.name());
}
}
}
|
[
"private",
"void",
"validateMax",
"(",
")",
"{",
"if",
"(",
"max",
"!=",
"null",
")",
"{",
"if",
"(",
"dataType",
"==",
"null",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Column max is only supported for data typed columns. column: \"",
"+",
"name",
"+",
"\", max: \"",
"+",
"max",
")",
";",
"}",
"else",
"if",
"(",
"dataType",
"!=",
"GeoPackageDataType",
".",
"TEXT",
"&&",
"dataType",
"!=",
"GeoPackageDataType",
".",
"BLOB",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Column max is only supported for \"",
"+",
"GeoPackageDataType",
".",
"TEXT",
".",
"name",
"(",
")",
"+",
"\" and \"",
"+",
"GeoPackageDataType",
".",
"BLOB",
".",
"name",
"(",
")",
"+",
"\" columns. column: \"",
"+",
"name",
"+",
"\", max: \"",
"+",
"max",
"+",
"\", type: \"",
"+",
"dataType",
".",
"name",
"(",
")",
")",
";",
"}",
"}",
"}"
] |
Validate that if max is set, the data type is text or blob
|
[
"Validate",
"that",
"if",
"max",
"is",
"set",
"the",
"data",
"type",
"is",
"text",
"or",
"blob"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserColumn.java#L180-L198
|
6,461 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/DateConverter.java
|
DateConverter.converter
|
public static DateConverter converter(GeoPackageDataType type) {
DateConverter converter = null;
switch (type) {
case DATE:
converter = dateConverter();
break;
case DATETIME:
converter = dateTimeConverter();
break;
default:
throw new GeoPackageException("Not a date data type: " + type);
}
return converter;
}
|
java
|
public static DateConverter converter(GeoPackageDataType type) {
DateConverter converter = null;
switch (type) {
case DATE:
converter = dateConverter();
break;
case DATETIME:
converter = dateTimeConverter();
break;
default:
throw new GeoPackageException("Not a date data type: " + type);
}
return converter;
}
|
[
"public",
"static",
"DateConverter",
"converter",
"(",
"GeoPackageDataType",
"type",
")",
"{",
"DateConverter",
"converter",
"=",
"null",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"DATE",
":",
"converter",
"=",
"dateConverter",
"(",
")",
";",
"break",
";",
"case",
"DATETIME",
":",
"converter",
"=",
"dateTimeConverter",
"(",
")",
";",
"break",
";",
"default",
":",
"throw",
"new",
"GeoPackageException",
"(",
"\"Not a date data type: \"",
"+",
"type",
")",
";",
"}",
"return",
"converter",
";",
"}"
] |
Get a date converter for the data type
@param type
data type
@return date converter
|
[
"Get",
"a",
"date",
"converter",
"for",
"the",
"data",
"type"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/DateConverter.java#L47-L63
|
6,462 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/DateConverter.java
|
DateConverter.stringValue
|
public String stringValue(Date date) {
String value = null;
if (date != null) {
SimpleDateFormat sdf = formatters.get(0);
synchronized (sdf) {
value = sdf.format(date);
}
}
return value;
}
|
java
|
public String stringValue(Date date) {
String value = null;
if (date != null) {
SimpleDateFormat sdf = formatters.get(0);
synchronized (sdf) {
value = sdf.format(date);
}
}
return value;
}
|
[
"public",
"String",
"stringValue",
"(",
"Date",
"date",
")",
"{",
"String",
"value",
"=",
"null",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"SimpleDateFormat",
"sdf",
"=",
"formatters",
".",
"get",
"(",
"0",
")",
";",
"synchronized",
"(",
"sdf",
")",
"{",
"value",
"=",
"sdf",
".",
"format",
"(",
"date",
")",
";",
"}",
"}",
"return",
"value",
";",
"}"
] |
Get the formatted string date value of the date
@param date
date
@return formatted string date
|
[
"Get",
"the",
"formatted",
"string",
"date",
"value",
"of",
"the",
"date"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/DateConverter.java#L109-L118
|
6,463 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/db/DateConverter.java
|
DateConverter.dateValue
|
public Date dateValue(String date) {
Date value = null;
if (date != null) {
// Try each simple date formatter in order
ParseException exception = null;
for (SimpleDateFormat sdf : formatters) {
try {
synchronized (sdf) {
value = sdf.parse(date);
}
break;
} catch (ParseException e) {
if (exception == null) {
exception = e;
}
}
}
// If no value could be parsed throw the first expected parse
// format exception
if (value == null) {
throw new GeoPackageException("Failed to parse date string: "
+ date, exception);
}
}
return value;
}
|
java
|
public Date dateValue(String date) {
Date value = null;
if (date != null) {
// Try each simple date formatter in order
ParseException exception = null;
for (SimpleDateFormat sdf : formatters) {
try {
synchronized (sdf) {
value = sdf.parse(date);
}
break;
} catch (ParseException e) {
if (exception == null) {
exception = e;
}
}
}
// If no value could be parsed throw the first expected parse
// format exception
if (value == null) {
throw new GeoPackageException("Failed to parse date string: "
+ date, exception);
}
}
return value;
}
|
[
"public",
"Date",
"dateValue",
"(",
"String",
"date",
")",
"{",
"Date",
"value",
"=",
"null",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"// Try each simple date formatter in order",
"ParseException",
"exception",
"=",
"null",
";",
"for",
"(",
"SimpleDateFormat",
"sdf",
":",
"formatters",
")",
"{",
"try",
"{",
"synchronized",
"(",
"sdf",
")",
"{",
"value",
"=",
"sdf",
".",
"parse",
"(",
"date",
")",
";",
"}",
"break",
";",
"}",
"catch",
"(",
"ParseException",
"e",
")",
"{",
"if",
"(",
"exception",
"==",
"null",
")",
"{",
"exception",
"=",
"e",
";",
"}",
"}",
"}",
"// If no value could be parsed throw the first expected parse",
"// format exception",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to parse date string: \"",
"+",
"date",
",",
"exception",
")",
";",
"}",
"}",
"return",
"value",
";",
"}"
] |
Get the date value of the formatted string date
@param date
formatted string date
@return date
|
[
"Get",
"the",
"date",
"value",
"of",
"the",
"formatted",
"string",
"date"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/DateConverter.java#L127-L155
|
6,464 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.setAlgorithm
|
public void setAlgorithm(CoverageDataAlgorithm algorithm) {
if (algorithm == null) {
algorithm = CoverageDataAlgorithm.NEAREST_NEIGHBOR;
}
this.algorithm = algorithm;
}
|
java
|
public void setAlgorithm(CoverageDataAlgorithm algorithm) {
if (algorithm == null) {
algorithm = CoverageDataAlgorithm.NEAREST_NEIGHBOR;
}
this.algorithm = algorithm;
}
|
[
"public",
"void",
"setAlgorithm",
"(",
"CoverageDataAlgorithm",
"algorithm",
")",
"{",
"if",
"(",
"algorithm",
"==",
"null",
")",
"{",
"algorithm",
"=",
"CoverageDataAlgorithm",
".",
"NEAREST_NEIGHBOR",
";",
"}",
"this",
".",
"algorithm",
"=",
"algorithm",
";",
"}"
] |
Set the interpolation algorithm
@param algorithm
algorithm type
|
[
"Set",
"the",
"interpolation",
"algorithm"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L409-L414
|
6,465 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.setEncoding
|
public void setEncoding(GriddedCoverageEncodingType encoding) {
if (encoding == null) {
encoding = GriddedCoverageEncodingType.CENTER;
}
this.encoding = encoding;
}
|
java
|
public void setEncoding(GriddedCoverageEncodingType encoding) {
if (encoding == null) {
encoding = GriddedCoverageEncodingType.CENTER;
}
this.encoding = encoding;
}
|
[
"public",
"void",
"setEncoding",
"(",
"GriddedCoverageEncodingType",
"encoding",
")",
"{",
"if",
"(",
"encoding",
"==",
"null",
")",
"{",
"encoding",
"=",
"GriddedCoverageEncodingType",
".",
"CENTER",
";",
"}",
"this",
".",
"encoding",
"=",
"encoding",
";",
"}"
] |
Set the value pixel encoding type
@param encoding
encoding type
@since 2.0.1
|
[
"Set",
"the",
"value",
"pixel",
"encoding",
"type"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L433-L438
|
6,466 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.queryGriddedCoverage
|
public GriddedCoverage queryGriddedCoverage() {
try {
if (griddedCoverageDao.isTableExists()) {
griddedCoverage = griddedCoverageDao.query(tileMatrixSet);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to get Gridded Coverage for table name: "
+ tileMatrixSet.getTableName(), e);
}
return griddedCoverage;
}
|
java
|
public GriddedCoverage queryGriddedCoverage() {
try {
if (griddedCoverageDao.isTableExists()) {
griddedCoverage = griddedCoverageDao.query(tileMatrixSet);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to get Gridded Coverage for table name: "
+ tileMatrixSet.getTableName(), e);
}
return griddedCoverage;
}
|
[
"public",
"GriddedCoverage",
"queryGriddedCoverage",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"griddedCoverageDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"griddedCoverage",
"=",
"griddedCoverageDao",
".",
"query",
"(",
"tileMatrixSet",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to get Gridded Coverage for table name: \"",
"+",
"tileMatrixSet",
".",
"getTableName",
"(",
")",
",",
"e",
")",
";",
"}",
"return",
"griddedCoverage",
";",
"}"
] |
Query and update the gridded coverage
@return gridded coverage
|
[
"Query",
"and",
"update",
"the",
"gridded",
"coverage"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L496-L507
|
6,467 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getGriddedTile
|
public List<GriddedTile> getGriddedTile() {
List<GriddedTile> griddedTile = null;
try {
if (griddedTileDao.isTableExists()) {
griddedTile = griddedTileDao
.query(tileMatrixSet.getTableName());
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to get Gridded Tile for table name: "
+ tileMatrixSet.getTableName(), e);
}
return griddedTile;
}
|
java
|
public List<GriddedTile> getGriddedTile() {
List<GriddedTile> griddedTile = null;
try {
if (griddedTileDao.isTableExists()) {
griddedTile = griddedTileDao
.query(tileMatrixSet.getTableName());
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to get Gridded Tile for table name: "
+ tileMatrixSet.getTableName(), e);
}
return griddedTile;
}
|
[
"public",
"List",
"<",
"GriddedTile",
">",
"getGriddedTile",
"(",
")",
"{",
"List",
"<",
"GriddedTile",
">",
"griddedTile",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"griddedTileDao",
".",
"isTableExists",
"(",
")",
")",
"{",
"griddedTile",
"=",
"griddedTileDao",
".",
"query",
"(",
"tileMatrixSet",
".",
"getTableName",
"(",
")",
")",
";",
"}",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"throw",
"new",
"GeoPackageException",
"(",
"\"Failed to get Gridded Tile for table name: \"",
"+",
"tileMatrixSet",
".",
"getTableName",
"(",
")",
",",
"e",
")",
";",
"}",
"return",
"griddedTile",
";",
"}"
] |
Get the gridded tile
@return gridded tiles
|
[
"Get",
"the",
"gridded",
"tile"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L514-L527
|
6,468 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getDataNull
|
public Double getDataNull() {
Double dataNull = null;
if (griddedCoverage != null) {
dataNull = griddedCoverage.getDataNull();
}
return dataNull;
}
|
java
|
public Double getDataNull() {
Double dataNull = null;
if (griddedCoverage != null) {
dataNull = griddedCoverage.getDataNull();
}
return dataNull;
}
|
[
"public",
"Double",
"getDataNull",
"(",
")",
"{",
"Double",
"dataNull",
"=",
"null",
";",
"if",
"(",
"griddedCoverage",
"!=",
"null",
")",
"{",
"dataNull",
"=",
"griddedCoverage",
".",
"getDataNull",
"(",
")",
";",
"}",
"return",
"dataNull",
";",
"}"
] |
Get the data null value
@return data null value or null
|
[
"Get",
"the",
"data",
"null",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L557-L565
|
6,469 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.isDataNull
|
public boolean isDataNull(double value) {
Double dataNull = getDataNull();
boolean isDataNull = dataNull != null && dataNull == value;
return isDataNull;
}
|
java
|
public boolean isDataNull(double value) {
Double dataNull = getDataNull();
boolean isDataNull = dataNull != null && dataNull == value;
return isDataNull;
}
|
[
"public",
"boolean",
"isDataNull",
"(",
"double",
"value",
")",
"{",
"Double",
"dataNull",
"=",
"getDataNull",
"(",
")",
";",
"boolean",
"isDataNull",
"=",
"dataNull",
"!=",
"null",
"&&",
"dataNull",
"==",
"value",
";",
"return",
"isDataNull",
";",
"}"
] |
Check the pixel value to see if it is the null equivalent
@param value
pixel value
@return true if equivalent to data null
|
[
"Check",
"the",
"pixel",
"value",
"to",
"see",
"if",
"it",
"is",
"the",
"null",
"equivalent"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L574-L578
|
6,470 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.reprojectCoverageData
|
protected Double[][] reprojectCoverageData(Double[][] values,
int requestedCoverageWidth, int requestedCoverageHeight,
BoundingBox requestBoundingBox,
ProjectionTransform transformRequestToCoverage,
BoundingBox coverageBoundingBox) {
final double requestedWidthUnitsPerPixel = (requestBoundingBox
.getMaxLongitude() - requestBoundingBox.getMinLongitude())
/ requestedCoverageWidth;
final double requestedHeightUnitsPerPixel = (requestBoundingBox
.getMaxLatitude() - requestBoundingBox.getMinLatitude())
/ requestedCoverageHeight;
final double tilesDistanceWidth = coverageBoundingBox.getMaxLongitude()
- coverageBoundingBox.getMinLongitude();
final double tilesDistanceHeight = coverageBoundingBox.getMaxLatitude()
- coverageBoundingBox.getMinLatitude();
final int width = values[0].length;
final int height = values.length;
Double[][] projectedValues = new Double[requestedCoverageHeight][requestedCoverageWidth];
// Retrieve each coverage data value in the unprojected coverage data
for (int y = 0; y < requestedCoverageHeight; y++) {
for (int x = 0; x < requestedCoverageWidth; x++) {
double longitude = requestBoundingBox.getMinLongitude()
+ (x * requestedWidthUnitsPerPixel);
double latitude = requestBoundingBox.getMaxLatitude()
- (y * requestedHeightUnitsPerPixel);
ProjCoordinate fromCoord = new ProjCoordinate(longitude,
latitude);
ProjCoordinate toCoord = transformRequestToCoverage
.transform(fromCoord);
double projectedLongitude = toCoord.x;
double projectedLatitude = toCoord.y;
int xPixel = (int) Math
.round(((projectedLongitude - coverageBoundingBox
.getMinLongitude()) / tilesDistanceWidth)
* width);
int yPixel = (int) Math
.round(((coverageBoundingBox.getMaxLatitude() - projectedLatitude) / tilesDistanceHeight)
* height);
xPixel = Math.max(0, xPixel);
xPixel = Math.min(width - 1, xPixel);
yPixel = Math.max(0, yPixel);
yPixel = Math.min(height - 1, yPixel);
Double coverageData = values[yPixel][xPixel];
projectedValues[y][x] = coverageData;
}
}
return projectedValues;
}
|
java
|
protected Double[][] reprojectCoverageData(Double[][] values,
int requestedCoverageWidth, int requestedCoverageHeight,
BoundingBox requestBoundingBox,
ProjectionTransform transformRequestToCoverage,
BoundingBox coverageBoundingBox) {
final double requestedWidthUnitsPerPixel = (requestBoundingBox
.getMaxLongitude() - requestBoundingBox.getMinLongitude())
/ requestedCoverageWidth;
final double requestedHeightUnitsPerPixel = (requestBoundingBox
.getMaxLatitude() - requestBoundingBox.getMinLatitude())
/ requestedCoverageHeight;
final double tilesDistanceWidth = coverageBoundingBox.getMaxLongitude()
- coverageBoundingBox.getMinLongitude();
final double tilesDistanceHeight = coverageBoundingBox.getMaxLatitude()
- coverageBoundingBox.getMinLatitude();
final int width = values[0].length;
final int height = values.length;
Double[][] projectedValues = new Double[requestedCoverageHeight][requestedCoverageWidth];
// Retrieve each coverage data value in the unprojected coverage data
for (int y = 0; y < requestedCoverageHeight; y++) {
for (int x = 0; x < requestedCoverageWidth; x++) {
double longitude = requestBoundingBox.getMinLongitude()
+ (x * requestedWidthUnitsPerPixel);
double latitude = requestBoundingBox.getMaxLatitude()
- (y * requestedHeightUnitsPerPixel);
ProjCoordinate fromCoord = new ProjCoordinate(longitude,
latitude);
ProjCoordinate toCoord = transformRequestToCoverage
.transform(fromCoord);
double projectedLongitude = toCoord.x;
double projectedLatitude = toCoord.y;
int xPixel = (int) Math
.round(((projectedLongitude - coverageBoundingBox
.getMinLongitude()) / tilesDistanceWidth)
* width);
int yPixel = (int) Math
.round(((coverageBoundingBox.getMaxLatitude() - projectedLatitude) / tilesDistanceHeight)
* height);
xPixel = Math.max(0, xPixel);
xPixel = Math.min(width - 1, xPixel);
yPixel = Math.max(0, yPixel);
yPixel = Math.min(height - 1, yPixel);
Double coverageData = values[yPixel][xPixel];
projectedValues[y][x] = coverageData;
}
}
return projectedValues;
}
|
[
"protected",
"Double",
"[",
"]",
"[",
"]",
"reprojectCoverageData",
"(",
"Double",
"[",
"]",
"[",
"]",
"values",
",",
"int",
"requestedCoverageWidth",
",",
"int",
"requestedCoverageHeight",
",",
"BoundingBox",
"requestBoundingBox",
",",
"ProjectionTransform",
"transformRequestToCoverage",
",",
"BoundingBox",
"coverageBoundingBox",
")",
"{",
"final",
"double",
"requestedWidthUnitsPerPixel",
"=",
"(",
"requestBoundingBox",
".",
"getMaxLongitude",
"(",
")",
"-",
"requestBoundingBox",
".",
"getMinLongitude",
"(",
")",
")",
"/",
"requestedCoverageWidth",
";",
"final",
"double",
"requestedHeightUnitsPerPixel",
"=",
"(",
"requestBoundingBox",
".",
"getMaxLatitude",
"(",
")",
"-",
"requestBoundingBox",
".",
"getMinLatitude",
"(",
")",
")",
"/",
"requestedCoverageHeight",
";",
"final",
"double",
"tilesDistanceWidth",
"=",
"coverageBoundingBox",
".",
"getMaxLongitude",
"(",
")",
"-",
"coverageBoundingBox",
".",
"getMinLongitude",
"(",
")",
";",
"final",
"double",
"tilesDistanceHeight",
"=",
"coverageBoundingBox",
".",
"getMaxLatitude",
"(",
")",
"-",
"coverageBoundingBox",
".",
"getMinLatitude",
"(",
")",
";",
"final",
"int",
"width",
"=",
"values",
"[",
"0",
"]",
".",
"length",
";",
"final",
"int",
"height",
"=",
"values",
".",
"length",
";",
"Double",
"[",
"]",
"[",
"]",
"projectedValues",
"=",
"new",
"Double",
"[",
"requestedCoverageHeight",
"]",
"[",
"requestedCoverageWidth",
"]",
";",
"// Retrieve each coverage data value in the unprojected coverage data",
"for",
"(",
"int",
"y",
"=",
"0",
";",
"y",
"<",
"requestedCoverageHeight",
";",
"y",
"++",
")",
"{",
"for",
"(",
"int",
"x",
"=",
"0",
";",
"x",
"<",
"requestedCoverageWidth",
";",
"x",
"++",
")",
"{",
"double",
"longitude",
"=",
"requestBoundingBox",
".",
"getMinLongitude",
"(",
")",
"+",
"(",
"x",
"*",
"requestedWidthUnitsPerPixel",
")",
";",
"double",
"latitude",
"=",
"requestBoundingBox",
".",
"getMaxLatitude",
"(",
")",
"-",
"(",
"y",
"*",
"requestedHeightUnitsPerPixel",
")",
";",
"ProjCoordinate",
"fromCoord",
"=",
"new",
"ProjCoordinate",
"(",
"longitude",
",",
"latitude",
")",
";",
"ProjCoordinate",
"toCoord",
"=",
"transformRequestToCoverage",
".",
"transform",
"(",
"fromCoord",
")",
";",
"double",
"projectedLongitude",
"=",
"toCoord",
".",
"x",
";",
"double",
"projectedLatitude",
"=",
"toCoord",
".",
"y",
";",
"int",
"xPixel",
"=",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"(",
"(",
"projectedLongitude",
"-",
"coverageBoundingBox",
".",
"getMinLongitude",
"(",
")",
")",
"/",
"tilesDistanceWidth",
")",
"*",
"width",
")",
";",
"int",
"yPixel",
"=",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"(",
"(",
"coverageBoundingBox",
".",
"getMaxLatitude",
"(",
")",
"-",
"projectedLatitude",
")",
"/",
"tilesDistanceHeight",
")",
"*",
"height",
")",
";",
"xPixel",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"xPixel",
")",
";",
"xPixel",
"=",
"Math",
".",
"min",
"(",
"width",
"-",
"1",
",",
"xPixel",
")",
";",
"yPixel",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"yPixel",
")",
";",
"yPixel",
"=",
"Math",
".",
"min",
"(",
"height",
"-",
"1",
",",
"yPixel",
")",
";",
"Double",
"coverageData",
"=",
"values",
"[",
"yPixel",
"]",
"[",
"xPixel",
"]",
";",
"projectedValues",
"[",
"y",
"]",
"[",
"x",
"]",
"=",
"coverageData",
";",
"}",
"}",
"return",
"projectedValues",
";",
"}"
] |
Reproject the coverage data to the requested projection
@param values
coverage data values
@param requestedCoverageWidth
requested coverage data width
@param requestedCoverageHeight
requested coverage data height
@param requestBoundingBox
request bounding box in the request projection
@param transformRequestToCoverage
transformation from request to coverage data
@param coverageBoundingBox
coverage data bounding box
@return projected coverage data
|
[
"Reproject",
"the",
"coverage",
"data",
"to",
"the",
"requested",
"projection"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L608-L666
|
6,471 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.formatUnboundedResults
|
protected Double[][] formatUnboundedResults(TileMatrix tileMatrix,
Map<Long, Map<Long, Double[][]>> rowsMap, int tileCount,
long minRow, long maxRow, long minColumn, long maxColumn) {
// Handle formatting the results
Double[][] values = null;
if (!rowsMap.isEmpty()) {
// If only one tile result, use the coverage data as the result
if (tileCount == 1) {
values = rowsMap.get(minRow).get(minColumn);
} else {
// Else, combine all results into a single coverage data result
// Get the top left and bottom right coverage data values
Double[][] topLeft = rowsMap.get(minRow).get(minColumn);
Double[][] bottomRight = rowsMap.get(maxRow).get(maxColumn);
// Determine the width and height of the top left coverage data
// results
int firstWidth = topLeft[0].length;
int firstHeight = topLeft.length;
// Determine the final result width and height
int width = firstWidth;
int height = firstHeight;
if (minColumn < maxColumn) {
width += bottomRight[0].length;
long middleColumns = maxColumn - minColumn - 1;
if (middleColumns > 0) {
width += (middleColumns * tileMatrix.getTileWidth());
}
}
if (minRow < maxRow) {
height += bottomRight.length;
long middleRows = maxRow - minRow - 1;
if (middleRows > 0) {
height += (middleRows * tileMatrix.getTileHeight());
}
}
// Create the coverage data result array
values = new Double[height][width];
// Copy the coverage data values from each tile results into the
// final result arrays
for (Map.Entry<Long, Map<Long, Double[][]>> rows : rowsMap
.entrySet()) {
// Determine the starting base row for this tile
long row = rows.getKey();
int baseRow = 0;
if (minRow < row) {
baseRow = firstHeight
+ (int) ((row - minRow - 1) * tileMatrix
.getTileHeight());
}
// Get the row's columns map
Map<Long, Double[][]> columnsMap = rows.getValue();
for (Map.Entry<Long, Double[][]> columns : columnsMap
.entrySet()) {
// Determine the starting base column for this tile
long column = columns.getKey();
int baseColumn = 0;
if (minColumn < column) {
baseColumn = firstWidth
+ (int) ((column - minColumn - 1) * tileMatrix
.getTileWidth());
}
// Get the tiles coverage data values
Double[][] localValues = columns.getValue();
// Copy the columns array at each local coverage data
// row to the global row and column result location
for (int localRow = 0; localRow < localValues.length; localRow++) {
int globalRow = baseRow + localRow;
System.arraycopy(localValues[localRow], 0,
values[globalRow], baseColumn,
localValues[localRow].length);
}
}
}
}
}
return values;
}
|
java
|
protected Double[][] formatUnboundedResults(TileMatrix tileMatrix,
Map<Long, Map<Long, Double[][]>> rowsMap, int tileCount,
long minRow, long maxRow, long minColumn, long maxColumn) {
// Handle formatting the results
Double[][] values = null;
if (!rowsMap.isEmpty()) {
// If only one tile result, use the coverage data as the result
if (tileCount == 1) {
values = rowsMap.get(minRow).get(minColumn);
} else {
// Else, combine all results into a single coverage data result
// Get the top left and bottom right coverage data values
Double[][] topLeft = rowsMap.get(minRow).get(minColumn);
Double[][] bottomRight = rowsMap.get(maxRow).get(maxColumn);
// Determine the width and height of the top left coverage data
// results
int firstWidth = topLeft[0].length;
int firstHeight = topLeft.length;
// Determine the final result width and height
int width = firstWidth;
int height = firstHeight;
if (minColumn < maxColumn) {
width += bottomRight[0].length;
long middleColumns = maxColumn - minColumn - 1;
if (middleColumns > 0) {
width += (middleColumns * tileMatrix.getTileWidth());
}
}
if (minRow < maxRow) {
height += bottomRight.length;
long middleRows = maxRow - minRow - 1;
if (middleRows > 0) {
height += (middleRows * tileMatrix.getTileHeight());
}
}
// Create the coverage data result array
values = new Double[height][width];
// Copy the coverage data values from each tile results into the
// final result arrays
for (Map.Entry<Long, Map<Long, Double[][]>> rows : rowsMap
.entrySet()) {
// Determine the starting base row for this tile
long row = rows.getKey();
int baseRow = 0;
if (minRow < row) {
baseRow = firstHeight
+ (int) ((row - minRow - 1) * tileMatrix
.getTileHeight());
}
// Get the row's columns map
Map<Long, Double[][]> columnsMap = rows.getValue();
for (Map.Entry<Long, Double[][]> columns : columnsMap
.entrySet()) {
// Determine the starting base column for this tile
long column = columns.getKey();
int baseColumn = 0;
if (minColumn < column) {
baseColumn = firstWidth
+ (int) ((column - minColumn - 1) * tileMatrix
.getTileWidth());
}
// Get the tiles coverage data values
Double[][] localValues = columns.getValue();
// Copy the columns array at each local coverage data
// row to the global row and column result location
for (int localRow = 0; localRow < localValues.length; localRow++) {
int globalRow = baseRow + localRow;
System.arraycopy(localValues[localRow], 0,
values[globalRow], baseColumn,
localValues[localRow].length);
}
}
}
}
}
return values;
}
|
[
"protected",
"Double",
"[",
"]",
"[",
"]",
"formatUnboundedResults",
"(",
"TileMatrix",
"tileMatrix",
",",
"Map",
"<",
"Long",
",",
"Map",
"<",
"Long",
",",
"Double",
"[",
"]",
"[",
"]",
">",
">",
"rowsMap",
",",
"int",
"tileCount",
",",
"long",
"minRow",
",",
"long",
"maxRow",
",",
"long",
"minColumn",
",",
"long",
"maxColumn",
")",
"{",
"// Handle formatting the results",
"Double",
"[",
"]",
"[",
"]",
"values",
"=",
"null",
";",
"if",
"(",
"!",
"rowsMap",
".",
"isEmpty",
"(",
")",
")",
"{",
"// If only one tile result, use the coverage data as the result",
"if",
"(",
"tileCount",
"==",
"1",
")",
"{",
"values",
"=",
"rowsMap",
".",
"get",
"(",
"minRow",
")",
".",
"get",
"(",
"minColumn",
")",
";",
"}",
"else",
"{",
"// Else, combine all results into a single coverage data result",
"// Get the top left and bottom right coverage data values",
"Double",
"[",
"]",
"[",
"]",
"topLeft",
"=",
"rowsMap",
".",
"get",
"(",
"minRow",
")",
".",
"get",
"(",
"minColumn",
")",
";",
"Double",
"[",
"]",
"[",
"]",
"bottomRight",
"=",
"rowsMap",
".",
"get",
"(",
"maxRow",
")",
".",
"get",
"(",
"maxColumn",
")",
";",
"// Determine the width and height of the top left coverage data",
"// results",
"int",
"firstWidth",
"=",
"topLeft",
"[",
"0",
"]",
".",
"length",
";",
"int",
"firstHeight",
"=",
"topLeft",
".",
"length",
";",
"// Determine the final result width and height",
"int",
"width",
"=",
"firstWidth",
";",
"int",
"height",
"=",
"firstHeight",
";",
"if",
"(",
"minColumn",
"<",
"maxColumn",
")",
"{",
"width",
"+=",
"bottomRight",
"[",
"0",
"]",
".",
"length",
";",
"long",
"middleColumns",
"=",
"maxColumn",
"-",
"minColumn",
"-",
"1",
";",
"if",
"(",
"middleColumns",
">",
"0",
")",
"{",
"width",
"+=",
"(",
"middleColumns",
"*",
"tileMatrix",
".",
"getTileWidth",
"(",
")",
")",
";",
"}",
"}",
"if",
"(",
"minRow",
"<",
"maxRow",
")",
"{",
"height",
"+=",
"bottomRight",
".",
"length",
";",
"long",
"middleRows",
"=",
"maxRow",
"-",
"minRow",
"-",
"1",
";",
"if",
"(",
"middleRows",
">",
"0",
")",
"{",
"height",
"+=",
"(",
"middleRows",
"*",
"tileMatrix",
".",
"getTileHeight",
"(",
")",
")",
";",
"}",
"}",
"// Create the coverage data result array",
"values",
"=",
"new",
"Double",
"[",
"height",
"]",
"[",
"width",
"]",
";",
"// Copy the coverage data values from each tile results into the",
"// final result arrays",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Long",
",",
"Map",
"<",
"Long",
",",
"Double",
"[",
"]",
"[",
"]",
">",
">",
"rows",
":",
"rowsMap",
".",
"entrySet",
"(",
")",
")",
"{",
"// Determine the starting base row for this tile",
"long",
"row",
"=",
"rows",
".",
"getKey",
"(",
")",
";",
"int",
"baseRow",
"=",
"0",
";",
"if",
"(",
"minRow",
"<",
"row",
")",
"{",
"baseRow",
"=",
"firstHeight",
"+",
"(",
"int",
")",
"(",
"(",
"row",
"-",
"minRow",
"-",
"1",
")",
"*",
"tileMatrix",
".",
"getTileHeight",
"(",
")",
")",
";",
"}",
"// Get the row's columns map",
"Map",
"<",
"Long",
",",
"Double",
"[",
"]",
"[",
"]",
">",
"columnsMap",
"=",
"rows",
".",
"getValue",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Long",
",",
"Double",
"[",
"]",
"[",
"]",
">",
"columns",
":",
"columnsMap",
".",
"entrySet",
"(",
")",
")",
"{",
"// Determine the starting base column for this tile",
"long",
"column",
"=",
"columns",
".",
"getKey",
"(",
")",
";",
"int",
"baseColumn",
"=",
"0",
";",
"if",
"(",
"minColumn",
"<",
"column",
")",
"{",
"baseColumn",
"=",
"firstWidth",
"+",
"(",
"int",
")",
"(",
"(",
"column",
"-",
"minColumn",
"-",
"1",
")",
"*",
"tileMatrix",
".",
"getTileWidth",
"(",
")",
")",
";",
"}",
"// Get the tiles coverage data values",
"Double",
"[",
"]",
"[",
"]",
"localValues",
"=",
"columns",
".",
"getValue",
"(",
")",
";",
"// Copy the columns array at each local coverage data",
"// row to the global row and column result location",
"for",
"(",
"int",
"localRow",
"=",
"0",
";",
"localRow",
"<",
"localValues",
".",
"length",
";",
"localRow",
"++",
")",
"{",
"int",
"globalRow",
"=",
"baseRow",
"+",
"localRow",
";",
"System",
".",
"arraycopy",
"(",
"localValues",
"[",
"localRow",
"]",
",",
"0",
",",
"values",
"[",
"globalRow",
"]",
",",
"baseColumn",
",",
"localValues",
"[",
"localRow",
"]",
".",
"length",
")",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"values",
";",
"}"
] |
Format the unbounded results from coverage data tiles into a single
double array of coverage data
@param tileMatrix
tile matrix
@param rowsMap
rows map
@param tileCount
tile count
@param minRow
min row
@param maxRow
max row
@param minColumn
min column
@param maxColumn
max column
@return coverage data
|
[
"Format",
"the",
"unbounded",
"results",
"from",
"coverage",
"data",
"tiles",
"into",
"a",
"single",
"double",
"array",
"of",
"coverage",
"data"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L688-L783
|
6,472 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getXSource
|
protected float getXSource(int x, float destLeft, float srcLeft,
float widthRatio) {
float dest = getXEncodedLocation(x, encoding);
float source = getSource(dest, destLeft, srcLeft, widthRatio);
return source;
}
|
java
|
protected float getXSource(int x, float destLeft, float srcLeft,
float widthRatio) {
float dest = getXEncodedLocation(x, encoding);
float source = getSource(dest, destLeft, srcLeft, widthRatio);
return source;
}
|
[
"protected",
"float",
"getXSource",
"(",
"int",
"x",
",",
"float",
"destLeft",
",",
"float",
"srcLeft",
",",
"float",
"widthRatio",
")",
"{",
"float",
"dest",
"=",
"getXEncodedLocation",
"(",
"x",
",",
"encoding",
")",
";",
"float",
"source",
"=",
"getSource",
"(",
"dest",
",",
"destLeft",
",",
"srcLeft",
",",
"widthRatio",
")",
";",
"return",
"source",
";",
"}"
] |
Determine the x source pixel location
@param x
x pixel
@param destLeft
destination left most pixel
@param srcLeft
source left most pixel
@param widthRatio
source over destination width ratio
@return x source pixel
|
[
"Determine",
"the",
"x",
"source",
"pixel",
"location"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L798-L805
|
6,473 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getYSource
|
protected float getYSource(int y, float destTop, float srcTop,
float heightRatio) {
float dest = getYEncodedLocation(y, encoding);
float source = getSource(dest, destTop, srcTop, heightRatio);
return source;
}
|
java
|
protected float getYSource(int y, float destTop, float srcTop,
float heightRatio) {
float dest = getYEncodedLocation(y, encoding);
float source = getSource(dest, destTop, srcTop, heightRatio);
return source;
}
|
[
"protected",
"float",
"getYSource",
"(",
"int",
"y",
",",
"float",
"destTop",
",",
"float",
"srcTop",
",",
"float",
"heightRatio",
")",
"{",
"float",
"dest",
"=",
"getYEncodedLocation",
"(",
"y",
",",
"encoding",
")",
";",
"float",
"source",
"=",
"getSource",
"(",
"dest",
",",
"destTop",
",",
"srcTop",
",",
"heightRatio",
")",
";",
"return",
"source",
";",
"}"
] |
Determine the y source pixel location
@param y
y pixel
@param destTop
destination top most pixel
@param srcTop
source top most pixel
@param heightRatio
source over destination height ratio
@return y source pixel
|
[
"Determine",
"the",
"y",
"source",
"pixel",
"location"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L820-L827
|
6,474 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getSource
|
private float getSource(float dest, float destMin, float srcMin, float ratio) {
float destDistance = dest - destMin;
float srcDistance = destDistance * ratio;
float ySource = srcMin + srcDistance;
return ySource;
}
|
java
|
private float getSource(float dest, float destMin, float srcMin, float ratio) {
float destDistance = dest - destMin;
float srcDistance = destDistance * ratio;
float ySource = srcMin + srcDistance;
return ySource;
}
|
[
"private",
"float",
"getSource",
"(",
"float",
"dest",
",",
"float",
"destMin",
",",
"float",
"srcMin",
",",
"float",
"ratio",
")",
"{",
"float",
"destDistance",
"=",
"dest",
"-",
"destMin",
";",
"float",
"srcDistance",
"=",
"destDistance",
"*",
"ratio",
";",
"float",
"ySource",
"=",
"srcMin",
"+",
"srcDistance",
";",
"return",
"ySource",
";",
"}"
] |
Determine the source pixel location
@param dest
destination pixel location
@param destMin
destination minimum most pixel
@param srcMin
source minimum most pixel
@param ratio
source over destination length ratio
@return source pixel
|
[
"Determine",
"the",
"source",
"pixel",
"location"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L842-L849
|
6,475 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getXEncodedLocation
|
private float getXEncodedLocation(float x,
GriddedCoverageEncodingType encodingType) {
float xLocation = x;
switch (encodingType) {
case CENTER:
case AREA:
xLocation += 0.5f;
break;
case CORNER:
break;
default:
throw new GeoPackageException("Unsupported Encoding Type: "
+ encodingType);
}
return xLocation;
}
|
java
|
private float getXEncodedLocation(float x,
GriddedCoverageEncodingType encodingType) {
float xLocation = x;
switch (encodingType) {
case CENTER:
case AREA:
xLocation += 0.5f;
break;
case CORNER:
break;
default:
throw new GeoPackageException("Unsupported Encoding Type: "
+ encodingType);
}
return xLocation;
}
|
[
"private",
"float",
"getXEncodedLocation",
"(",
"float",
"x",
",",
"GriddedCoverageEncodingType",
"encodingType",
")",
"{",
"float",
"xLocation",
"=",
"x",
";",
"switch",
"(",
"encodingType",
")",
"{",
"case",
"CENTER",
":",
"case",
"AREA",
":",
"xLocation",
"+=",
"0.5f",
";",
"break",
";",
"case",
"CORNER",
":",
"break",
";",
"default",
":",
"throw",
"new",
"GeoPackageException",
"(",
"\"Unsupported Encoding Type: \"",
"+",
"encodingType",
")",
";",
"}",
"return",
"xLocation",
";",
"}"
] |
Get the X encoded location from the base provided x
@param x
x location
@param encodingType
pixel encoding type
@return encoded x location
|
[
"Get",
"the",
"X",
"encoded",
"location",
"from",
"the",
"base",
"provided",
"x"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L860-L878
|
6,476 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getYEncodedLocation
|
private float getYEncodedLocation(float y,
GriddedCoverageEncodingType encodingType) {
float yLocation = y;
switch (encodingType) {
case CENTER:
case AREA:
yLocation += 0.5f;
break;
case CORNER:
yLocation += 1.0f;
break;
default:
throw new GeoPackageException("Unsupported Encoding Type: "
+ encodingType);
}
return yLocation;
}
|
java
|
private float getYEncodedLocation(float y,
GriddedCoverageEncodingType encodingType) {
float yLocation = y;
switch (encodingType) {
case CENTER:
case AREA:
yLocation += 0.5f;
break;
case CORNER:
yLocation += 1.0f;
break;
default:
throw new GeoPackageException("Unsupported Encoding Type: "
+ encodingType);
}
return yLocation;
}
|
[
"private",
"float",
"getYEncodedLocation",
"(",
"float",
"y",
",",
"GriddedCoverageEncodingType",
"encodingType",
")",
"{",
"float",
"yLocation",
"=",
"y",
";",
"switch",
"(",
"encodingType",
")",
"{",
"case",
"CENTER",
":",
"case",
"AREA",
":",
"yLocation",
"+=",
"0.5f",
";",
"break",
";",
"case",
"CORNER",
":",
"yLocation",
"+=",
"1.0f",
";",
"break",
";",
"default",
":",
"throw",
"new",
"GeoPackageException",
"(",
"\"Unsupported Encoding Type: \"",
"+",
"encodingType",
")",
";",
"}",
"return",
"yLocation",
";",
"}"
] |
Get the Y encoded location from the base provided y
@param y
y location
@param encodingType
pixel encoding type
@return encoded y location
|
[
"Get",
"the",
"Y",
"encoded",
"location",
"from",
"the",
"base",
"provided",
"y"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L889-L908
|
6,477 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getNearestNeighbors
|
protected List<int[]> getNearestNeighbors(float xSource, float ySource) {
List<int[]> results = new ArrayList<int[]>();
// Get the coverage data source pixels for x and y
CoverageDataSourcePixel xPixel = getXSourceMinAndMax(xSource);
CoverageDataSourcePixel yPixel = getYSourceMinAndMax(ySource);
// Determine which x pixel is the closest, the second closest, and the
// distance to the second pixel
int firstX;
int secondX;
float xDistance;
if (xPixel.getOffset() > .5) {
firstX = xPixel.getMax();
secondX = xPixel.getMin();
xDistance = 1.0f - xPixel.getOffset();
} else {
firstX = xPixel.getMin();
secondX = xPixel.getMax();
xDistance = xPixel.getOffset();
}
// Determine which y pixel is the closest, the second closest, and the
// distance to the second pixel
int firstY;
int secondY;
float yDistance;
if (yPixel.getOffset() > .5) {
firstY = yPixel.getMax();
secondY = yPixel.getMin();
yDistance = 1.0f - yPixel.getOffset();
} else {
firstY = yPixel.getMin();
secondY = yPixel.getMax();
yDistance = yPixel.getOffset();
}
// Add the closest neighbor
results.add(new int[] { firstX, firstY });
// Add the second and third neighbor based upon the x and y distances to
// second coordinates
if (xDistance <= yDistance) {
results.add(new int[] { secondX, firstY });
results.add(new int[] { firstX, secondY });
} else {
results.add(new int[] { firstX, secondY });
results.add(new int[] { secondX, firstY });
}
// Add the farthest neighbor
results.add(new int[] { secondX, secondY });
// If right on the boundary between the forward and backwards pixel, add
// the backwards pixel options
if (xPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMin() });
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMax() });
}
if (yPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin(), yPixel.getMin() - 1 });
results.add(new int[] { xPixel.getMax(), yPixel.getMin() - 1 });
}
if (xPixel.getOffset() == 0 && yPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMin() - 1 });
}
return results;
}
|
java
|
protected List<int[]> getNearestNeighbors(float xSource, float ySource) {
List<int[]> results = new ArrayList<int[]>();
// Get the coverage data source pixels for x and y
CoverageDataSourcePixel xPixel = getXSourceMinAndMax(xSource);
CoverageDataSourcePixel yPixel = getYSourceMinAndMax(ySource);
// Determine which x pixel is the closest, the second closest, and the
// distance to the second pixel
int firstX;
int secondX;
float xDistance;
if (xPixel.getOffset() > .5) {
firstX = xPixel.getMax();
secondX = xPixel.getMin();
xDistance = 1.0f - xPixel.getOffset();
} else {
firstX = xPixel.getMin();
secondX = xPixel.getMax();
xDistance = xPixel.getOffset();
}
// Determine which y pixel is the closest, the second closest, and the
// distance to the second pixel
int firstY;
int secondY;
float yDistance;
if (yPixel.getOffset() > .5) {
firstY = yPixel.getMax();
secondY = yPixel.getMin();
yDistance = 1.0f - yPixel.getOffset();
} else {
firstY = yPixel.getMin();
secondY = yPixel.getMax();
yDistance = yPixel.getOffset();
}
// Add the closest neighbor
results.add(new int[] { firstX, firstY });
// Add the second and third neighbor based upon the x and y distances to
// second coordinates
if (xDistance <= yDistance) {
results.add(new int[] { secondX, firstY });
results.add(new int[] { firstX, secondY });
} else {
results.add(new int[] { firstX, secondY });
results.add(new int[] { secondX, firstY });
}
// Add the farthest neighbor
results.add(new int[] { secondX, secondY });
// If right on the boundary between the forward and backwards pixel, add
// the backwards pixel options
if (xPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMin() });
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMax() });
}
if (yPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin(), yPixel.getMin() - 1 });
results.add(new int[] { xPixel.getMax(), yPixel.getMin() - 1 });
}
if (xPixel.getOffset() == 0 && yPixel.getOffset() == 0) {
results.add(new int[] { xPixel.getMin() - 1, yPixel.getMin() - 1 });
}
return results;
}
|
[
"protected",
"List",
"<",
"int",
"[",
"]",
">",
"getNearestNeighbors",
"(",
"float",
"xSource",
",",
"float",
"ySource",
")",
"{",
"List",
"<",
"int",
"[",
"]",
">",
"results",
"=",
"new",
"ArrayList",
"<",
"int",
"[",
"]",
">",
"(",
")",
";",
"// Get the coverage data source pixels for x and y",
"CoverageDataSourcePixel",
"xPixel",
"=",
"getXSourceMinAndMax",
"(",
"xSource",
")",
";",
"CoverageDataSourcePixel",
"yPixel",
"=",
"getYSourceMinAndMax",
"(",
"ySource",
")",
";",
"// Determine which x pixel is the closest, the second closest, and the",
"// distance to the second pixel",
"int",
"firstX",
";",
"int",
"secondX",
";",
"float",
"xDistance",
";",
"if",
"(",
"xPixel",
".",
"getOffset",
"(",
")",
">",
".5",
")",
"{",
"firstX",
"=",
"xPixel",
".",
"getMax",
"(",
")",
";",
"secondX",
"=",
"xPixel",
".",
"getMin",
"(",
")",
";",
"xDistance",
"=",
"1.0f",
"-",
"xPixel",
".",
"getOffset",
"(",
")",
";",
"}",
"else",
"{",
"firstX",
"=",
"xPixel",
".",
"getMin",
"(",
")",
";",
"secondX",
"=",
"xPixel",
".",
"getMax",
"(",
")",
";",
"xDistance",
"=",
"xPixel",
".",
"getOffset",
"(",
")",
";",
"}",
"// Determine which y pixel is the closest, the second closest, and the",
"// distance to the second pixel",
"int",
"firstY",
";",
"int",
"secondY",
";",
"float",
"yDistance",
";",
"if",
"(",
"yPixel",
".",
"getOffset",
"(",
")",
">",
".5",
")",
"{",
"firstY",
"=",
"yPixel",
".",
"getMax",
"(",
")",
";",
"secondY",
"=",
"yPixel",
".",
"getMin",
"(",
")",
";",
"yDistance",
"=",
"1.0f",
"-",
"yPixel",
".",
"getOffset",
"(",
")",
";",
"}",
"else",
"{",
"firstY",
"=",
"yPixel",
".",
"getMin",
"(",
")",
";",
"secondY",
"=",
"yPixel",
".",
"getMax",
"(",
")",
";",
"yDistance",
"=",
"yPixel",
".",
"getOffset",
"(",
")",
";",
"}",
"// Add the closest neighbor",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"firstX",
",",
"firstY",
"}",
")",
";",
"// Add the second and third neighbor based upon the x and y distances to",
"// second coordinates",
"if",
"(",
"xDistance",
"<=",
"yDistance",
")",
"{",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"secondX",
",",
"firstY",
"}",
")",
";",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"firstX",
",",
"secondY",
"}",
")",
";",
"}",
"else",
"{",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"firstX",
",",
"secondY",
"}",
")",
";",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"secondX",
",",
"firstY",
"}",
")",
";",
"}",
"// Add the farthest neighbor",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"secondX",
",",
"secondY",
"}",
")",
";",
"// If right on the boundary between the forward and backwards pixel, add",
"// the backwards pixel options",
"if",
"(",
"xPixel",
".",
"getOffset",
"(",
")",
"==",
"0",
")",
"{",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"xPixel",
".",
"getMin",
"(",
")",
"-",
"1",
",",
"yPixel",
".",
"getMin",
"(",
")",
"}",
")",
";",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"xPixel",
".",
"getMin",
"(",
")",
"-",
"1",
",",
"yPixel",
".",
"getMax",
"(",
")",
"}",
")",
";",
"}",
"if",
"(",
"yPixel",
".",
"getOffset",
"(",
")",
"==",
"0",
")",
"{",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"xPixel",
".",
"getMin",
"(",
")",
",",
"yPixel",
".",
"getMin",
"(",
")",
"-",
"1",
"}",
")",
";",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"xPixel",
".",
"getMax",
"(",
")",
",",
"yPixel",
".",
"getMin",
"(",
")",
"-",
"1",
"}",
")",
";",
"}",
"if",
"(",
"xPixel",
".",
"getOffset",
"(",
")",
"==",
"0",
"&&",
"yPixel",
".",
"getOffset",
"(",
")",
"==",
"0",
")",
"{",
"results",
".",
"add",
"(",
"new",
"int",
"[",
"]",
"{",
"xPixel",
".",
"getMin",
"(",
")",
"-",
"1",
",",
"yPixel",
".",
"getMin",
"(",
")",
"-",
"1",
"}",
")",
";",
"}",
"return",
"results",
";",
"}"
] |
Determine the nearest neighbors of the source pixel, sorted by closest to
farthest neighbor
@param xSource
x source pixel
@param ySource
y source pixel
@return nearest neighbor pixels
|
[
"Determine",
"the",
"nearest",
"neighbors",
"of",
"the",
"source",
"pixel",
"sorted",
"by",
"closest",
"to",
"farthest",
"neighbor"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L920-L989
|
6,478 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getXSourceMinAndMax
|
protected CoverageDataSourcePixel getXSourceMinAndMax(float source) {
int floor = (int) Math.floor(source);
float valueLocation = getXEncodedLocation(floor,
griddedCoverage.getGridCellEncodingType());
CoverageDataSourcePixel pixel = getSourceMinAndMax(source, floor,
valueLocation);
return pixel;
}
|
java
|
protected CoverageDataSourcePixel getXSourceMinAndMax(float source) {
int floor = (int) Math.floor(source);
float valueLocation = getXEncodedLocation(floor,
griddedCoverage.getGridCellEncodingType());
CoverageDataSourcePixel pixel = getSourceMinAndMax(source, floor,
valueLocation);
return pixel;
}
|
[
"protected",
"CoverageDataSourcePixel",
"getXSourceMinAndMax",
"(",
"float",
"source",
")",
"{",
"int",
"floor",
"=",
"(",
"int",
")",
"Math",
".",
"floor",
"(",
"source",
")",
";",
"float",
"valueLocation",
"=",
"getXEncodedLocation",
"(",
"floor",
",",
"griddedCoverage",
".",
"getGridCellEncodingType",
"(",
")",
")",
";",
"CoverageDataSourcePixel",
"pixel",
"=",
"getSourceMinAndMax",
"(",
"source",
",",
"floor",
",",
"valueLocation",
")",
";",
"return",
"pixel",
";",
"}"
] |
Get the min, max, and offset of the source X pixel
@param source
source x pixel
@return source x pixel information
|
[
"Get",
"the",
"min",
"max",
"and",
"offset",
"of",
"the",
"source",
"X",
"pixel"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L998-L1007
|
6,479 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getYSourceMinAndMax
|
protected CoverageDataSourcePixel getYSourceMinAndMax(float source) {
int floor = (int) Math.floor(source);
float valueLocation = getYEncodedLocation(floor,
griddedCoverage.getGridCellEncodingType());
CoverageDataSourcePixel pixel = getSourceMinAndMax(source, floor,
valueLocation);
return pixel;
}
|
java
|
protected CoverageDataSourcePixel getYSourceMinAndMax(float source) {
int floor = (int) Math.floor(source);
float valueLocation = getYEncodedLocation(floor,
griddedCoverage.getGridCellEncodingType());
CoverageDataSourcePixel pixel = getSourceMinAndMax(source, floor,
valueLocation);
return pixel;
}
|
[
"protected",
"CoverageDataSourcePixel",
"getYSourceMinAndMax",
"(",
"float",
"source",
")",
"{",
"int",
"floor",
"=",
"(",
"int",
")",
"Math",
".",
"floor",
"(",
"source",
")",
";",
"float",
"valueLocation",
"=",
"getYEncodedLocation",
"(",
"floor",
",",
"griddedCoverage",
".",
"getGridCellEncodingType",
"(",
")",
")",
";",
"CoverageDataSourcePixel",
"pixel",
"=",
"getSourceMinAndMax",
"(",
"source",
",",
"floor",
",",
"valueLocation",
")",
";",
"return",
"pixel",
";",
"}"
] |
Get the min, max, and offset of the source Y pixel
@param source
source y pixel
@return source y pixel information
|
[
"Get",
"the",
"min",
"max",
"and",
"offset",
"of",
"the",
"source",
"Y",
"pixel"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1016-L1025
|
6,480 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getSourceMinAndMax
|
private CoverageDataSourcePixel getSourceMinAndMax(float source,
int sourceFloor, float valueLocation) {
int min = sourceFloor;
int max = sourceFloor;
float offset;
if (source < valueLocation) {
min--;
offset = 1.0f - (valueLocation - source);
} else {
max++;
offset = source - valueLocation;
}
return new CoverageDataSourcePixel(source, min, max, offset);
}
|
java
|
private CoverageDataSourcePixel getSourceMinAndMax(float source,
int sourceFloor, float valueLocation) {
int min = sourceFloor;
int max = sourceFloor;
float offset;
if (source < valueLocation) {
min--;
offset = 1.0f - (valueLocation - source);
} else {
max++;
offset = source - valueLocation;
}
return new CoverageDataSourcePixel(source, min, max, offset);
}
|
[
"private",
"CoverageDataSourcePixel",
"getSourceMinAndMax",
"(",
"float",
"source",
",",
"int",
"sourceFloor",
",",
"float",
"valueLocation",
")",
"{",
"int",
"min",
"=",
"sourceFloor",
";",
"int",
"max",
"=",
"sourceFloor",
";",
"float",
"offset",
";",
"if",
"(",
"source",
"<",
"valueLocation",
")",
"{",
"min",
"--",
";",
"offset",
"=",
"1.0f",
"-",
"(",
"valueLocation",
"-",
"source",
")",
";",
"}",
"else",
"{",
"max",
"++",
";",
"offset",
"=",
"source",
"-",
"valueLocation",
";",
"}",
"return",
"new",
"CoverageDataSourcePixel",
"(",
"source",
",",
"min",
",",
"max",
",",
"offset",
")",
";",
"}"
] |
Get the min, max, and offset of the source pixel
@param source
source pixel
@param sourceFloor
source floor value
@param valueLocation
value location
@return source pixel information
|
[
"Get",
"the",
"min",
"max",
"and",
"offset",
"of",
"the",
"source",
"pixel"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1038-L1053
|
6,481 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.padBoundingBox
|
protected BoundingBox padBoundingBox(TileMatrix tileMatrix,
BoundingBox boundingBox, int overlap) {
double lonPixelPadding = tileMatrix.getPixelXSize() * overlap;
double latPixelPadding = tileMatrix.getPixelYSize() * overlap;
BoundingBox paddedBoundingBox = new BoundingBox(
boundingBox.getMinLongitude() - lonPixelPadding,
boundingBox.getMinLatitude() - latPixelPadding,
boundingBox.getMaxLongitude() + lonPixelPadding,
boundingBox.getMaxLatitude() + latPixelPadding);
return paddedBoundingBox;
}
|
java
|
protected BoundingBox padBoundingBox(TileMatrix tileMatrix,
BoundingBox boundingBox, int overlap) {
double lonPixelPadding = tileMatrix.getPixelXSize() * overlap;
double latPixelPadding = tileMatrix.getPixelYSize() * overlap;
BoundingBox paddedBoundingBox = new BoundingBox(
boundingBox.getMinLongitude() - lonPixelPadding,
boundingBox.getMinLatitude() - latPixelPadding,
boundingBox.getMaxLongitude() + lonPixelPadding,
boundingBox.getMaxLatitude() + latPixelPadding);
return paddedBoundingBox;
}
|
[
"protected",
"BoundingBox",
"padBoundingBox",
"(",
"TileMatrix",
"tileMatrix",
",",
"BoundingBox",
"boundingBox",
",",
"int",
"overlap",
")",
"{",
"double",
"lonPixelPadding",
"=",
"tileMatrix",
".",
"getPixelXSize",
"(",
")",
"*",
"overlap",
";",
"double",
"latPixelPadding",
"=",
"tileMatrix",
".",
"getPixelYSize",
"(",
")",
"*",
"overlap",
";",
"BoundingBox",
"paddedBoundingBox",
"=",
"new",
"BoundingBox",
"(",
"boundingBox",
".",
"getMinLongitude",
"(",
")",
"-",
"lonPixelPadding",
",",
"boundingBox",
".",
"getMinLatitude",
"(",
")",
"-",
"latPixelPadding",
",",
"boundingBox",
".",
"getMaxLongitude",
"(",
")",
"+",
"lonPixelPadding",
",",
"boundingBox",
".",
"getMaxLatitude",
"(",
")",
"+",
"latPixelPadding",
")",
";",
"return",
"paddedBoundingBox",
";",
"}"
] |
Pad the bounding box with extra space for the overlapping pixels
@param tileMatrix
tile matrix
@param boundingBox
bounding box
@param overlap
overlapping pixels
@return padded bounding box
|
[
"Pad",
"the",
"bounding",
"box",
"with",
"extra",
"space",
"for",
"the",
"overlapping",
"pixels"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1297-L1307
|
6,482 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getUnsignedPixelValue
|
public int getUnsignedPixelValue(short[] pixelValues, int width, int x,
int y) {
short pixelValue = getPixelValue(pixelValues, width, x, y);
int unsignedPixelValue = getUnsignedPixelValue(pixelValue);
return unsignedPixelValue;
}
|
java
|
public int getUnsignedPixelValue(short[] pixelValues, int width, int x,
int y) {
short pixelValue = getPixelValue(pixelValues, width, x, y);
int unsignedPixelValue = getUnsignedPixelValue(pixelValue);
return unsignedPixelValue;
}
|
[
"public",
"int",
"getUnsignedPixelValue",
"(",
"short",
"[",
"]",
"pixelValues",
",",
"int",
"width",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"short",
"pixelValue",
"=",
"getPixelValue",
"(",
"pixelValues",
",",
"width",
",",
"x",
",",
"y",
")",
";",
"int",
"unsignedPixelValue",
"=",
"getUnsignedPixelValue",
"(",
"pixelValue",
")",
";",
"return",
"unsignedPixelValue",
";",
"}"
] |
Get the pixel value as a 16 bit unsigned value as an integer
@param pixelValues
"unsigned short" pixel values
@param width
image width
@param x
x coordinate
@param y
y coordinate
@return unsigned int pixel value
|
[
"Get",
"the",
"pixel",
"value",
"as",
"a",
"16",
"bit",
"unsigned",
"value",
"as",
"an",
"integer"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1340-L1345
|
6,483 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getUnsignedPixelValues
|
public int[] getUnsignedPixelValues(short[] pixelValues) {
int[] unsignedValues = new int[pixelValues.length];
for (int i = 0; i < pixelValues.length; i++) {
unsignedValues[i] = getUnsignedPixelValue(pixelValues[i]);
}
return unsignedValues;
}
|
java
|
public int[] getUnsignedPixelValues(short[] pixelValues) {
int[] unsignedValues = new int[pixelValues.length];
for (int i = 0; i < pixelValues.length; i++) {
unsignedValues[i] = getUnsignedPixelValue(pixelValues[i]);
}
return unsignedValues;
}
|
[
"public",
"int",
"[",
"]",
"getUnsignedPixelValues",
"(",
"short",
"[",
"]",
"pixelValues",
")",
"{",
"int",
"[",
"]",
"unsignedValues",
"=",
"new",
"int",
"[",
"pixelValues",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"pixelValues",
".",
"length",
";",
"i",
"++",
")",
"{",
"unsignedValues",
"[",
"i",
"]",
"=",
"getUnsignedPixelValue",
"(",
"pixelValues",
"[",
"i",
"]",
")",
";",
"}",
"return",
"unsignedValues",
";",
"}"
] |
Get the unsigned pixel values. The values saved as "unsigned shorts" in
the short array is returned as an integer which stores the positive 16
bit value
@param pixelValues
pixel values as "unsigned shorts"
@return unsigned 16 bit pixel values as an integer array
|
[
"Get",
"the",
"unsigned",
"pixel",
"values",
".",
"The",
"values",
"saved",
"as",
"unsigned",
"shorts",
"in",
"the",
"short",
"array",
"is",
"returned",
"as",
"an",
"integer",
"which",
"stores",
"the",
"positive",
"16",
"bit",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1400-L1406
|
6,484 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.pixelValueToValue
|
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) {
Double value = pixelValue;
if (griddedCoverage != null
&& griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) {
if (griddedTile != null) {
value *= griddedTile.getScale();
value += griddedTile.getOffset();
}
value *= griddedCoverage.getScale();
value += griddedCoverage.getOffset();
}
return value;
}
|
java
|
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) {
Double value = pixelValue;
if (griddedCoverage != null
&& griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) {
if (griddedTile != null) {
value *= griddedTile.getScale();
value += griddedTile.getOffset();
}
value *= griddedCoverage.getScale();
value += griddedCoverage.getOffset();
}
return value;
}
|
[
"private",
"Double",
"pixelValueToValue",
"(",
"GriddedTile",
"griddedTile",
",",
"Double",
"pixelValue",
")",
"{",
"Double",
"value",
"=",
"pixelValue",
";",
"if",
"(",
"griddedCoverage",
"!=",
"null",
"&&",
"griddedCoverage",
".",
"getDataType",
"(",
")",
"==",
"GriddedCoverageDataType",
".",
"INTEGER",
")",
"{",
"if",
"(",
"griddedTile",
"!=",
"null",
")",
"{",
"value",
"*=",
"griddedTile",
".",
"getScale",
"(",
")",
";",
"value",
"+=",
"griddedTile",
".",
"getOffset",
"(",
")",
";",
"}",
"value",
"*=",
"griddedCoverage",
".",
"getScale",
"(",
")",
";",
"value",
"+=",
"griddedCoverage",
".",
"getOffset",
"(",
")",
";",
"}",
"return",
"value",
";",
"}"
] |
Convert integer coverage typed pixel value to a coverage data value
through scales and offsets
@param griddedTile
gridded tile
@param pixelValue
pixel value
@return coverage data value
|
[
"Convert",
"integer",
"coverage",
"typed",
"pixel",
"value",
"to",
"a",
"coverage",
"data",
"value",
"through",
"scales",
"and",
"offsets"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1453-L1470
|
6,485 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.createTileTableWithMetadata
|
public static TileMatrixSet createTileTableWithMetadata(
GeoPackageCore geoPackage, String tableName,
BoundingBox contentsBoundingBox, long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId) {
TileMatrixSet tileMatrixSet = geoPackage.createTileTableWithMetadata(
ContentsDataType.GRIDDED_COVERAGE, tableName,
contentsBoundingBox, contentsSrsId, tileMatrixSetBoundingBox,
tileMatrixSetSrsId);
return tileMatrixSet;
}
|
java
|
public static TileMatrixSet createTileTableWithMetadata(
GeoPackageCore geoPackage, String tableName,
BoundingBox contentsBoundingBox, long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId) {
TileMatrixSet tileMatrixSet = geoPackage.createTileTableWithMetadata(
ContentsDataType.GRIDDED_COVERAGE, tableName,
contentsBoundingBox, contentsSrsId, tileMatrixSetBoundingBox,
tileMatrixSetSrsId);
return tileMatrixSet;
}
|
[
"public",
"static",
"TileMatrixSet",
"createTileTableWithMetadata",
"(",
"GeoPackageCore",
"geoPackage",
",",
"String",
"tableName",
",",
"BoundingBox",
"contentsBoundingBox",
",",
"long",
"contentsSrsId",
",",
"BoundingBox",
"tileMatrixSetBoundingBox",
",",
"long",
"tileMatrixSetSrsId",
")",
"{",
"TileMatrixSet",
"tileMatrixSet",
"=",
"geoPackage",
".",
"createTileTableWithMetadata",
"(",
"ContentsDataType",
".",
"GRIDDED_COVERAGE",
",",
"tableName",
",",
"contentsBoundingBox",
",",
"contentsSrsId",
",",
"tileMatrixSetBoundingBox",
",",
"tileMatrixSetSrsId",
")",
";",
"return",
"tileMatrixSet",
";",
"}"
] |
Create the coverage data tile table with metadata
@param geoPackage
GeoPackage
@param tableName
table name
@param contentsBoundingBox
contents bounding box
@param contentsSrsId
contents srs id
@param tileMatrixSetBoundingBox
tile matrix set bounding box
@param tileMatrixSetSrsId
tile matrix set srs id
@return tile matrix set
|
[
"Create",
"the",
"coverage",
"data",
"tile",
"table",
"with",
"metadata"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1523-L1533
|
6,486 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getUnsignedPixelValue
|
public int getUnsignedPixelValue(GriddedTile griddedTile, Double value) {
int unsignedPixelValue = 0;
if (value == null) {
if (griddedCoverage != null) {
unsignedPixelValue = griddedCoverage.getDataNull().intValue();
}
} else {
double pixelValue = valueToPixelValue(griddedTile, value);
unsignedPixelValue = (int) Math.round(pixelValue);
}
return unsignedPixelValue;
}
|
java
|
public int getUnsignedPixelValue(GriddedTile griddedTile, Double value) {
int unsignedPixelValue = 0;
if (value == null) {
if (griddedCoverage != null) {
unsignedPixelValue = griddedCoverage.getDataNull().intValue();
}
} else {
double pixelValue = valueToPixelValue(griddedTile, value);
unsignedPixelValue = (int) Math.round(pixelValue);
}
return unsignedPixelValue;
}
|
[
"public",
"int",
"getUnsignedPixelValue",
"(",
"GriddedTile",
"griddedTile",
",",
"Double",
"value",
")",
"{",
"int",
"unsignedPixelValue",
"=",
"0",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"if",
"(",
"griddedCoverage",
"!=",
"null",
")",
"{",
"unsignedPixelValue",
"=",
"griddedCoverage",
".",
"getDataNull",
"(",
")",
".",
"intValue",
"(",
")",
";",
"}",
"}",
"else",
"{",
"double",
"pixelValue",
"=",
"valueToPixelValue",
"(",
"griddedTile",
",",
"value",
")",
";",
"unsignedPixelValue",
"=",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"pixelValue",
")",
";",
"}",
"return",
"unsignedPixelValue",
";",
"}"
] |
Get the unsigned 16 bit integer pixel value of the coverage data value
@param griddedTile
gridded tile
@param value
coverage data value
@return 16 bit integer pixel value
|
[
"Get",
"the",
"unsigned",
"16",
"bit",
"integer",
"pixel",
"value",
"of",
"the",
"coverage",
"data",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1544-L1558
|
6,487 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.valueToPixelValue
|
private double valueToPixelValue(GriddedTile griddedTile, double value) {
double pixelValue = value;
if (griddedCoverage != null
&& griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) {
pixelValue -= griddedCoverage.getOffset();
pixelValue /= griddedCoverage.getScale();
if (griddedTile != null) {
pixelValue -= griddedTile.getOffset();
pixelValue /= griddedTile.getScale();
}
}
return pixelValue;
}
|
java
|
private double valueToPixelValue(GriddedTile griddedTile, double value) {
double pixelValue = value;
if (griddedCoverage != null
&& griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) {
pixelValue -= griddedCoverage.getOffset();
pixelValue /= griddedCoverage.getScale();
if (griddedTile != null) {
pixelValue -= griddedTile.getOffset();
pixelValue /= griddedTile.getScale();
}
}
return pixelValue;
}
|
[
"private",
"double",
"valueToPixelValue",
"(",
"GriddedTile",
"griddedTile",
",",
"double",
"value",
")",
"{",
"double",
"pixelValue",
"=",
"value",
";",
"if",
"(",
"griddedCoverage",
"!=",
"null",
"&&",
"griddedCoverage",
".",
"getDataType",
"(",
")",
"==",
"GriddedCoverageDataType",
".",
"INTEGER",
")",
"{",
"pixelValue",
"-=",
"griddedCoverage",
".",
"getOffset",
"(",
")",
";",
"pixelValue",
"/=",
"griddedCoverage",
".",
"getScale",
"(",
")",
";",
"if",
"(",
"griddedTile",
"!=",
"null",
")",
"{",
"pixelValue",
"-=",
"griddedTile",
".",
"getOffset",
"(",
")",
";",
"pixelValue",
"/=",
"griddedTile",
".",
"getScale",
"(",
")",
";",
"}",
"}",
"return",
"pixelValue",
";",
"}"
] |
Convert integer coverage typed coverage data value to a pixel value
through offsets and scales
@param griddedTile
gridded tile
@param value
coverage data value
@return pixel value
|
[
"Convert",
"integer",
"coverage",
"typed",
"coverage",
"data",
"value",
"to",
"a",
"pixel",
"value",
"through",
"offsets",
"and",
"scales"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1570-L1587
|
6,488 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getPixelValue
|
public short getPixelValue(GriddedTile griddedTile, Double value) {
int unsignedPixelValue = getUnsignedPixelValue(griddedTile, value);
short pixelValue = getPixelValue(unsignedPixelValue);
return pixelValue;
}
|
java
|
public short getPixelValue(GriddedTile griddedTile, Double value) {
int unsignedPixelValue = getUnsignedPixelValue(griddedTile, value);
short pixelValue = getPixelValue(unsignedPixelValue);
return pixelValue;
}
|
[
"public",
"short",
"getPixelValue",
"(",
"GriddedTile",
"griddedTile",
",",
"Double",
"value",
")",
"{",
"int",
"unsignedPixelValue",
"=",
"getUnsignedPixelValue",
"(",
"griddedTile",
",",
"value",
")",
";",
"short",
"pixelValue",
"=",
"getPixelValue",
"(",
"unsignedPixelValue",
")",
";",
"return",
"pixelValue",
";",
"}"
] |
Get the "unsigned short" pixel value of the coverage data value
@param griddedTile
gridded tile
@param value
coverage data value
@return "unsigned short" pixel value
|
[
"Get",
"the",
"unsigned",
"short",
"pixel",
"value",
"of",
"the",
"coverage",
"data",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1598-L1602
|
6,489 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValue
|
public Double getValue(GriddedTile griddedTile, float pixelValue) {
Double value = null;
if (!isDataNull(pixelValue)) {
value = pixelValueToValue(griddedTile, new Double(pixelValue));
}
return value;
}
|
java
|
public Double getValue(GriddedTile griddedTile, float pixelValue) {
Double value = null;
if (!isDataNull(pixelValue)) {
value = pixelValueToValue(griddedTile, new Double(pixelValue));
}
return value;
}
|
[
"public",
"Double",
"getValue",
"(",
"GriddedTile",
"griddedTile",
",",
"float",
"pixelValue",
")",
"{",
"Double",
"value",
"=",
"null",
";",
"if",
"(",
"!",
"isDataNull",
"(",
"pixelValue",
")",
")",
"{",
"value",
"=",
"pixelValueToValue",
"(",
"griddedTile",
",",
"new",
"Double",
"(",
"pixelValue",
")",
")",
";",
"}",
"return",
"value",
";",
"}"
] |
Get the coverage data value for the pixel value
@param griddedTile
gridded tile
@param pixelValue
pixel value
@return coverage data value
|
[
"Get",
"the",
"coverage",
"data",
"value",
"for",
"the",
"pixel",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1630-L1638
|
6,490 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getFloatPixelValue
|
public float getFloatPixelValue(GriddedTile griddedTile, Double value) {
double pixel = 0;
if (value == null) {
if (griddedCoverage != null) {
pixel = griddedCoverage.getDataNull();
}
} else {
pixel = valueToPixelValue(griddedTile, value);
}
float pixelValue = (float) pixel;
return pixelValue;
}
|
java
|
public float getFloatPixelValue(GriddedTile griddedTile, Double value) {
double pixel = 0;
if (value == null) {
if (griddedCoverage != null) {
pixel = griddedCoverage.getDataNull();
}
} else {
pixel = valueToPixelValue(griddedTile, value);
}
float pixelValue = (float) pixel;
return pixelValue;
}
|
[
"public",
"float",
"getFloatPixelValue",
"(",
"GriddedTile",
"griddedTile",
",",
"Double",
"value",
")",
"{",
"double",
"pixel",
"=",
"0",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"if",
"(",
"griddedCoverage",
"!=",
"null",
")",
"{",
"pixel",
"=",
"griddedCoverage",
".",
"getDataNull",
"(",
")",
";",
"}",
"}",
"else",
"{",
"pixel",
"=",
"valueToPixelValue",
"(",
"griddedTile",
",",
"value",
")",
";",
"}",
"float",
"pixelValue",
"=",
"(",
"float",
")",
"pixel",
";",
"return",
"pixelValue",
";",
"}"
] |
Get the pixel value of the coverage data value
@param griddedTile
gridded tile
@param value
coverage data value
@return pixel value
|
[
"Get",
"the",
"pixel",
"value",
"of",
"the",
"coverage",
"data",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1666-L1680
|
6,491 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValue
|
public Double getValue(double latitude, double longitude) {
CoverageDataRequest request = new CoverageDataRequest(latitude,
longitude);
CoverageDataResults values = getValues(request, 1, 1);
Double value = null;
if (values != null) {
value = values.getValues()[0][0];
}
return value;
}
|
java
|
public Double getValue(double latitude, double longitude) {
CoverageDataRequest request = new CoverageDataRequest(latitude,
longitude);
CoverageDataResults values = getValues(request, 1, 1);
Double value = null;
if (values != null) {
value = values.getValues()[0][0];
}
return value;
}
|
[
"public",
"Double",
"getValue",
"(",
"double",
"latitude",
",",
"double",
"longitude",
")",
"{",
"CoverageDataRequest",
"request",
"=",
"new",
"CoverageDataRequest",
"(",
"latitude",
",",
"longitude",
")",
";",
"CoverageDataResults",
"values",
"=",
"getValues",
"(",
"request",
",",
"1",
",",
"1",
")",
";",
"Double",
"value",
"=",
"null",
";",
"if",
"(",
"values",
"!=",
"null",
")",
"{",
"value",
"=",
"values",
".",
"getValues",
"(",
")",
"[",
"0",
"]",
"[",
"0",
"]",
";",
"}",
"return",
"value",
";",
"}"
] |
Get the coverage data value at the coordinate
@param latitude
latitude
@param longitude
longitude
@return coverage data value
|
[
"Get",
"the",
"coverage",
"data",
"value",
"at",
"the",
"coordinate"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1691-L1700
|
6,492 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValues
|
public CoverageDataResults getValues(BoundingBox requestBoundingBox) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
CoverageDataResults values = getValues(request);
return values;
}
|
java
|
public CoverageDataResults getValues(BoundingBox requestBoundingBox) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
CoverageDataResults values = getValues(request);
return values;
}
|
[
"public",
"CoverageDataResults",
"getValues",
"(",
"BoundingBox",
"requestBoundingBox",
")",
"{",
"CoverageDataRequest",
"request",
"=",
"new",
"CoverageDataRequest",
"(",
"requestBoundingBox",
")",
";",
"CoverageDataResults",
"values",
"=",
"getValues",
"(",
"request",
")",
";",
"return",
"values",
";",
"}"
] |
Get the coverage data values within the bounding box
@param requestBoundingBox
request bounding box
@return coverage data results
|
[
"Get",
"the",
"coverage",
"data",
"values",
"within",
"the",
"bounding",
"box"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1709-L1714
|
6,493 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValues
|
public CoverageDataResults getValues(BoundingBox requestBoundingBox,
Integer width, Integer height) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
CoverageDataResults values = getValues(request, width, height);
return values;
}
|
java
|
public CoverageDataResults getValues(BoundingBox requestBoundingBox,
Integer width, Integer height) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
CoverageDataResults values = getValues(request, width, height);
return values;
}
|
[
"public",
"CoverageDataResults",
"getValues",
"(",
"BoundingBox",
"requestBoundingBox",
",",
"Integer",
"width",
",",
"Integer",
"height",
")",
"{",
"CoverageDataRequest",
"request",
"=",
"new",
"CoverageDataRequest",
"(",
"requestBoundingBox",
")",
";",
"CoverageDataResults",
"values",
"=",
"getValues",
"(",
"request",
",",
"width",
",",
"height",
")",
";",
"return",
"values",
";",
"}"
] |
Get the coverage data values within the bounding box with the requested
width and height result size
@param requestBoundingBox
request bounding box
@param width
coverage data request width
@param height
coverage data request height
@return coverage data results
|
[
"Get",
"the",
"coverage",
"data",
"values",
"within",
"the",
"bounding",
"box",
"with",
"the",
"requested",
"width",
"and",
"height",
"result",
"size"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1728-L1734
|
6,494 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValues
|
public CoverageDataResults getValues(CoverageDataRequest request) {
CoverageDataResults values = getValues(request, width, height);
return values;
}
|
java
|
public CoverageDataResults getValues(CoverageDataRequest request) {
CoverageDataResults values = getValues(request, width, height);
return values;
}
|
[
"public",
"CoverageDataResults",
"getValues",
"(",
"CoverageDataRequest",
"request",
")",
"{",
"CoverageDataResults",
"values",
"=",
"getValues",
"(",
"request",
",",
"width",
",",
"height",
")",
";",
"return",
"values",
";",
"}"
] |
Get the requested coverage data values
@param request
coverage data request
@return coverage data results
|
[
"Get",
"the",
"requested",
"coverage",
"data",
"values"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1743-L1746
|
6,495 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValuesUnbounded
|
public CoverageDataResults getValuesUnbounded(BoundingBox requestBoundingBox) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
return getValuesUnbounded(request);
}
|
java
|
public CoverageDataResults getValuesUnbounded(BoundingBox requestBoundingBox) {
CoverageDataRequest request = new CoverageDataRequest(
requestBoundingBox);
return getValuesUnbounded(request);
}
|
[
"public",
"CoverageDataResults",
"getValuesUnbounded",
"(",
"BoundingBox",
"requestBoundingBox",
")",
"{",
"CoverageDataRequest",
"request",
"=",
"new",
"CoverageDataRequest",
"(",
"requestBoundingBox",
")",
";",
"return",
"getValuesUnbounded",
"(",
"request",
")",
";",
"}"
] |
Get the unbounded coverage data values within the bounding box. Unbounded
results retrieves and returns each coverage data pixel. The results size
equals the width and height of all matching pixels.
@param requestBoundingBox
request bounding box
@return coverage data results
|
[
"Get",
"the",
"unbounded",
"coverage",
"data",
"values",
"within",
"the",
"bounding",
"box",
".",
"Unbounded",
"results",
"retrieves",
"and",
"returns",
"each",
"coverage",
"data",
"pixel",
".",
"The",
"results",
"size",
"equals",
"the",
"width",
"and",
"height",
"of",
"all",
"matching",
"pixels",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1757-L1761
|
6,496 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getBilinearInterpolationValue
|
protected Double getBilinearInterpolationValue(GriddedTile griddedTile,
TImage image, Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int y, int x, float widthRatio,
float heightRatio, float destTop, float destLeft, float srcTop,
float srcLeft) {
// Determine which source pixel to use
float xSource = getXSource(x, destLeft, srcLeft, widthRatio);
float ySource = getYSource(y, destTop, srcTop, heightRatio);
CoverageDataSourcePixel sourcePixelX = getXSourceMinAndMax(xSource);
CoverageDataSourcePixel sourcePixelY = getYSourceMinAndMax(ySource);
Double[][] values = new Double[2][2];
populateValues(griddedTile, image, leftLastColumns, topLeftRows,
topRows, sourcePixelX, sourcePixelY, values);
Double value = null;
if (values != null) {
value = getBilinearInterpolationValue(sourcePixelX, sourcePixelY,
values);
}
return value;
}
|
java
|
protected Double getBilinearInterpolationValue(GriddedTile griddedTile,
TImage image, Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int y, int x, float widthRatio,
float heightRatio, float destTop, float destLeft, float srcTop,
float srcLeft) {
// Determine which source pixel to use
float xSource = getXSource(x, destLeft, srcLeft, widthRatio);
float ySource = getYSource(y, destTop, srcTop, heightRatio);
CoverageDataSourcePixel sourcePixelX = getXSourceMinAndMax(xSource);
CoverageDataSourcePixel sourcePixelY = getYSourceMinAndMax(ySource);
Double[][] values = new Double[2][2];
populateValues(griddedTile, image, leftLastColumns, topLeftRows,
topRows, sourcePixelX, sourcePixelY, values);
Double value = null;
if (values != null) {
value = getBilinearInterpolationValue(sourcePixelX, sourcePixelY,
values);
}
return value;
}
|
[
"protected",
"Double",
"getBilinearInterpolationValue",
"(",
"GriddedTile",
"griddedTile",
",",
"TImage",
"image",
",",
"Double",
"[",
"]",
"[",
"]",
"leftLastColumns",
",",
"Double",
"[",
"]",
"[",
"]",
"topLeftRows",
",",
"Double",
"[",
"]",
"[",
"]",
"topRows",
",",
"int",
"y",
",",
"int",
"x",
",",
"float",
"widthRatio",
",",
"float",
"heightRatio",
",",
"float",
"destTop",
",",
"float",
"destLeft",
",",
"float",
"srcTop",
",",
"float",
"srcLeft",
")",
"{",
"// Determine which source pixel to use",
"float",
"xSource",
"=",
"getXSource",
"(",
"x",
",",
"destLeft",
",",
"srcLeft",
",",
"widthRatio",
")",
";",
"float",
"ySource",
"=",
"getYSource",
"(",
"y",
",",
"destTop",
",",
"srcTop",
",",
"heightRatio",
")",
";",
"CoverageDataSourcePixel",
"sourcePixelX",
"=",
"getXSourceMinAndMax",
"(",
"xSource",
")",
";",
"CoverageDataSourcePixel",
"sourcePixelY",
"=",
"getYSourceMinAndMax",
"(",
"ySource",
")",
";",
"Double",
"[",
"]",
"[",
"]",
"values",
"=",
"new",
"Double",
"[",
"2",
"]",
"[",
"2",
"]",
";",
"populateValues",
"(",
"griddedTile",
",",
"image",
",",
"leftLastColumns",
",",
"topLeftRows",
",",
"topRows",
",",
"sourcePixelX",
",",
"sourcePixelY",
",",
"values",
")",
";",
"Double",
"value",
"=",
"null",
";",
"if",
"(",
"values",
"!=",
"null",
")",
"{",
"value",
"=",
"getBilinearInterpolationValue",
"(",
"sourcePixelX",
",",
"sourcePixelY",
",",
"values",
")",
";",
"}",
"return",
"value",
";",
"}"
] |
Get the bilinear interpolation coverage data value
@param griddedTile
gridded tile
@param image
image
@param leftLastColumns
last columns in the tile to the left
@param topLeftRows
last rows of the tile to the top left
@param topRows
last rows of the tile to the top
@param y
y coordinate
@param x
x coordinate
@param widthRatio
width source over destination ratio
@param heightRatio
height source over destination ratio
@param destTop
destination top most pixel
@param destLeft
destination left most pixel
@param srcTop
source top most pixel
@param srcLeft
source left most pixel
@return bilinear coverage data value
|
[
"Get",
"the",
"bilinear",
"interpolation",
"coverage",
"data",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1794-L1819
|
6,497 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getNearestNeighborValue
|
protected Double getNearestNeighborValue(GriddedTile griddedTile,
TImage image, Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int y, int x, float widthRatio,
float heightRatio, float destTop, float destLeft, float srcTop,
float srcLeft) {
// Determine which source pixel to use
float xSource = getXSource(x, destLeft, srcLeft, widthRatio);
float ySource = getYSource(y, destTop, srcTop, heightRatio);
// Get the closest nearest neighbors
List<int[]> nearestNeighbors = getNearestNeighbors(xSource, ySource);
// Get the coverage data value from the source pixel nearest neighbors
// until one is found
Double value = null;
for (int[] nearestNeighbor : nearestNeighbors) {
value = getValueOverBorders(griddedTile, image, leftLastColumns,
topLeftRows, topRows, nearestNeighbor[0],
nearestNeighbor[1]);
if (value != null) {
break;
}
}
return value;
}
|
java
|
protected Double getNearestNeighborValue(GriddedTile griddedTile,
TImage image, Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int y, int x, float widthRatio,
float heightRatio, float destTop, float destLeft, float srcTop,
float srcLeft) {
// Determine which source pixel to use
float xSource = getXSource(x, destLeft, srcLeft, widthRatio);
float ySource = getYSource(y, destTop, srcTop, heightRatio);
// Get the closest nearest neighbors
List<int[]> nearestNeighbors = getNearestNeighbors(xSource, ySource);
// Get the coverage data value from the source pixel nearest neighbors
// until one is found
Double value = null;
for (int[] nearestNeighbor : nearestNeighbors) {
value = getValueOverBorders(griddedTile, image, leftLastColumns,
topLeftRows, topRows, nearestNeighbor[0],
nearestNeighbor[1]);
if (value != null) {
break;
}
}
return value;
}
|
[
"protected",
"Double",
"getNearestNeighborValue",
"(",
"GriddedTile",
"griddedTile",
",",
"TImage",
"image",
",",
"Double",
"[",
"]",
"[",
"]",
"leftLastColumns",
",",
"Double",
"[",
"]",
"[",
"]",
"topLeftRows",
",",
"Double",
"[",
"]",
"[",
"]",
"topRows",
",",
"int",
"y",
",",
"int",
"x",
",",
"float",
"widthRatio",
",",
"float",
"heightRatio",
",",
"float",
"destTop",
",",
"float",
"destLeft",
",",
"float",
"srcTop",
",",
"float",
"srcLeft",
")",
"{",
"// Determine which source pixel to use",
"float",
"xSource",
"=",
"getXSource",
"(",
"x",
",",
"destLeft",
",",
"srcLeft",
",",
"widthRatio",
")",
";",
"float",
"ySource",
"=",
"getYSource",
"(",
"y",
",",
"destTop",
",",
"srcTop",
",",
"heightRatio",
")",
";",
"// Get the closest nearest neighbors",
"List",
"<",
"int",
"[",
"]",
">",
"nearestNeighbors",
"=",
"getNearestNeighbors",
"(",
"xSource",
",",
"ySource",
")",
";",
"// Get the coverage data value from the source pixel nearest neighbors",
"// until one is found",
"Double",
"value",
"=",
"null",
";",
"for",
"(",
"int",
"[",
"]",
"nearestNeighbor",
":",
"nearestNeighbors",
")",
"{",
"value",
"=",
"getValueOverBorders",
"(",
"griddedTile",
",",
"image",
",",
"leftLastColumns",
",",
"topLeftRows",
",",
"topRows",
",",
"nearestNeighbor",
"[",
"0",
"]",
",",
"nearestNeighbor",
"[",
"1",
"]",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"break",
";",
"}",
"}",
"return",
"value",
";",
"}"
] |
Get the nearest neighbor coverage data value
@param griddedTile
gridded tile
@param image
image
@param leftLastColumns
last columns in the tile to the left
@param topLeftRows
last rows of the tile to the top left
@param topRows
last rows of the tile to the top
@param y
y coordinate
@param x
x coordinate
@param widthRatio
width source over destination ratio
@param heightRatio
height source over destination ratio
@param destTop
destination top most pixel
@param destLeft
destination left most pixel
@param srcTop
source top most pixel
@param srcLeft
source left most pixel
@return nearest neighbor coverage data value
|
[
"Get",
"the",
"nearest",
"neighbor",
"coverage",
"data",
"value"
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1989-L2015
|
6,498 |
ngageoint/geopackage-core-java
|
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
|
CoverageDataCore.getValueOverBorders
|
private Double getValueOverBorders(GriddedTile griddedTile, TImage image,
Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int x, int y) {
Double value = null;
// Only handle locations in the current tile, to the left, top left, or
// top tiles. Tiles are processed sorted by rows and columns, so values
// to the top right, right, or any below tiles will be handled later if
// those tiles exist
if (x < image.getWidth() && y < image.getHeight()) {
if (x >= 0 && y >= 0) {
value = getValue(griddedTile, image, x, y);
} else if (x < 0 && y < 0) {
// Try to get the coverage data value from the top left tile
// values
if (topLeftRows != null) {
int row = (-1 * y) - 1;
if (row < topLeftRows.length) {
int column = x + topLeftRows[row].length;
if (column >= 0) {
value = topLeftRows[row][column];
}
}
}
} else if (x < 0) {
// Try to get the coverage data value from the left tile values
if (leftLastColumns != null) {
int column = (-1 * x) - 1;
if (column < leftLastColumns.length) {
int row = y;
if (row < leftLastColumns[column].length) {
value = leftLastColumns[column][row];
}
}
}
} else {
// Try to get the coverage data value from the top tile values
if (topRows != null) {
int row = (-1 * y) - 1;
if (row < topRows.length) {
int column = x;
if (column < topRows[row].length) {
value = topRows[row][column];
}
}
}
}
}
return value;
}
|
java
|
private Double getValueOverBorders(GriddedTile griddedTile, TImage image,
Double[][] leftLastColumns, Double[][] topLeftRows,
Double[][] topRows, int x, int y) {
Double value = null;
// Only handle locations in the current tile, to the left, top left, or
// top tiles. Tiles are processed sorted by rows and columns, so values
// to the top right, right, or any below tiles will be handled later if
// those tiles exist
if (x < image.getWidth() && y < image.getHeight()) {
if (x >= 0 && y >= 0) {
value = getValue(griddedTile, image, x, y);
} else if (x < 0 && y < 0) {
// Try to get the coverage data value from the top left tile
// values
if (topLeftRows != null) {
int row = (-1 * y) - 1;
if (row < topLeftRows.length) {
int column = x + topLeftRows[row].length;
if (column >= 0) {
value = topLeftRows[row][column];
}
}
}
} else if (x < 0) {
// Try to get the coverage data value from the left tile values
if (leftLastColumns != null) {
int column = (-1 * x) - 1;
if (column < leftLastColumns.length) {
int row = y;
if (row < leftLastColumns[column].length) {
value = leftLastColumns[column][row];
}
}
}
} else {
// Try to get the coverage data value from the top tile values
if (topRows != null) {
int row = (-1 * y) - 1;
if (row < topRows.length) {
int column = x;
if (column < topRows[row].length) {
value = topRows[row][column];
}
}
}
}
}
return value;
}
|
[
"private",
"Double",
"getValueOverBorders",
"(",
"GriddedTile",
"griddedTile",
",",
"TImage",
"image",
",",
"Double",
"[",
"]",
"[",
"]",
"leftLastColumns",
",",
"Double",
"[",
"]",
"[",
"]",
"topLeftRows",
",",
"Double",
"[",
"]",
"[",
"]",
"topRows",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"Double",
"value",
"=",
"null",
";",
"// Only handle locations in the current tile, to the left, top left, or",
"// top tiles. Tiles are processed sorted by rows and columns, so values",
"// to the top right, right, or any below tiles will be handled later if",
"// those tiles exist",
"if",
"(",
"x",
"<",
"image",
".",
"getWidth",
"(",
")",
"&&",
"y",
"<",
"image",
".",
"getHeight",
"(",
")",
")",
"{",
"if",
"(",
"x",
">=",
"0",
"&&",
"y",
">=",
"0",
")",
"{",
"value",
"=",
"getValue",
"(",
"griddedTile",
",",
"image",
",",
"x",
",",
"y",
")",
";",
"}",
"else",
"if",
"(",
"x",
"<",
"0",
"&&",
"y",
"<",
"0",
")",
"{",
"// Try to get the coverage data value from the top left tile",
"// values",
"if",
"(",
"topLeftRows",
"!=",
"null",
")",
"{",
"int",
"row",
"=",
"(",
"-",
"1",
"*",
"y",
")",
"-",
"1",
";",
"if",
"(",
"row",
"<",
"topLeftRows",
".",
"length",
")",
"{",
"int",
"column",
"=",
"x",
"+",
"topLeftRows",
"[",
"row",
"]",
".",
"length",
";",
"if",
"(",
"column",
">=",
"0",
")",
"{",
"value",
"=",
"topLeftRows",
"[",
"row",
"]",
"[",
"column",
"]",
";",
"}",
"}",
"}",
"}",
"else",
"if",
"(",
"x",
"<",
"0",
")",
"{",
"// Try to get the coverage data value from the left tile values",
"if",
"(",
"leftLastColumns",
"!=",
"null",
")",
"{",
"int",
"column",
"=",
"(",
"-",
"1",
"*",
"x",
")",
"-",
"1",
";",
"if",
"(",
"column",
"<",
"leftLastColumns",
".",
"length",
")",
"{",
"int",
"row",
"=",
"y",
";",
"if",
"(",
"row",
"<",
"leftLastColumns",
"[",
"column",
"]",
".",
"length",
")",
"{",
"value",
"=",
"leftLastColumns",
"[",
"column",
"]",
"[",
"row",
"]",
";",
"}",
"}",
"}",
"}",
"else",
"{",
"// Try to get the coverage data value from the top tile values",
"if",
"(",
"topRows",
"!=",
"null",
")",
"{",
"int",
"row",
"=",
"(",
"-",
"1",
"*",
"y",
")",
"-",
"1",
";",
"if",
"(",
"row",
"<",
"topRows",
".",
"length",
")",
"{",
"int",
"column",
"=",
"x",
";",
"if",
"(",
"column",
"<",
"topRows",
"[",
"row",
"]",
".",
"length",
")",
"{",
"value",
"=",
"topRows",
"[",
"row",
"]",
"[",
"column",
"]",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"value",
";",
"}"
] |
Get the coverage data value from the coordinate location. If the
coordinate crosses the left, top, or top left tile, attempts to get the
coverage data value from previously processed border coverage data
values.
@param griddedTile
gridded tile
@param image
image
@param leftLastColumns
last columns in the tile to the left
@param topLeftRows
last rows of the tile to the top left
@param topRows
last rows of the tile to the top
@param y
x coordinate
@param y
y coordinate
@return coverage data value
|
[
"Get",
"the",
"coverage",
"data",
"value",
"from",
"the",
"coordinate",
"location",
".",
"If",
"the",
"coordinate",
"crosses",
"the",
"left",
"top",
"or",
"top",
"left",
"tile",
"attempts",
"to",
"get",
"the",
"coverage",
"data",
"value",
"from",
"previously",
"processed",
"border",
"coverage",
"data",
"values",
"."
] |
6431c3b041a45b7f3802904ea4156b4082a72daa
|
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L2039-L2091
|
6,499 |
DDTH/ddth-kafka
|
src/main/java/com/github/ddth/kafka/internal/KafkaMsgConsumer.java
|
KafkaMsgConsumer.topicExists
|
public boolean topicExists(String topicName) {
Map<String, List<PartitionInfo>> topicInfo = getTopicInfo();
return topicInfo != null && topicInfo.containsKey(topicName);
}
|
java
|
public boolean topicExists(String topicName) {
Map<String, List<PartitionInfo>> topicInfo = getTopicInfo();
return topicInfo != null && topicInfo.containsKey(topicName);
}
|
[
"public",
"boolean",
"topicExists",
"(",
"String",
"topicName",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"PartitionInfo",
">",
">",
"topicInfo",
"=",
"getTopicInfo",
"(",
")",
";",
"return",
"topicInfo",
"!=",
"null",
"&&",
"topicInfo",
".",
"containsKey",
"(",
"topicName",
")",
";",
"}"
] |
Checks if a Kafka topic exists.
@param topicName
@return
@since 1.2.0
|
[
"Checks",
"if",
"a",
"Kafka",
"topic",
"exists",
"."
] |
aaeb8536e28a109ac0b69022f0ea4bbf5696b76f
|
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/internal/KafkaMsgConsumer.java#L303-L306
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.