A method for compressing a point cloud, wherein the point cloud is composed of a plurality of points in a three-dimensional space, comprising steps: acquiring the point cloud with a sensor, wherein each point is associated with a 3D coordinate and at least one attribute value; converting the point cloud to a uniform grid of points by partitioning the point cloud into an octree of voxels; wherein: each leaf node in the octree corresponds to a point output by the partitioning, and the position of the point is set to a geometric center of the leaf node, and the attribute value associated with the point is set to an average attribute value of one or more points in the leaf node; wherein the partitioning is repeated until the voxels have a minimal predefined resolution; partitioning the uniform grid of points region into an array of 3D blocks of elements, each 3D block having the same size, wherein some of the elements in the 3D blocks have missing points; predicting, for each 3D block, attribute values for the 3D block based on the attribute values of neighboring 3D blocks, wherein: the prediction for the current block is from points contained in non-empty adjacent blocks (202, 203, 204), wherein after the attribute values in an adjacent block along a boundary plane between the adjacent block and the current block are estimated, these values are then projected or replicated into the current block parallel to the direction of prediction; and obtaining a 3D prediction residual block indicative of a difference between the predicted attribute values for the 3D block and the acquired attribute values, associated with each point of the point cloud, in the 3D block; applying a 3D transform to each 3D prediction residual block using locations of occupied elements to produce transform coefficients, wherein the transform coefficients have a magnitude and sign; and entropy encoding the transform coefficients according the magnitudes and sign bits to produce a bitstream, wherein: the 3D transform is a shape-adaptive discrete cosine transform (SA-DCT), wherein the occupied elements in each said 3D prediction residual block are considered to be the region to be coded for the SA-DCT, wherein the steps are performed in a processor. acquiring the point cloud with a sensor, wherein each point is associated with a 3D coordinate and at least one attribute value; converting the point cloud to a uniform grid of points by partitioning the point cloud into an octree of voxels; wherein: each leaf node in the octree corresponds to a point output by the partitioning, and the position of the point is set to a geometric center of the leaf node, and the attribute value associated with the point is set to an average attribute value of one or more points in the leaf node; wherein the partitioning is repeated until the voxels have a minimal predefined resolution; partitioning the uniform grid of points region into an array of 3D blocks of elements, each 3D block having the same size, wherein some of the elements in the 3D blocks have missing points; predicting, for each 3D block, attribute values for the 3D block based on the attribute values of neighboring 3D blocks, wherein: the prediction for the current block is from points contained in non-empty adjacent blocks (202, 203, 204), wherein after the attribute values in an adjacent block along a boundary plane between the adjacent block and the current block are estimated, these values are then projected or replicated into the current block parallel to the direction of prediction; and obtaining a 3D prediction residual block indicative of a difference between the predicted attribute values for the 3D block and the acquired attribute values, associated with each point of the point cloud, in the 3D block; applying a 3D transform to each 3D prediction residual block using locations of occupied elements to produce transform coefficients, wherein the transform coefficients have a magnitude and sign; and entropy encoding the transform coefficients according the magnitudes and sign bits to produce a bitstream, wherein: the 3D transform is a shape-adaptive discrete cosine transform (SA-DCT), wherein the occupied elements in each said 3D prediction residual block are considered to be the region to be coded for the SA-DCT, wherein the steps are performed in a processor.