/** * Sets the Z coordinate of this point. * * @param z * The Z coordinate to be set for this point. */ public void setZ(double z) { setAttribute(Semantics.Z, 0, z); }
/** * Sets the Y coordinate of this point. * * @param y * The Y coordinate to be set for this point. */ public void setY(double y) { setAttribute(Semantics.POSITION, 1, y); }
/** * Sets the ID of this point. * * @param id * The ID of this point. */ public void setID(int id) { setAttribute(Semantics.ID, 0, id); }
/** * Sets the Z coordinate of this point. * * @param z * The Z coordinate to be set for this point. */ public void setZ(double z) { setAttribute(Semantics.Z, 0, z); }
/** * Sets the M coordinate of this point. * * @param m * The M coordinate to be set for this point. */ public void setM(double m) { setAttribute(Semantics.M, 0, m); }
/** * Sets the X coordinate of the point. * * @param x * The X coordinate to be set for this point. */ public void setX(double x) { setAttribute(Semantics.POSITION, 0, x); }
/** * Sets the Y coordinate of this point. * * @param y * The Y coordinate to be set for this point. */ public void setY(double y) { setAttribute(Semantics.POSITION, 1, y); }
/** * Sets the M coordinate of this point. * * @param m * The M coordinate to be set for this point. */ public void setM(double m) { setAttribute(Semantics.M, 0, m); }
/** * Sets the ID of this point. * * @param id * The ID of this point. */ public void setID(int id) { setAttribute(Semantics.ID, 0, id); }
/** * Sets the X coordinate of the point. * * @param x * The X coordinate to be set for this point. */ public void setX(double x) { setAttribute(Semantics.POSITION, 0, x); }
public void setAttribute(int semantics, int ordinate, int value) { setAttribute(semantics, ordinate, (double) value); }
public void setAttribute(int semantics, int ordinate, int value) { setAttribute(semantics, ordinate, (double) value); }
@Override public void replaceNaNs(int semantics, double value) { addAttribute(semantics); if (isEmpty()) return; int ncomps = VertexDescription.getComponentCount(semantics); for (int i = 0; i < ncomps; i++) { double v = getAttributeAsDbl(semantics, i); if (Double.isNaN(v)) setAttribute(semantics, i, value); } } }
@Override public void replaceNaNs(int semantics, double value) { addAttribute(semantics); if (isEmpty()) return; int ncomps = VertexDescription.getComponentCount(semantics); for (int i = 0; i < ncomps; i++) { double v = getAttributeAsDbl(semantics, i); if (Double.isNaN(v)) setAttribute(semantics, i, value); } } }
void queryCoord(double t, Point point) { point.assignVertexDescription(m_description); point.setXY(getCoord2D(t)); for (int iattrib = 1, nattrib = m_description.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = m_description._getSemanticsImpl(iattrib); int ncomp = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomp; iord++) { double value = getAttributeAsDbl(t, semantics, iord); point.setAttribute(semantics, iord, value); } } }
void queryCoord(double t, Point point) { point.assignVertexDescription(m_description); point.setXY(getCoord2D(t)); for (int iattrib = 1, nattrib = m_description.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = m_description._getSemanticsImpl(iattrib); int ncomp = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomp; iord++) { double value = getAttributeAsDbl(t, semantics, iord); point.setAttribute(semantics, iord, value); } } }
@Override public Point getPoint(int index) { if (index < 0 || index >= m_pointCount) throw new IndexOutOfBoundsException(); _verifyAllStreams(); Point outPoint = new Point(); outPoint.assignVertexDescription(m_description); if (outPoint.isEmpty()) outPoint._setToDefault(); for (int attributeIndex = 0; attributeIndex < m_description .getAttributeCount(); attributeIndex++) { int semantics = m_description.getSemantics(attributeIndex); for (int icomp = 0, ncomp = VertexDescription .getComponentCount(semantics); icomp < ncomp; icomp++) { double v = m_vertexAttributes[attributeIndex].readAsDbl(ncomp * index + icomp); outPoint.setAttribute(semantics, icomp, v); } } return outPoint; }
private void _get(int endPoint, Point outPoint) { if (isEmptyImpl()) throw new GeometryException("empty geometry");// ._setToDefault(); outPoint.assignVertexDescription(m_description); if (outPoint.isEmptyImpl()) outPoint._setToDefault(); for (int attributeIndex = 0; attributeIndex < m_description .getAttributeCount(); attributeIndex++) { int semantics = m_description._getSemanticsImpl(attributeIndex); for (int icomp = 0, ncomp = VertexDescription .getComponentCount(semantics); icomp < ncomp; icomp++) { double v = _getAttributeAsDbl(endPoint, semantics, icomp); outPoint.setAttribute(semantics, icomp, v); } } }
private void _get(int endPoint, Point outPoint) { if (isEmptyImpl()) throw new GeometryException("empty geometry");// ._setToDefault(); outPoint.assignVertexDescription(m_description); if (outPoint.isEmptyImpl()) outPoint._setToDefault(); for (int attributeIndex = 0; attributeIndex < m_description .getAttributeCount(); attributeIndex++) { int semantics = m_description._getSemanticsImpl(attributeIndex); for (int icomp = 0, ncomp = VertexDescription .getComponentCount(semantics); icomp < ncomp; icomp++) { double v = _getAttributeAsDbl(endPoint, semantics, icomp); outPoint.setAttribute(semantics, icomp, v); } } }
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()); }