本文整理汇总了Java中mil.nga.geopackage.GeoPackage.createFeatureTable方法的典型用法代码示例。如果您正苦于以下问题:Java GeoPackage.createFeatureTable方法的具体用法?Java GeoPackage.createFeatureTable怎么用?Java GeoPackage.createFeatureTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.geopackage.GeoPackage
的用法示例。
在下文中一共展示了GeoPackage.createFeatureTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFeatureTable
import mil.nga.geopackage.GeoPackage; //导入方法依赖的package包/类
/**
* Create the feature table with data columns entry
*
* @param geoPackage
* @param contents
* @param geometryColumn
* @param geometryType
* @return
* @throws SQLException
*/
public static FeatureTable createFeatureTable(GeoPackage geoPackage,
Contents contents, String geometryColumn, GeometryType geometryType)
throws SQLException {
FeatureTable table = buildFeatureTable(contents.getTableName(),
geometryColumn, geometryType);
geoPackage.createFeatureTable(table);
double random = Math.random();
DataColumnsDao dataColumnsDao = geoPackage.getDataColumnsDao();
DataColumns dataColumns = new DataColumns();
dataColumns.setContents(contents);
dataColumns.setColumnName(TEST_INTEGER_COLUMN);
dataColumns.setName(contents.getTableName());
dataColumns.setTitle("TEST_TITLE");
dataColumns.setDescription("TEST_DESCRIPTION");
dataColumns.setMimeType("TEST_MIME_TYPE");
if (random < (1.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_RANGE_CONSTRAINT);
} else if (random < (2.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_ENUM_CONSTRAINT);
} else {
dataColumns.setConstraintName(SAMPLE_GLOB_CONSTRAINT);
}
dataColumnsDao.create(dataColumns);
return table;
}
示例2: createFeatureTable
import mil.nga.geopackage.GeoPackage; //导入方法依赖的package包/类
/**
* Create the feature table with data columns entry
*
* @param geoPackage
* @param contents
* @param geometryColumn
* @param geometryType
* @return
* @throws SQLException
*/
public static FeatureTable createFeatureTable(GeoPackage geoPackage,
Contents contents, String geometryColumn, GeometryType geometryType)
throws SQLException {
FeatureTable table = buildFeatureTable(contents.getTableName(),
geometryColumn, geometryType);
geoPackage.createFeatureTable(table);
double random = Math.random();
DataColumnsDao dataColumnsDao = geoPackage.getDataColumnsDao();
DataColumns dataColumns = new DataColumns();
dataColumns.setContents(contents);
dataColumns.setColumnName(TEST_INTEGER_COLUMN);
dataColumns.setName(contents.getTableName());
dataColumns.setTitle("TEST_TITLE");
dataColumns.setDescription("TEST_DESCRIPTION");
dataColumns.setMimeType("TEST_MIME_TYPE");
if (random < (1.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_RANGE_CONSTRAINT);
} else if (random < (2.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_ENUM_CONSTRAINT);
} else {
dataColumns.setConstraintName(SAMPLE_GLOB_CONSTRAINT);
}
dataColumnsDao.create(dataColumns);
return table;
}
示例3: createFeatureTable
import mil.nga.geopackage.GeoPackage; //导入方法依赖的package包/类
/**
* Create the feature table with data columns entry
*
* @param geoPackage
* @param contents
* @param geometryColumn
* @param geometryType
* @return feature table
* @throws SQLException
*/
public static FeatureTable createFeatureTable(GeoPackage geoPackage,
Contents contents, String geometryColumn, GeometryType geometryType)
throws SQLException {
FeatureTable table = buildFeatureTable(contents.getTableName(),
geometryColumn, geometryType);
geoPackage.createFeatureTable(table);
double random = Math.random();
DataColumnsDao dataColumnsDao = geoPackage.getDataColumnsDao();
DataColumns dataColumns = new DataColumns();
dataColumns.setContents(contents);
dataColumns.setColumnName(TEST_INTEGER_COLUMN);
dataColumns.setName(contents.getTableName());
dataColumns.setTitle("TEST_TITLE");
dataColumns.setDescription("TEST_DESCRIPTION");
dataColumns.setMimeType("TEST_MIME_TYPE");
if (random < (1.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_RANGE_CONSTRAINT);
} else if (random < (2.0 / 3.0)) {
dataColumns.setConstraintName(SAMPLE_ENUM_CONSTRAINT);
} else {
dataColumns.setConstraintName(SAMPLE_GLOB_CONSTRAINT);
}
dataColumnsDao.create(dataColumns);
return table;
}