本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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<>();
}
示例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;
}