Converts longitude/latitude to a zero-indexed number