A computer-implemented 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: for each of a plurality of current nodes, each current node associated with a said sub-volume split into further sub-volumes, and each further sub-volume corresponding to a child node of the current node: determining an occupancy pattern for the current node based on occupancy statuses of the child nodes indicated by an occupancy flag for each child node, wherein the occupancy pattern is specified by an integer representing a sequence of said occupancy flags associated with the child nodes in a pre-defined scan order; selecting one or more probabilities associated with respective entropy coders for entropy encoding the occupancy pattern, wherein the selecting is based on occupancy data for a plurality of neighbouring nodes of the current node and on occupancy data for child nodes of at least one of the plurality of neighbouring nodes; and entropy encoding the occupancy pattern based on the selected one or more probabilities, using the associated one or more entropy coders, to produce encoded data for the bitstream, wherein the selecting the one or more probabilities is based on a neighbouring configuration that is determined based on an occupancy status of each of the neighbouring nodes of the current node, and wherein a neighbouring node of the current node is considered as not occupied for the purpose of determining the neighbouring configuration if its occupancy data indicates that it is occupied and the occupancy data for its child nodes indicates that none of its occupied child nodes neighbours the current node. determining an occupancy pattern for the current node based on occupancy statuses of the child nodes indicated by an occupancy flag for each child node, wherein the occupancy pattern is specified by an integer representing a sequence of said occupancy flags associated with the child nodes in a pre-defined scan order; selecting one or more probabilities associated with respective entropy coders for entropy encoding the occupancy pattern, wherein the selecting is based on occupancy data for a plurality of neighbouring nodes of the current node and on occupancy data for child nodes of at least one of the plurality of neighbouring nodes; and entropy encoding the occupancy pattern based on the selected one or more probabilities, using the associated one or more entropy coders, to produce encoded data for the bitstream, wherein the selecting the one or more probabilities is based on a neighbouring configuration that is determined based on an occupancy status of each of the neighbouring nodes of the current node, and wherein a neighbouring node of the current node is considered as not occupied for the purpose of determining the neighbouring configuration if its occupancy data indicates that it is occupied and the occupancy data for its child nodes indicates that none of its occupied child nodes neighbours the current node. <EOS>