private int getPolygonSize(Polygon geom) {
   // to hold the number of linear rings
   int size = ByteBuffer.UINT_SIZE;
   // for each linear ring, a UINT holds the number of points
   size += geom.isEmpty() ? 0 : ByteBuffer.UINT_SIZE * (geom.getNumInteriorRing() + 1);
   size += getPointByteSize(geom) * geom.getNumPoints();
   return size;
 }
 private void writeNumRings(Polygon geom, ByteBuffer byteBuffer) {
   byteBuffer.putUInt(geom.isEmpty() ? 0 : geom.getNumInteriorRing() + 1);
 }
Пример #3
0
 protected void writeNumRings(Polygon<P> geom, ByteBuffer byteBuffer) {
   byteBuffer.putUInt(geom.isEmpty() ? 0 : geom.getNumInteriorRing() + 1);
 }