com.esri.core.geometry.Point.setEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(167)

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

Point.setEmpty介绍

暂无

代码示例

代码示例来源:origin: mraad/Shapefile

@Override
  public void readFields(final DataInput dataInput) throws IOException
  {
    point.setEmpty();
    point.setX(dataInput.readDouble());
    point.setY(dataInput.readDouble());
  }
}

代码示例来源:origin: Esri/geometry-api-java

@Override
public void copyTo(Geometry dst) {
  if (dst.getType() != Type.Point)
    throw new IllegalArgumentException();
  Point pointDst = (Point) dst;
  dst._touch();
  if (m_attributes == null) {
    pointDst.setEmpty();
    pointDst.m_attributes = null;
    pointDst.assignVertexDescription(m_description);
  } else {
    pointDst.assignVertexDescription(m_description);
    pointDst.resizeAttributes(m_description.getTotalComponentCount());
    attributeCopy(m_attributes, pointDst.m_attributes,
        m_description.getTotalComponentCount());
  }
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

@Override
public void copyTo(Geometry dst) {
  if (dst.getType() != Type.Point)
    throw new IllegalArgumentException();
  Point pointDst = (Point) dst;
  dst._touch();
  if (m_attributes == null) {
    pointDst.setEmpty();
    pointDst.m_attributes = null;
    pointDst.assignVertexDescription(m_description);
  } else {
    pointDst.assignVertexDescription(m_description);
    pointDst.resizeAttributes(m_description.getTotalComponentCount());
    attributeCopy(m_attributes, pointDst.m_attributes,
        m_description.getTotalComponentCount());
  }
}

代码示例来源:origin: Esri/geometry-api-java

public void getCenter(Point point_out) {
  point_out.assignVertexDescription(m_description);
  if (isEmpty()) {
    point_out.setEmpty();
    return;
  }
  int nattrib = m_description.getAttributeCount();
  for (int i = 1; i < nattrib; i++) {
    int semantics = m_description.getSemantics(i);
    int ncomp = VertexDescription.getComponentCount(semantics);
    for (int iord = 0; iord < ncomp; iord++) {
      double v = 0.5 * (getAttributeAsDblImpl_(0, semantics, iord) + getAttributeAsDblImpl_(
          1, semantics, iord));
      point_out.setAttribute(semantics, iord, v);
    }
  }
  point_out.setXY(m_envelope.getCenter());
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

public void getCenter(Point point_out) {
  point_out.assignVertexDescription(m_description);
  if (isEmpty()) {
    point_out.setEmpty();
    return;
  }
  int nattrib = m_description.getAttributeCount();
  for (int i = 1; i < nattrib; i++) {
    int semantics = m_description.getSemantics(i);
    int ncomp = VertexDescription.getComponentCount(semantics);
    for (int iord = 0; iord < ncomp; iord++) {
      double v = 0.5 * (getAttributeAsDblImpl_(0, semantics, iord) + getAttributeAsDblImpl_(
          1, semantics, iord));
      point_out.setAttribute(semantics, iord, v);
    }
  }
  point_out.setXY(m_envelope.getCenter());
}

相关文章