use is.finite() instead of !is.na() to protect against Inf/-Inf values in lat/lng