com.vividsolutions.jts.geom.Geometry.computeEnvelopeInternal()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中com.vividsolutions.jts.geom.Geometry.computeEnvelopeInternal()方法的一些代码示例,展示了Geometry.computeEnvelopeInternal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.computeEnvelopeInternal()方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Geometry
类名称:Geometry
方法名:computeEnvelopeInternal

Geometry.computeEnvelopeInternal介绍

[英]Returns the minimum and maximum x and y values in this Geometry , or a null Envelope if this Geometry is empty. Unlike getEnvelopeInternal, this method calculates the Envelope each time it is called; getEnvelopeInternal caches the result of this method.
[中]返回此Geometry中的最小和最大x和y值,如果此Geometry为空,则返回nullEnvelope。与getEnvelopeInternal不同,此方法在每次调用Envelope时都会计算它;getEnvelopeInternal缓存此方法的结果。

代码示例

代码示例来源:origin: com.vividsolutions/jts

/**
 * Gets an {@link Envelope} containing 
 * the minimum and maximum x and y values in this <code>Geometry</code>.
 * If the geometry is empty, an empty <code>Envelope</code> 
 * is returned.
 * <p>
 * The returned object is a copy of the one maintained internally,
 * to avoid aliasing issues.  
 * For best performance, clients which access this
 * envelope frequently should cache the return value.
 *
 *@return the envelope of this <code>Geometry</code>.
 *@return an empty Envelope if this Geometry is empty
 */
public Envelope getEnvelopeInternal() {
 if (envelope == null) {
  envelope = computeEnvelopeInternal();
 }
 return new Envelope(envelope);
}

代码示例来源:origin: com.vividsolutions/jts-core

/**
 * Gets an {@link Envelope} containing 
 * the minimum and maximum x and y values in this <code>Geometry</code>.
 * If the geometry is empty, an empty <code>Envelope</code> 
 * is returned.
 * <p>
 * The returned object is a copy of the one maintained internally,
 * to avoid aliasing issues.  
 * For best performance, clients which access this
 * envelope frequently should cache the return value.
 *
 *@return the envelope of this <code>Geometry</code>.
 *@return an empty Envelope if this Geometry is empty
 */
public Envelope getEnvelopeInternal() {
 if (envelope == null) {
  envelope = computeEnvelopeInternal();
 }
 return new Envelope(envelope);
}

相关文章