A method of encoding a point cloud to generate a bitstream of compressed point cloud data, the point cloud being defined in a tree structure having a plurality of nodes having parent-child relationships and that represent the geometry of a volumetric space recursively split into sub-volumes and containing the points of the point cloud, the method comprising: traversing the tree, wherein the traversing includes: for a current node associated with a sub-volume, determining, based on occupancy data from another node, if points within the sub-volume associated with the current node are eligible for direct coding; if said points within the sub-volume associated with the current node are determined as eligible for direct coding: determining, based on the number of points within the sub-volume associated with the current node, if direct coding is to be applied; if it is determined that direct coding is to be applied: setting a flag in the bitstream indicating that direct coding is to be applied in association with the current node; and entropy encoding positional coordinate data for at least some of the points within the sub-volume; whereas if it is not determined that direct coding is to be applied: entropy encoding patterns of occupancy for sets of child nodes of the sub-volume associated with the current node; wherein a pattern of occupancy indicates which of the sub-volumes associated with the respective child nodes contain at least one point. for a current node associated with a sub-volume, determining, based on occupancy data from another node, if points within the sub-volume associated with the current node are eligible for direct coding; if said points within the sub-volume associated with the current node are determined as eligible for direct coding: determining, based on the number of points within the sub-volume associated with the current node, if direct coding is to be applied; if it is determined that direct coding is to be applied: setting a flag in the bitstream indicating that direct coding is to be applied in association with the current node; and entropy encoding positional coordinate data for at least some of the points within the sub-volume; whereas if it is not determined that direct coding is to be applied: entropy encoding patterns of occupancy for sets of child nodes of the sub-volume associated with the current node; wherein a pattern of occupancy indicates which of the sub-volumes associated with the respective child nodes contain at least one point. determining, based on occupancy data from another node, if points within the sub-volume associated with the current node are eligible for direct coding; if said points within the sub-volume associated with the current node are determined as eligible for direct coding: determining, based on the number of points within the sub-volume associated with the current node, if direct coding is to be applied; if it is determined that direct coding is to be applied: setting a flag in the bitstream indicating that direct coding is to be applied in association with the current node; and entropy encoding positional coordinate data for at least some of the points within the sub-volume; whereas setting a flag in the bitstream indicating that direct coding is to be applied in association with the current node; and entropy encoding positional coordinate data for at least some of the points within the sub-volume; whereas if it is not determined that direct coding is to be applied: entropy encoding patterns of occupancy for sets of child nodes of the sub-volume associated with the current node; wherein a pattern of occupancy indicates which of the sub-volumes associated with the respective child nodes contain at least one point. entropy encoding patterns of occupancy for sets of child nodes of the sub-volume associated with the current node; wherein a pattern of occupancy indicates which of the sub-volumes associated with the respective child nodes contain at least one point.