private static ByteBuffer getShapeByteBuffer(BytesWritable geomref) {
    byte[] geomBytes = geomref.getBytes();
    int offset = SIZE_WKID + SIZE_TYPE;

    return ByteBuffer.wrap(geomBytes, offset, geomBytes.length - offset).slice().order(ByteOrder.LITTLE_ENDIAN);
  }
Sets the WKID (in place) for the given hive geometry bytes

@param geomref reference to hive geometry bytes
@param wkid
ql/src/java/org/apache/hadoop/hive/ql/udf/esri/GeometryUtils.java