当前位置: 首页>>代码示例>>Java>>正文


Java GeometryEnvelope.setMinX方法代码示例

本文整理汇总了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);
}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:17,代码来源:GeometryMetadataDataSource.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-core-java,代码行数:15,代码来源:BoundingBox.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:21,代码来源:GeometryEnvelopeBuilder.java

示例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);
			}
		}
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:48,代码来源:GeometryEnvelopeBuilder.java


注:本文中的mil.nga.wkb.geom.GeometryEnvelope.setMinX方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。