Closed Syeda123-Fatima closed 4 years ago
Guessing that Australia_POP16.shp
is an sf
object, try e.g.
Australia_POP16.shp[!st_is_empty(Australia_POP16.shp),]
This feels like the (very) legacy practice of the Australian Bureau of Statistics to stuff non-localised data into empty-geometry features referred to in http://maptools.r-forge.r-project.org/reference/readShapeSpatial.html as arguments: delete_null_obj
and retrieve_ABS_null
. It should be very obvious that any analyses using the neighbour object must also delete the empty geometry features.
nb <- poly2nb(Australia_POP16.shp, row.names = 'POA_CODE16', queen = FALSE) Error in poly2nb(Australia_POP16.shp, row.names = "POA_CODE16", queen = FALSE) : Empty geometries found
How to get rid of empty geometries