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


Java Envelope2D.setCoords方法代码示例

本文整理汇总了Java中com.esri.core.geometry.Envelope2D.setCoords方法的典型用法代码示例。如果您正苦于以下问题:Java Envelope2D.setCoords方法的具体用法?Java Envelope2D.setCoords怎么用?Java Envelope2D.setCoords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esri.core.geometry.Envelope2D的用法示例。


在下文中一共展示了Envelope2D.setCoords方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tryRenderAsSmallEnvelope_

import com.esri.core.geometry.Envelope2D; //导入方法依赖的package包/类
boolean tryRenderAsSmallEnvelope_(Envelope2D env) {
	if (!env.isIntersecting(m_geomEnv))
		return true;

	Envelope2D envPix = new Envelope2D();
	envPix.setCoords(env);
	m_transform.transform(env);
	double strokeHalfWidthPixX = m_stroke_half_widthX_pix;
	double strokeHalfWidthPixY = m_stroke_half_widthY_pix;
	if (envPix.getWidth() > 2 * strokeHalfWidthPixX + 1
			|| envPix.getHeight() > 2 * strokeHalfWidthPixY + 1)
		return false;

	// This envelope is too narrow/small, so that it can be just drawn as a
	// rectangle using only boundary color.

	envPix.inflate(strokeHalfWidthPixX, strokeHalfWidthPixY);
	envPix.xmax += 1.0;
	envPix.ymax += 1.0;// take into account that it does not draw right and
	// bottom edges.

	m_callback.setColor(m_rasterizer, 2);
	fillEnvelope(m_rasterizer, envPix);
	return true;
}
 
开发者ID:Esri,项目名称:geometry-api-java,代码行数:26,代码来源:RasterizedGeometry2DImpl.java

示例2: queryValidCoordinateRange

import com.esri.core.geometry.Envelope2D; //导入方法依赖的package包/类
public void queryValidCoordinateRange(Envelope2D env2D) {
	double delta = 0;
	switch (getPrecision()) {
	case Integer32:
		delta = c_SULIMIT32 / getGridUnitsXY();
		break;
	case Integer64:
		delta = c_SULIMIT64 / getGridUnitsXY();
		break;
	default:
		// TODO
		throw GeometryException.GeometryInternalError();
	}

	env2D.setCoords(getFalseX(), getFalseY(), getFalseX() + delta,
			getFalseY() + delta);
}
 
开发者ID:Esri,项目名称:geometry-api-java,代码行数:18,代码来源:SpatialReferenceImpl.java

示例3: envelope

import com.esri.core.geometry.Envelope2D; //导入方法依赖的package包/类
@Override
public Envelope2D envelope(Point c, double radius) {
    Envelope2D env = new Envelope2D();

    double ymax = Geodesic.WGS84.Direct(c.getY(), c.getX(), 0, radius).lat2;
    double ymin = Geodesic.WGS84.Direct(c.getY(), c.getX(), -180, radius).lat2;
    double xmax = Geodesic.WGS84.Direct(c.getY(), c.getX(), 90, radius).lon2;
    double xmin = Geodesic.WGS84.Direct(c.getY(), c.getX(), -90, radius).lon2;

    env.setCoords(xmin, ymin, xmax, ymax);

    return env;
}
 
开发者ID:bmwcarit,项目名称:barefoot,代码行数:14,代码来源:Geography.java

示例4: QuadTreeIndex

import com.esri.core.geometry.Envelope2D; //导入方法依赖的package包/类
/**
 * Creates a {@link QuadTreeIndex} with default bounding box of spatially indexed region and
 * uses {@link SpatialOperator} implementation {@link Geography}.
 */
public QuadTreeIndex() {
    spatial = new Geography();
    envelope = new Envelope2D();
    envelope.setCoords(-180, -90, 180, 90);
    index = new QuadTree(envelope, height);
    geometries = new HashMap<>();
}
 
开发者ID:bmwcarit,项目名称:barefoot,代码行数:12,代码来源:QuadTreeIndex.java

示例5: defaultRegion

import com.esri.core.geometry.Envelope2D; //导入方法依赖的package包/类
private static Envelope2D defaultRegion() {
    Envelope2D region = new Envelope2D();
    region.setCoords(-180, -90, 180, 90);
    return region;
}
 
开发者ID:bmwcarit,项目名称:barefoot,代码行数:6,代码来源:DBSCAN.java


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