Closed jzwart closed 3 years ago
I think Jake's issue is related to this
@jzwart can you try installing from the sf_overhaul
branch and see if that works for you? install_github('read-usgs/meddle@sf_overhaul')
should work I think.
worked!
> scmake()
Starting build at 2020-11-18 09:07:02
< MAKE > all
[ OK ] sbid
[ OK ] sf_spatial_data
[ BUILD ] spatial_metadata | spatial_metadata <- extract_feature(sf_spatial_data)
[ READ ] | # loading packages
although coordinates are longitude/latitude, st_intersects assumes that they are planar
[ OK ] out_data/cars.csv
[ OK ] out_data/spatial.zip
[ OK ] sb_data
[ BUILD ] sb_xml | sb_xml <- sb_render_post_xml(sbid, "in_text/text_data_release.yml", spatial_metadata, xml_file = "out_xml/fgdc_metadata.xml")
[ ----- ] all
Finished build at 2020-11-18 09:07:11
Build completed in 0.15 minutes
> remake::fetch('spatial_metadata')
$wbbox
[1] -106
$ebbox
[1] -88.5
$nbbox
[1] 44
$sbbox
[1] 31.4
$`feature-ref`
[1] "Vector"
$`feature-type`
[1] "G-polygon"
$`feature-count`
[1] 2
$states
$states[[1]]
$states[[1]]$`state-name`
[1] "Illinois"
$states[[1]]$`state-abbr`
[1] "IL"
$states[[2]]
$states[[2]]$`state-name`
[1] "New Mexico"
$states[[2]]$`state-abbr`
[1] "NM"
$states[[3]]
$states[[3]]$`state-name`
[1] "Texas"
$states[[3]]$`state-abbr`
[1] "TX"
$states[[4]]
$states[[4]]$`state-name`
[1] "Wisconsin"
$states[[4]]$`state-abbr`
[1] "WI"
fyi your github is jread-usgs (you have just read-usgs above)
nice!
This issue came up when trying to build a simple data release pipeline - see here. @jread-usgs and I think it's due to the difference in our spatial packages used. Jordan is using
with
sf_0.9-6
and I'm usingalso with
sf_0.9-6
Jordan can extract spatial metadata withmeddle::extract_feature()
but I get the following error:Might be something with the way the updated packages deal with CRS. Jordan's st_crs of an example shapefile:
and for the same shapefile I get: