public void setInterval(int semantics, int ordinate, double vmin, double vmax) { setInterval(semantics, ordinate, new Envelope1D(vmin, vmax)); }
public void setInterval(int semantics, int ordinate, double vmin, double vmax) { setInterval(semantics, ordinate, new Envelope1D(vmin, vmax)); }
void _setFromPoint(Point centerPoint) { m_envelope.setCoords(centerPoint.m_attributes[0], centerPoint.m_attributes[1]); VertexDescription pointVD = centerPoint.m_description; for (int iattrib = 1, nattrib = pointVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = pointVD._getSemanticsImpl(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { double v = centerPoint.getAttributeAsDbl(semantics, iord); setInterval(semantics, iord, v, v); } } }
void _setFromPoint(Point centerPoint) { m_envelope.setCoords(centerPoint.m_attributes[0], centerPoint.m_attributes[1]); VertexDescription pointVD = centerPoint.m_description; for (int iattrib = 1, nattrib = pointVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = pointVD._getSemanticsImpl(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { double v = centerPoint.getAttributeAsDbl(semantics, iord); setInterval(semantics, iord, v, v); } } }
@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++) { Envelope1D interval = queryInterval(semantics, i); if (interval.isEmpty()) { interval.vmin = value; interval.vmax = value; setInterval(semantics, i, interval); } } }
@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++) { Envelope1D interval = queryInterval(semantics, i); if (interval.isEmpty()) { interval.vmin = value; interval.vmax = value; setInterval(semantics, i, interval); } } }
void _setFromPoint(Point centerPoint, double width, double height) { m_envelope.setCoords(centerPoint.getXY(), width, height); VertexDescription pointVD = centerPoint.m_description; for (int iattrib = 1, nattrib = pointVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = pointVD._getSemanticsImpl(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { double v = centerPoint.getAttributeAsDbl(semantics, iord); setInterval(semantics, iord, v, v); } } }
public Object readResolve() throws ObjectStreamException { Envelope env = null; if (descriptionBitMask == -1) return null; try { VertexDescription vd = VertexDescriptionDesignerImpl .getVertexDescription(descriptionBitMask); env = new Envelope(vd); if (attribs != null) { env.setCoords(attribs[0], attribs[1], attribs[2], attribs[3]); int index = 4; for (int i = 1, n = vd.getAttributeCount(); i < n; i++) { int semantics = vd.getSemantics(i); int comps = VertexDescription.getComponentCount(semantics); for (int ord = 0; ord < comps; ord++) { env.setInterval(semantics, ord, attribs[index++], attribs[index++]); } } } } catch (Exception ex) { throw new InvalidObjectException("Cannot read geometry from stream"); } return env; }
void _setFromPoint(Point centerPoint, double width, double height) { m_envelope.setCoords(centerPoint.getXY(), width, height); VertexDescription pointVD = centerPoint.m_description; for (int iattrib = 1, nattrib = pointVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = pointVD._getSemanticsImpl(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { double v = centerPoint.getAttributeAsDbl(semantics, iord); setInterval(semantics, iord, v, v); } } }
public Object readResolve() throws ObjectStreamException { Envelope env = null; if (descriptionBitMask == -1) return null; try { VertexDescription vd = VertexDescriptionDesignerImpl .getVertexDescription(descriptionBitMask); env = new Envelope(vd); if (attribs != null) { env.setCoords(attribs[0], attribs[1], attribs[2], attribs[3]); int index = 4; for (int i = 1, n = vd.getAttributeCount(); i < n; i++) { int semantics = vd.getSemantics(i); int comps = VertexDescription.getComponentCount(semantics); for (int ord = 0; ord < comps; ord++) { env.setInterval(semantics, ord, attribs[index++], attribs[index++]); } } } } catch (Exception ex) { throw new InvalidObjectException("Cannot read geometry from stream"); } return env; }
@Override public void queryEnvelope(Envelope env) { env.setEmpty(); env.assignVertexDescription(m_description); Envelope2D env2D = new Envelope2D(); queryEnvelope2D(env2D); env.setEnvelope2D(env2D); for (int i = 1, n = m_description.getAttributeCount(); i < n; i++) { int semantics = m_description.getSemantics(i); for (int iord = 0, nord = VertexDescription .getComponentCount(semantics); i < nord; i++) { Envelope1D interval = queryInterval(semantics, iord); env.setInterval(semantics, iord, interval); } } }
@Override public void queryEnvelope(Envelope env) { env.setEmpty(); env.assignVertexDescription(m_description); Envelope2D env2D = new Envelope2D(); queryEnvelope2D(env2D); env.setEnvelope2D(env2D); for (int i = 1, n = m_description.getAttributeCount(); i < n; i++) { int semantics = m_description.getSemantics(i); for (int iord = 0, nord = VertexDescription .getComponentCount(semantics); i < nord; i++) { Envelope1D interval = queryInterval(semantics, iord); env.setInterval(semantics, iord, interval); } } }
/** * Merges this envelope with the extent of the given envelope. If this * envelope is empty, the coordinates of the given envelope * are assigned. If the given envelope is empty, this envelope is unchanged. * * @param other * The envelope to merge. */ public void merge(Envelope other) { _touch(); if (other.isEmpty()) return; VertexDescription otherVD = other.m_description; if (otherVD != m_description) mergeVertexDescription(otherVD); m_envelope.merge(other.m_envelope); for (int iattrib = 1, nattrib = otherVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = otherVD.getSemantics(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { Envelope1D intervalOther = other.queryInterval(semantics, iord); Envelope1D interval = queryInterval(semantics, iord); interval.merge(intervalOther); setInterval(semantics, iord, interval); } } }
/** * Merges this envelope with the extent of the given envelope. If this * envelope is empty, the coordinates of the given envelope * are assigned. If the given envelope is empty, this envelope is unchanged. * * @param other * The envelope to merge. */ public void merge(Envelope other) { _touch(); if (other.isEmpty()) return; VertexDescription otherVD = other.m_description; if (otherVD != m_description) mergeVertexDescription(otherVD); m_envelope.merge(other.m_envelope); for (int iattrib = 1, nattrib = otherVD.getAttributeCount(); iattrib < nattrib; iattrib++) { int semantics = otherVD.getSemantics(iattrib); int ncomps = VertexDescription.getComponentCount(semantics); for (int iord = 0; iord < ncomps; iord++) { Envelope1D intervalOther = other.queryInterval(semantics, iord); Envelope1D interval = queryInterval(semantics, iord); interval.merge(intervalOther); setInterval(semantics, iord, interval); } } }
Envelope1D interval = queryInterval(semantics, iord); interval.merge(v); setInterval(semantics, iord, interval);
Envelope1D interval = queryInterval(semantics, iord); interval.merge(v); setInterval(semantics, iord, interval);
interval.vmax = z; envelope.addAttribute(Semantics.Z); envelope.setInterval(Semantics.Z, 0, interval); interval.vmax = m; envelope.addAttribute(Semantics.M); envelope.setInterval(Semantics.M, 0, interval); interval.vmax = id; envelope.addAttribute(Semantics.ID); envelope.setInterval(Semantics.ID, 0, interval);
interval.vmax = z; envelope.addAttribute(Semantics.Z); envelope.setInterval(Semantics.Z, 0, interval); interval.vmax = m; envelope.addAttribute(Semantics.M); envelope.setInterval(Semantics.M, 0, interval); interval.vmax = id; envelope.addAttribute(Semantics.ID); envelope.setInterval(Semantics.ID, 0, interval);
m_envelope.setInterval(semantics, iord, interval);
m_envelope.setInterval(semantics, iord, interval);