Method for defining line and index values by coordinates