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

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

本文整理了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

  1. @Override
  2. public void readFields(final DataInput dataInput) throws IOException
  3. {
  4. point.setEmpty();
  5. point.setX(dataInput.readDouble());
  6. point.setY(dataInput.readDouble());
  7. }
  8. }

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

  1. @Override
  2. public void copyTo(Geometry dst) {
  3. if (dst.getType() != Type.Point)
  4. throw new IllegalArgumentException();
  5. Point pointDst = (Point) dst;
  6. dst._touch();
  7. if (m_attributes == null) {
  8. pointDst.setEmpty();
  9. pointDst.m_attributes = null;
  10. pointDst.assignVertexDescription(m_description);
  11. } else {
  12. pointDst.assignVertexDescription(m_description);
  13. pointDst.resizeAttributes(m_description.getTotalComponentCount());
  14. attributeCopy(m_attributes, pointDst.m_attributes,
  15. m_description.getTotalComponentCount());
  16. }
  17. }

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

  1. @Override
  2. public void copyTo(Geometry dst) {
  3. if (dst.getType() != Type.Point)
  4. throw new IllegalArgumentException();
  5. Point pointDst = (Point) dst;
  6. dst._touch();
  7. if (m_attributes == null) {
  8. pointDst.setEmpty();
  9. pointDst.m_attributes = null;
  10. pointDst.assignVertexDescription(m_description);
  11. } else {
  12. pointDst.assignVertexDescription(m_description);
  13. pointDst.resizeAttributes(m_description.getTotalComponentCount());
  14. attributeCopy(m_attributes, pointDst.m_attributes,
  15. m_description.getTotalComponentCount());
  16. }
  17. }

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

  1. public void getCenter(Point point_out) {
  2. point_out.assignVertexDescription(m_description);
  3. if (isEmpty()) {
  4. point_out.setEmpty();
  5. return;
  6. }
  7. int nattrib = m_description.getAttributeCount();
  8. for (int i = 1; i < nattrib; i++) {
  9. int semantics = m_description.getSemantics(i);
  10. int ncomp = VertexDescription.getComponentCount(semantics);
  11. for (int iord = 0; iord < ncomp; iord++) {
  12. double v = 0.5 * (getAttributeAsDblImpl_(0, semantics, iord) + getAttributeAsDblImpl_(
  13. 1, semantics, iord));
  14. point_out.setAttribute(semantics, iord, v);
  15. }
  16. }
  17. point_out.setXY(m_envelope.getCenter());
  18. }

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

  1. public void getCenter(Point point_out) {
  2. point_out.assignVertexDescription(m_description);
  3. if (isEmpty()) {
  4. point_out.setEmpty();
  5. return;
  6. }
  7. int nattrib = m_description.getAttributeCount();
  8. for (int i = 1; i < nattrib; i++) {
  9. int semantics = m_description.getSemantics(i);
  10. int ncomp = VertexDescription.getComponentCount(semantics);
  11. for (int iord = 0; iord < ncomp; iord++) {
  12. double v = 0.5 * (getAttributeAsDblImpl_(0, semantics, iord) + getAttributeAsDblImpl_(
  13. 1, semantics, iord));
  14. point_out.setAttribute(semantics, iord, v);
  15. }
  16. }
  17. point_out.setXY(m_envelope.getCenter());
  18. }

相关文章