1. An apparatus, comprising: memory; and a processor configured to execute instructions stored in the memory to: search mask data, wherein the mask data describes figures corresponding to features of an optical mask to be generated based on the mask data, and wherein the mask data is searched for a set of one or more figures corresponding with an electronic pattern definition, the pattern definition describing at least one geometric figure and having a pattern ID; identify a match in the mask data, wherein the match comprises a set of one or more figures corresponding with the pattern definition; identify a match location in the mask data, the mask location corresponding to a location of the match in the mask data; identify a match orientation, the match orientation describing an orientation of the match; and generate a set of coordinates for the match location based on the pattern ID and the match orientation, the set of coordinates indicating a position in the mask data for further processing.