作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.geotools.geometry.util.XRectangle2D.<init>()
方法的一些代码示例,展示了XRectangle2D.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XRectangle2D.<init>()
方法的具体详情如下:
包路径:org.geotools.geometry.util.XRectangle2D
类名称:XRectangle2D
方法名:<init>
[英]Construct a default rectangle. Initial coordinates are (0,0,0,0).
[中]构造一个默认矩形。初始坐标为(0,0,0,0)。
代码示例来源:origin: geotools/geotools
/**
* Create a rectangle using maximal <var>x</var> and <var>y</var> values rather than width and
* height. This factory avoid the problem of NaN values when extremums are infinite numbers.
*/
public static XRectangle2D createFromExtremums(
final double xmin, final double ymin, final double xmax, final double ymax) {
final XRectangle2D rect = new XRectangle2D();
rect.xmin = xmin;
rect.ymin = ymin;
rect.xmax = xmax;
rect.ymax = ymax;
return rect;
}
代码示例来源:origin: geotools/geotools
/**
* Returns a new {@code Rectangle2D} object representing the intersection of this {@code
* Rectangle2D} with the specified {@code Rectangle2D}.
*
* @param rect the {@code Rectangle2D} to be intersected with this {@code Rectangle2D}
* @return the largest {@code Rectangle2D} contained in both the specified {@code Rectangle2D}
* and in this {@code Rectangle2D}.
*/
public Rectangle2D createIntersection(final Rectangle2D rect) {
final XRectangle2D r = new XRectangle2D();
r.xmin = Math.max(xmin, rect.getMinX());
r.ymin = Math.max(ymin, rect.getMinY());
r.xmax = Math.min(xmax, rect.getMaxX());
r.ymax = Math.min(ymax, rect.getMaxY());
return r;
}
代码示例来源:origin: geotools/geotools
/**
* Returns a new {@code Rectangle2D} object representing the union of this {@code Rectangle2D}
* with the specified {@code Rectangle2D}.
*
* @param rect the {@code Rectangle2D} to be combined with this {@code Rectangle2D}
* @return the smallest {@code Rectangle2D} containing both the specified {@code Rectangle2D}
* and this {@code Rectangle2D}.
*/
public Rectangle2D createUnion(final Rectangle2D rect) {
final XRectangle2D r = new XRectangle2D();
r.xmin = Math.min(xmin, rect.getMinX());
r.ymin = Math.min(ymin, rect.getMinY());
r.xmax = Math.max(xmax, rect.getMaxX());
r.ymax = Math.max(ymax, rect.getMaxY());
return r;
}
代码示例来源:origin: geotools/geotools
new XRectangle2D(
raster.getMinX() + 0.5,
raster.getMinY() + 0.5,
我是一名优秀的程序员,十分优秀!