You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was putting together a GPKG with areas, lines, and points but got sidelined by Manifold's export of closed lines - it seems they are written and/or interpreted as polygons, so I have to do some more to make this useable in sf.
library(USAboundaries)
library(sf)
## warns but still works # Warning message:# In CPL_write_ogr(obj, dsn, layer, driver, as.character(options), :# GDAL Message 6: dataset us_counties.mif does not support layer creation option FORMAT
st_write(st_as_sf(us_counties()), "us_counties.mif", "us_counties", driver="MapInfo File", options="FORMAT=MIF")
## read into Manifold and add lines and points## EDIT: no Manifold export writes MULTIPOLYGON here ## dissolve counties by state, add boundaries of the states## add inner centroids of the states## points only get state attributes copied## export to MIFcs<- st_read("Us_counties_states.mif", "Us_counties_states")
st_write(cs, "us_counties_states.gpkg", "us_counties_states", "GPKG")
cs<- st_read("Us_counties_states.gpkg", "Us_counties_states")
## plotting these the counties-polys and state-points get covered by the state-polys, which is## not what was intended
The text was updated successfully, but these errors were encountered:
FORMAT=MIF is a dataset creation option, but st_write now only knows about layer creation options, this was already on my TODO list. Otherwise, this issue is a way of saying "cool, I can create GPKG", right?
I was putting together a GPKG with areas, lines, and points but got sidelined by Manifold's export of closed lines - it seems they are written and/or interpreted as polygons, so I have to do some more to make this useable in sf.
Still, it's an example GPKG file.
us_counties_states.zip
The text was updated successfully, but these errors were encountered: