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

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

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

Geometry.createPointFromInternalCoord介绍

暂无

代码示例

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

/**
 * Computes an interior point of this <code>Geometry</code>.
 * An interior point is guaranteed to lie in the interior of the Geometry,
 * if it possible to calculate such a point exactly. Otherwise,
 * the point may lie on the boundary of the geometry.
 * <p>
 * The interior point of an empty geometry is <code>POINT EMPTY</code>.
 *
 * @return a {@link Point} which is in the interior of this Geometry
 */
public Point getInteriorPoint()
{
 if (isEmpty()) 
  return factory.createPoint((Coordinate) null);
 Coordinate interiorPt = null;
 int dim = getDimension();
 if (dim == 0) {
  InteriorPointPoint intPt = new InteriorPointPoint(this);
  interiorPt = intPt.getInteriorPoint();
 }
 else if (dim == 1) {
  InteriorPointLine intPt = new InteriorPointLine(this);
  interiorPt = intPt.getInteriorPoint();
 }
 else {
  InteriorPointArea intPt = new InteriorPointArea(this);
  interiorPt = intPt.getInteriorPoint();
 }
 return createPointFromInternalCoord(interiorPt, this);
}

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

centPt = cent.getCentroid();
return createPointFromInternalCoord(centPt, this);

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

/**
 * Computes the centroid of this <code>Geometry</code>.
 * The centroid
 * is equal to the centroid of the set of component Geometries of highest
 * dimension (since the lower-dimension geometries contribute zero
 * "weight" to the centroid).
 * <p>
 * The centroid of an empty geometry is <code>POINT EMPTY</code>.
 *
 * @return a {@link Point} which is the centroid of this Geometry
 */
public Point getCentroid()
{
 if (isEmpty()) 
  return factory.createPoint((Coordinate) null);
 Coordinate centPt = Centroid.getCentroid(this);
 return createPointFromInternalCoord(centPt, this);
}

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

/**
 * Computes an interior point of this <code>Geometry</code>.
 * An interior point is guaranteed to lie in the interior of the Geometry,
 * if it possible to calculate such a point exactly. Otherwise,
 * the point may lie on the boundary of the geometry.
 * <p>
 * The interior point of an empty geometry is <code>POINT EMPTY</code>.
 *
 * @return a {@link Point} which is in the interior of this Geometry
 */
public Point getInteriorPoint()
{
 if (isEmpty()) 
  return factory.createPoint((Coordinate) null);
 Coordinate interiorPt = null;
 int dim = getDimension();
 if (dim == 0) {
  InteriorPointPoint intPt = new InteriorPointPoint(this);
  interiorPt = intPt.getInteriorPoint();
 }
 else if (dim == 1) {
  InteriorPointLine intPt = new InteriorPointLine(this);
  interiorPt = intPt.getInteriorPoint();
 }
 else {
  InteriorPointArea intPt = new InteriorPointArea(this);
  interiorPt = intPt.getInteriorPoint();
 }
 return createPointFromInternalCoord(interiorPt, this);
}

相关文章