docs: Geometry getGeometry(int geometry) {
  		int gt = getGeometryType(geometry);
  		Geometry geom = InternalUtils.createGeometry(gt,
  				m_vertices_mp.getDescription());
  		int point_count = getPointCount(geometry);
  
  		if (point_count == 0)
  			return geom;
  
  		if (Geometry.isMultiPath(gt)) {
  			MultiPathImpl mp_impl = (MultiPathImpl) geom._getImpl();
  			int path_count = getPathCount(geometry);
  			AttributeStreamOfInt32 parts = (AttributeStreamOfInt32) (AttributeStreamBase
  					.createIndexStream(path_count + 1));
  			AttributeStreamOfInt8 pathFlags = (AttributeStreamOfInt8) (AttributeStreamBase
  					.createByteStream(path_count + 1, (byte) 0));
  			VertexDescription description = geom.getDescription();
  
  			for (int iattrib = 0, nattrib = description.getAttributeCount(); iattrib < nattrib; iattrib++) {
  				int semantics = description.getSemantics(iattrib);
  				int ncomps = VertexDescription.getComponentCount(semantics);
  				AttributeStreamBase dst_stream = AttributeStreamBase
  						.createAttributeStreamWithSemantics(semantics,
  								point_count);
  				AttributeStreamBase src_stream = m_vertices
  						.getAttributeStreamRef(semantics);
  				int dst_index = 0;
  				int ipath = 0;
  				int nvert = 0;
  				for (int path = getFirstPath(geometry); path != -1; path = getNextPath(path)) {
  					byte flag_mask = 0;
  					if (isClosedPath(path)) {
  						flag_mask |= (byte) PathFlags.enumClosed;
  					} else {
  						assert (gt != Geometry.GeometryType.Polygon);
  					}
  
  					if (isExterior(path)) {
  						flag_mask |= (byte) PathFlags.enumOGCStartPolygon;
  					}
  
  					if (flag_mask != 0)
  						pathFlags.setBits(ipath, flag_mask);
  
  					int path_size = getPathSize(path);
  					parts.write(ipath++, nvert);
  					nvert += path_size;
  					if (semantics == VertexDescription.Semantics.POSITION) {
  						AttributeStreamOfDbl src_stream_dbl = (AttributeStreamOfDbl) (src_stream);
  						AttributeStreamOfDbl dst_stream_dbl = (AttributeStreamOfDbl) (dst_stream);
  						Point2D pt = new Point2D();
  						for (int vertex = getFirstVertex(path); dst_index < nvert; vertex = getNextVertex(vertex), dst_index++) {
  							int src_index = getVertexIndex(vertex);
  							src_stream_dbl.read(src_index * 2, pt);
  							dst_stream_dbl.write(dst_index * 2, pt);
  						}
  					} else {
  						for (int vertex = getFirstVertex(path); dst_index < nvert; vertex = getNextVertex(vertex), dst_index++) {
  							int src_index = getVertexIndex(vertex);
  							for (int icomp = 0; icomp < ncomps; icomp++) {
  								double d = src_stream.readAsDbl(src_index
  										* ncomps + icomp);
  								dst_stream.writeAsDbl(dst_index * ncomps
  										+ icomp, d);
  							}
  						}
  					}
  				}
  
  				assert (nvert == point_count);// Inconsistent content in the
  												// Edit_shape. Please, fix.
  				assert (ipath == path_count);
  				mp_impl.setAttributeStreamRef(semantics, dst_stream);
  				parts.write(path_count, point_count);
  			}
  
  			mp_impl.setPathFlagsStreamRef(pathFlags);
  			mp_impl.setPathStreamRef(parts);
  			mp_impl.notifyModified(DirtyFlags.dirtyAll);
  		} else if (gt == Geometry.GeometryType.MultiPoint) {
  			MultiPointImpl mp_impl = (MultiPointImpl) geom._getImpl();
  			VertexDescription description = geom.getDescription();
  			// mp_impl.reserve(point_count);
  			mp_impl.resize(point_count);
  
  			for (int iattrib = 0, nattrib = description.getAttributeCount(); iattrib < nattrib; iattrib++) {
  				int semantics = description.getSemantics(iattrib);
  				int ncomps = VertexDescription.getComponentCount(semantics);
  				AttributeStreamBase dst_stream = mp_impl
  						.getAttributeStreamRef(semantics);
  				// std::shared_ptr<Attribute_stream_base> dst_stream =
  				// Attribute_stream_base::create_attribute_stream(semantics,
  				// point_count);
  				AttributeStreamBase src_stream = m_vertices
  						.getAttributeStreamRef(semantics);
  				int dst_index = 0;
  				assert (getPathCount(geometry) == 1);
  				int path = getFirstPath(geometry);
  				int path_size = getPathSize(path);
  				for (int vertex = getFirstVertex(path); dst_index < path_size; vertex = getNextVertex(vertex), dst_index++) {
  					int src_index = getVertexIndex(vertex);
  					for (int icomp = 0; icomp < ncomps; icomp++) {
  						double d = src_stream.readAsDbl(src_index * ncomps
  								+ icomp);
  						dst_stream.writeAsDbl(dst_index * ncomps + icomp, d);
  					}
  				}
  
  				mp_impl.setAttributeStreamRef(semantics, dst_stream);
  			}
  
  			mp_impl.notifyModified(DirtyFlags.dirtyAll);
  		} else {
  			assert (false);
  		}
  
  		return geom;
  	}