1. A substrate having a coding pattern disposed on a surface thereof, said coding pattern comprising: a plurality of target elements defining a target grid, said target grid comprising a plurality of cells, wherein neighboring cells share target elements; a plurality of data elements contained in each cell; and a plurality of tags, each tag being defined by a plurality of contiguous cells, each tag comprising respective local tag data encoded by a respective set of said data elements, wherein each tag comprises a plurality of replications of said local tag data, such that any tag-sized portion of said coding pattern is guaranteed to contain said local tag data irrespective of whether a whole tag is contained in said portion.