Open nerskin opened 7 months ago
I'm guessing this is caused by how the geometries are simplified before being stored in this package, but is it possible to do this in a way that doesn't completely destroy some of the polygons?
thanks for raising this.
yes, this is an issue with the simplification level and its interactions with your example SA1 and its neighbouring SA1s.
if i had my time again, i would have better balanced the simplification level for SA1s, or not simplified them at all.
maybe a future update could use rmapshaper::ms_simplify(keep = 0.3)
rather than rmapshaper::ms_simplify(keep = 0.1)
. this increases the file size but has with far better results, eg:
may also be worth hosting the data objects somewhere with greater storage capacity to allow for unsimplified sf
objects to be hosted.
i don't have time to explore alternatives at the moment, but keen to hear if there are any better ideas out there.
thanks for raising this.
yes, this is an issue with the simplification level and its interactions with your example SA1 and its neighbouring SA1s.
if i had my time again, i would have better balanced the simplification level for SA1s, or not simplified them at all. maybe a future update could use
rmapshaper::ms_simplify(keep = 0.3)
rather thanrmapshaper::ms_simplify(keep = 0.1)
. this increases the file size but has with far better results, eg:may also be worth hosting the data objects somewhere with greater storage capacity to allow for unsimplified
sf
objects to be hosted.i don't have time to explore alternatives at the moment, but keen to hear if there are any better ideas out there.
I think finding a way to host unsimplified objects would be the best long-term solution (maybe as geoparquet files which allow for fast reading and reasonably compact storage)
agree. something i can explore down the line (and happy to take PRs from anyone reading this!)
I've noticed for a handful of SA1s in the dataset
sa12021
that the polygon in the geometry column is very wrong.One example is SA1 80109110916. Below is a map showing this SA1 as it appears in the
sa12021
dataset (it's the tiny red sliver in the middle of the plot).If I instead use the SA1 shapefiles published by the ABS, the map looks like this:
The SA1s affected by this issue can be identified by comparing the area of the SA1 as computed by
sf::st_area
with the area given in the variableareasqkm_2021
. Reprex:Created on 2024-03-31 with reprex v2.1.0