but now to get the lat variable its data would I need a for loop going from 0-9 with doing atoi until the null?
You need a loop, going from the starting position in the linea array to the ending position in the linea array, to copy the character into the temp array.
After all the data is copied into the temp array, NULL terminate the array.
After the array is NULL terminated, pass the array to atoi. You do not pass individual characters to atoi.