Previously, calling Centroid(...) on an invalid geometry (such as https://www.openstreetmap.org/relation/9769005, which I think gets simplified to having 0 rings) would throw, killing the lua process.
Instead, return nil.
I think this is reasonable? I guess it might be preferable if invalid geometries never made it to the lua code, but then we'd have to proactively fix every geometry, even those not ultimately emitted, which would be expensive.
Previously, calling Centroid(...) on an invalid geometry (such as https://www.openstreetmap.org/relation/9769005, which I think gets simplified to having 0 rings) would throw, killing the lua process.
Instead, return nil.
I think this is reasonable? I guess it might be preferable if invalid geometries never made it to the lua code, but then we'd have to proactively fix every geometry, even those not ultimately emitted, which would be expensive.