for (int j=indices[i];j<(indices[i+1]-1);j++){
int n=0;
int m=0;
Each time through the loop, n and m will be reset to 0. Incrementing n and m within the loop is a waste of effort, then.
Move the declarations if n and m outside of the loop.
Also, these numbers are going to have 4 decimal places, so I have to use floats? so I'd use atof instead of atoi?
Right now, you are printing the values of the lat and lon strings. Do the values that you print contain decimal points? If so, then you should convert the strings to floats (using atof). Otherwise, convert them to integers (or longs) using atoi (or atol).