can be used to get the correct index from coordinates passed in. Will only calculate the index, not take into consideration any grid size constraints etc.