Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b9aec30
add functions to convert from shp to gpkg, and from landiq to a 'stan…
Jan 25, 2025
f8744a4
renamed convert_landiq to landiq2gpkg. Now only takes shp as input. a…
Jan 25, 2025
8b092e5
split sf object into gis and tabular info, save as GPKG + CSV
Jan 25, 2025
d58a20b
separate generic shp2gpkg from landiq2std functions
Jan 26, 2025
5411d2f
update messages to pecan logger functions
Jan 26, 2025
b979b0e
fix escape \ --> \\
dlebauer Jan 27, 2025
bd6fc12
put shp2gpkg as step within landiq2std fn, as previously intended but…
Jan 27, 2025
75fc5a7
fixed a few bugs, changed to using latxlon as ids
Jan 27, 2025
2eb59ca
fixed a few bugs in landiq2std fn; re-added id field
dlebauer Jan 28, 2025
60c69ab
debugging landiq2std function
dlebauer Jan 29, 2025
39bb191
fleshed out get.attributes function and added extract_values from ras…
dlebauer Jan 30, 2025
3d5c62e
Update modules/data.land/R/landiq2std.R
dlebauer Feb 4, 2025
3675a31
stop --> logger.error
dlebauer Feb 4, 2025
893f31a
Merge branch 'shp2gpkg' of github.com:dlebauer/pecan into shp2gpkg
dlebauer Feb 4, 2025
368b2a4
update link to dwr data source
dlebauer Feb 5, 2025
5b37a87
change id --> site_id for clarity
dlebauer Mar 18, 2025
bf47efa
Merge branch 'shp2gpkg' of github.com:dlebauer/pecan into shp2gpkg
dlebauer Mar 18, 2025
883a215
removed importsfrom, use tempfile instead of input_gpkg for intermedi…
dlebauer Mar 18, 2025
ce2eb5e
use st_coordinates once instead of twice
dlebauer Mar 18, 2025
044cdae
Merge branch 'develop' of github.com:pecanproject/pecan into shp2gpkg
dlebauer Mar 21, 2025
c6cc497
implementing changes suggested in PR review
dlebauer Mar 21, 2025
18af482
update documentation
dlebauer Mar 22, 2025
7df7918
Merge branch 'PecanProject:develop' into shp2gpkg
dlebauer Apr 10, 2025
2b213e4
replace landiq pft mapping with table
dlebauer May 2, 2025
536d67b
Merge branch 'shp2gpkg' of github.com:dlebauer/pecan into shp2gpkg
dlebauer May 2, 2025
14c5ebb
updated landiq2std to write out in CA Albers espg:3310; added overwri…
dlebauer May 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/data.land/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
contrib
data-raw
^data-raw$
21 changes: 20 additions & 1 deletion modules/data.land/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export(format_identifier)
export(from.Tag)
export(from.TreeCode)
export(gSSURGO.Query)
export(get.attributes)
export(get.soil)
export(get_resource_map)
export(get_veg_module)
export(ic_process)
export(id_resolveable)
export(landiq2std)
export(load_veg)
export(matchInventoryRings)
export(match_pft)
Expand All @@ -48,6 +48,7 @@ export(prepare_pools)
export(put_veg_module)
export(sample_ic)
export(sclass)
export(shp2gpkg)
export(shp2kml)
export(soil.units)
export(soil2netcdf)
Expand All @@ -60,7 +61,25 @@ export(to.TreeCode)
export(write_ic)
export(write_veg)
importFrom(dplyr,"%>%")
importFrom(dplyr,mutate)
importFrom(magrittr,"%>%")
importFrom(ncdf4,ncvar_get)
importFrom(rlang,"%||%")
importFrom(rlang,.data)
importFrom(sf,st_as_sf)
importFrom(sf,st_as_sfc)
importFrom(sf,st_bbox)
importFrom(sf,st_crop)
importFrom(sf,st_crs)
importFrom(sf,st_geometry_type)
importFrom(sf,st_is_valid)
importFrom(sf,st_make_valid)
importFrom(sf,st_read)
importFrom(sf,st_transform)
importFrom(sf,st_write)
importFrom(terra,crop)
importFrom(terra,crs)
importFrom(terra,ext)
importFrom(terra,extract)
importFrom(terra,rast)
importFrom(terra,vect)
13 changes: 13 additions & 0 deletions modules/data.land/R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,16 @@
#' contains an identical texture.csv, also with no obvious source label.
#' See also comments in soil_utils.R
"soil_class"

#' Crop-PFT mapping
#'
#' A lookup table to assign each LandIQ `crop` into one of three PFT
#' categories: "woody perennial crop", "non crop", or "herbaceous crop".
#'
#' @format A tibble with 2 columns:
#' \describe{
#' \item{crop}{character; the exact LandIQ crop name}
#' \item{pft}{character; one of "woody perennial crop", "herbaceous crop", "non-crop"}
#' }
#' @source data-raw/landiq_pft_map.R
"landiq_pft_map"
Loading