1. A method of forming a photomask, comprising: receiving a layout of an integrated circuit (IC) device, wherein the layout has a curvilinear feature; providing a template library having a plurality of parameterized shape elements, wherein each of the plurality of parameterized shapes includes a mathematical description of the shape element including a variable that defines a parameter of the mathematical description; classifying the curvilinear feature by: selecting at least one of the parameterized shape elements that defines the curvilinear feature; assigning a value to the variable that defines the parameter; and storing on a computer readable medium a template index associated with the layout that includes the selected parameterized shape element and the value, wherein the template index is stored as one of a complementary file to the layout or an extension of a file including the layout; sending the template index and the layout to a mask writer; and using the template index and the layout to fabricate a pattern on a photomask.