本文整理汇总了Java中mil.nga.wkb.geom.GeometryEnvelope.setMinX方法的典型用法代码示例。如果您正苦于以下问题:Java GeometryEnvelope.setMinX方法的具体用法?Java GeometryEnvelope.setMinX怎么用?Java GeometryEnvelope.setMinX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.wkb.geom.GeometryEnvelope
的用法示例。
在下文中一共展示了GeometryEnvelope.setMinX方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: query
import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
* Query for all table geometry metadata matching the bounding box in the same projection
*
* @param geoPackageId
* @param tableName
* @param boundingBox
* @return cursor that must be closed
*/
public Cursor query(long geoPackageId, String tableName, BoundingBox boundingBox) {
GeometryEnvelope envelope = new GeometryEnvelope();
envelope.setMinX(boundingBox.getMinLongitude());
envelope.setMaxX(boundingBox.getMaxLongitude());
envelope.setMinY(boundingBox.getMinLatitude());
envelope.setMaxY(boundingBox.getMaxLatitude());
return query(geoPackageId, tableName, envelope);
}
示例2: buildEnvelope
import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
* Build a Geometry Envelope from the bounding box
*
* @return geometry envelope
* @since 1.1.0
*/
public GeometryEnvelope buildEnvelope() {
GeometryEnvelope envelope = new GeometryEnvelope();
envelope.setMinX(minLongitude);
envelope.setMaxX(maxLongitude);
envelope.setMinY(minLatitude);
envelope.setMaxY(maxLatitude);
return envelope;
}
示例3: buildEnvelope
import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
* Build Geometry Envelope
*
* @param geometry
* geometry to build envelope from
* @return geometry envelope
*/
public static GeometryEnvelope buildEnvelope(Geometry geometry) {
GeometryEnvelope envelope = new GeometryEnvelope();
envelope.setMinX(Double.MAX_VALUE);
envelope.setMaxX(-Double.MAX_VALUE);
envelope.setMinY(Double.MAX_VALUE);
envelope.setMaxY(-Double.MAX_VALUE);
buildEnvelope(geometry, envelope);
return envelope;
}
示例4: addPointMessage
import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
* Add Point
*
* @param envelope
* @param point
*/
private static void addPointMessage(GeometryEnvelope envelope, Point point) {
updateHasZandM(envelope, point);
double x = point.getX();
double y = point.getY();
if (x < envelope.getMinX()) {
envelope.setMinX(x);
}
if (x > envelope.getMaxX()) {
envelope.setMaxX(x);
}
if (y < envelope.getMinY()) {
envelope.setMinY(y);
}
if (y > envelope.getMaxY()) {
envelope.setMaxY(y);
}
if (point.hasZ()) {
Double z = point.getZ();
if (z != null) {
if (envelope.getMinZ() == null || z < envelope.getMinZ()) {
envelope.setMinZ(z);
}
if (envelope.getMaxZ() == null || z > envelope.getMaxZ()) {
envelope.setMaxZ(z);
}
}
}
if (point.hasM()) {
Double m = point.getM();
if (m != null) {
if (envelope.getMinM() == null || m < envelope.getMinM()) {
envelope.setMinM(m);
}
if (envelope.getMaxM() == null || m > envelope.getMaxM()) {
envelope.setMaxM(m);
}
}
}
}