Closed MicheleTobias closed 2 years ago
st_union() makes a multipolgyon.
Possibly we want aggregate() with union=TRUE? Probably not. Merge()? Just some thoughts as I close out the day.
The problem was farther back than I initially realized. The isochrone data had invalid polygons (probably duplicate vertices... you can't have two consecutive vertices in the exact same location). Running st_make_valid() on the polygons before the st_union() resulted in no errors.
The
access_calculation.R
file throws an error for the 120 minute isochrone data in thecalc_access()
function at thest_union()
step:Error in wk_handle.wk_wkb(wkb, s2_geography_writer(oriented = oriented, : Loop 0 is not valid: Edge 70 has duplicate vertex with edge 75
It seems that the union step creates a duplicated vertex, which, of course, is an invalid geometry.