本文整理了Java中com.esri.core.geometry.Point.setEmpty()
方法的一些代码示例,展示了Point.setEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.setEmpty()
方法的具体详情如下:
包路径:com.esri.core.geometry.Point
类名称: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());
}
内容来源于网络,如有侵权,请联系作者删除!