I was hitting an error with the previous regex call in re.findall() when the longitude value was a whole number. The expression dropped those values and the function failed because there was an odd number of values when constructing (lat, lon) pairs for the x_coords object.
I updated the expression based on the response here, and it resolved the issue that I was hitting but I don't have much experience with regex so it might need another set of eyes to make sure there aren't any incorrect assumptions with the new expression.
I was hitting an error with the previous regex call in
re.findall()
when the longitude value was a whole number. The expression dropped those values and the function failed because there was an odd number of values when constructing(lat, lon)
pairs for thex_coords
object.I updated the expression based on the response here, and it resolved the issue that I was hitting but I don't have much experience with regex so it might need another set of eyes to make sure there aren't any incorrect assumptions with the new expression.