本文整理汇总了Java中mil.nga.geopackage.features.user.FeatureRow.setGeometry方法的典型用法代码示例。如果您正苦于以下问题:Java FeatureRow.setGeometry方法的具体用法?Java FeatureRow.setGeometry怎么用?Java FeatureRow.setGeometry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.geopackage.features.user.FeatureRow
的用法示例。
在下文中一共展示了FeatureRow.setGeometry方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPoint
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static void setPoint(FeatureRow featureRow, double x, double y) {
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
Point point = new Point(false, false, x, y);
geomData.setGeometry(point);
featureRow.setGeometry(geomData);
}
示例2: insertLine
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static long insertLine(FeatureDao featureDao, double[][] points) {
FeatureRow featureRow = featureDao.newRow();
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
LineString lineString = getLineString(points);
geomData.setGeometry(lineString);
featureRow.setGeometry(geomData);
return featureDao.insert(featureRow);
}
示例3: insertPolygon
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static long insertPolygon(FeatureDao featureDao, double[][]... points) {
FeatureRow featureRow = featureDao.newRow();
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
Polygon polygon = new Polygon(false, false);
for (double[][] ring : points) {
LineString lineString = getLineString(ring);
polygon.addRing(lineString);
}
geomData.setGeometry(polygon);
featureRow.setGeometry(geomData);
return featureDao.insert(featureRow);
}
示例4: setPoint
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static void setPoint(FeatureRow featureRow, double x, double y) {
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
Point point = new Point(false, false, x, y);
geomData.setGeometry(point);
featureRow.setGeometry(geomData);
}
示例5: insertLine
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static long insertLine(FeatureDao featureDao, double[][] points) {
FeatureRow featureRow = featureDao.newRow();
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
LineString lineString = getLineString(points);
geomData.setGeometry(lineString);
featureRow.setGeometry(geomData);
return featureDao.insert(featureRow);
}
示例6: insertPolygon
import mil.nga.geopackage.features.user.FeatureRow; //导入方法依赖的package包/类
public static long insertPolygon(FeatureDao featureDao,
double[][]... points) {
FeatureRow featureRow = featureDao.newRow();
GeoPackageGeometryData geomData = new GeoPackageGeometryData(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
Polygon polygon = new Polygon(false, false);
for (double[][] ring : points) {
LineString lineString = getLineString(ring);
polygon.addRing(lineString);
}
geomData.setGeometry(polygon);
featureRow.setGeometry(geomData);
return featureDao.insert(featureRow);
}