PolarGeospatialCenter / imagery_utils

Other
34 stars 10 forks source link

Update regex in doesCross180() to accept lat/lon integer values, not just floats #36

Closed bakkerbakker closed 3 years ago

bakkerbakker commented 3 years ago

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.

bakkerbakker commented 3 years ago

Good to know, thanks Erik!