/** * Assigns the new VertexDescription by adding or dropping attributes. The * Geometry will have the src description as a result. * @param src VertexDescription to assign. */ public void assignVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; _assignVertexDescriptionImpl(src); }
/** * Assigns the new VertexDescription by adding or dropping attributes. The * Geometry will have the src description as a result. * @param src VertexDescription to assign. */ public void assignVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; _assignVertexDescriptionImpl(src); }
/** * Merges the new VertexDescription by adding missing attributes from the * src. The Geometry will have a union of the current and the src * descriptions. * @param src VertexDescription to merge. */ public void mergeVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; // check if we need to do anything (if the src has same attributes) VertexDescription newdescription = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, src); if (newdescription == m_description) return; _assignVertexDescriptionImpl(newdescription); }
/** * Merges the new VertexDescription by adding missing attributes from the * src. The Geometry will have a union of the current and the src * descriptions. * @param src VertexDescription to merge. */ public void mergeVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; // check if we need to do anything (if the src has same attributes) VertexDescription newdescription = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, src); if (newdescription == m_description) return; _assignVertexDescriptionImpl(newdescription); }
/** * Adds a new attribute to the Geometry. * * @param semantics The VertexDescription.Semantics to add. */ public void addAttribute(int semantics) { _touch(); if (m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Adds a new attribute to the Geometry. * * @param semantics The VertexDescription.Semantics to add. */ public void addAttribute(int semantics) { _touch(); if (m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Drops an attribute from the Geometry. Dropping the attribute is * equivalent to setting the attribute to the default value for each vertex, * However, it is faster and the result Geometry has smaller memory * footprint and smaller size when persisted. * @param semantics The VertexDescription.Semantics to drop. */ public void dropAttribute(int semantics) { _touch(); if (!m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.removeSemanticsFromVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Drops an attribute from the Geometry. Dropping the attribute is * equivalent to setting the attribute to the default value for each vertex, * However, it is faster and the result Geometry has smaller memory * footprint and smaller size when persisted. * @param semantics The VertexDescription.Semantics to drop. */ public void dropAttribute(int semantics) { _touch(); if (!m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.removeSemanticsFromVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
@Override public void copyTo(Geometry dst) { if (dst.getType() != getType()) throw new IllegalArgumentException(); Envelope envDst = (Envelope) dst; dst._touch(); envDst.m_description = m_description; envDst.m_envelope.setCoords(m_envelope); envDst.m_attributes = null; if (m_attributes != null) { envDst._ensureAttributes(); System.arraycopy(m_attributes, 0, envDst.m_attributes, 0, (m_description.getTotalComponentCount() - 2) * 2); } }
@Override public void copyTo(Geometry dst) { if (dst.getType() != getType()) throw new IllegalArgumentException(); Envelope envDst = (Envelope) dst; dst._touch(); envDst.m_description = m_description; envDst.m_envelope.setCoords(m_envelope); envDst.m_attributes = null; if (m_attributes != null) { envDst._ensureAttributes(); System.arraycopy(m_attributes, 0, envDst.m_attributes, 0, (m_description.getTotalComponentCount() - 2) * 2); } }
@Override public void copyTo(Geometry dst) { if (dst.getType() != getType()) throw new IllegalArgumentException(); Segment segDst = (Segment) dst; segDst.m_description = m_description; segDst._resizeAttributes(m_description.getTotalComponentCount() - 2); _attributeCopy(m_attributes, 0, segDst.m_attributes, 0, (m_description.getTotalComponentCount() - 2) * 2); segDst.m_xStart = m_xStart; segDst.m_yStart = m_yStart; segDst.m_xEnd = m_xEnd; segDst.m_yEnd = m_yEnd; dst._touch(); _copyToImpl(segDst); }
@Override public void copyTo(Geometry dst) { if (dst.getType() != getType()) throw new IllegalArgumentException(); Segment segDst = (Segment) dst; segDst.m_description = m_description; segDst._resizeAttributes(m_description.getTotalComponentCount() - 2); _attributeCopy(m_attributes, 0, segDst.m_attributes, 0, (m_description.getTotalComponentCount() - 2) * 2); segDst.m_xStart = m_xStart; segDst.m_yStart = m_yStart; segDst.m_xEnd = m_xEnd; segDst.m_yEnd = m_yEnd; dst._touch(); _copyToImpl(segDst); }
@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()); } }
@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()); } }