Skip to content

Commit 7fe9b72

Browse files
Merge pull request #221 from chenyangkang/hdf5_serialization
Add functions to read and write routes and intervals using HDF5 files.
2 parents 4a9ee02 + aa7d82d commit 7fe9b72

File tree

6 files changed

+629
-5
lines changed

6 files changed

+629
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: BirdFlowR
22
Title: Predict and Visualize Bird Movement
3-
Version: 0.1.0.9075
3+
Version: 0.1.0.9076
44
Authors@R:
55
c(person("Ethan", "Plunkett", email = "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-4405-2251")),

NAMESPACE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ S3method(print,Routes)
1414
S3method(st_as_sf,BirdFlowRoutes)
1515
S3method(st_bbox,BirdFlow)
1616
S3method(st_crs,BirdFlow)
17+
S3method(write_routes,BirdFlowRoutes)
18+
S3method(write_routes,Routes)
19+
S3method(write_routes,default)
1720
export(BirdFlowIntervals)
1821
export(Routes)
1922
export(add_dynamic_mask)
@@ -93,6 +96,8 @@ export(plot_routes)
9396
export(preprocess_species)
9497
export(rasterize_distr)
9598
export(rc_to_i)
99+
export(read_intervals)
100+
export(read_routes)
96101
export(route)
97102
export(route_migration)
98103
export(row_to_y)
@@ -108,6 +113,8 @@ export(validate_BirdFlow)
108113
export(validate_BirdFlowIntervals)
109114
export(validate_BirdFlowRoutes)
110115
export(validate_Routes)
116+
export(write_intervals)
117+
export(write_routes)
111118
export(x_to_col)
112119
export(xy_to_i)
113120
export(xy_to_latlon)
@@ -133,15 +140,26 @@ importFrom(grDevices,grey)
133140
importFrom(grDevices,rgb)
134141
importFrom(methods,as)
135142
importFrom(methods,is)
143+
importFrom(rhdf5,H5Fclose)
144+
importFrom(rhdf5,H5Fis_hdf5)
145+
importFrom(rhdf5,H5Fopen)
146+
importFrom(rhdf5,H5Lexists)
147+
importFrom(rhdf5,h5closeAll)
148+
importFrom(rhdf5,h5createFile)
149+
importFrom(rhdf5,h5createGroup)
136150
importFrom(rhdf5,h5ls)
137151
importFrom(rhdf5,h5read)
152+
importFrom(rhdf5,h5readAttributes)
153+
importFrom(rhdf5,h5write)
154+
importFrom(rhdf5,h5writeAttribute)
138155
importFrom(rlang,.data)
139156
importFrom(sf,st_as_sf)
140157
importFrom(sf,st_bbox)
141158
importFrom(sf,st_crs)
142159
importFrom(stats,cor)
143160
importFrom(stats,median)
144161
importFrom(stats,predict)
162+
importFrom(stats,setNames)
145163
importFrom(terra,crs)
146164
importFrom(terra,ext)
147165
importFrom(terra,res)

NEWS.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
# BirdFlowR 0.1.0.9076
2+
2025-05-25
3+
4+
* Add read and write functions of the `Routes`, `BirdFlowRoutes`,
5+
`BirdFlowIntervals` in a hdf5 serialization format:
6+
* `read_Routes`, `write_Routes`
7+
* `read_BirdFlowRoutes`, `write_BirdFlowRoutes`
8+
* `read_BirdFlowIntervals`, `write_BirdFlowIntervals`
9+
110
# BirdFlowR 0.1.0.9075
211
2025-05-21
312

4-
* Finalize the interval based validation metrics in `calc_interval_metrics()`
5-
* Fixed some small documentation bugs where the arguments are not used but
6-
described.
13+
* Finalize the interval based validation metrics in function
14+
`calculate_interval_metrics` of file `interval_based_validation.R`.
15+
* Fixed some small documentation bugs where the arguments are not
16+
used but described.
17+
718

819
# BirdFlowR 0.1.0.9074
920
2025-05-13
@@ -157,7 +168,6 @@ Thus the flow of data is
157168
* `snap_to_birdflow()` no longer coerces date-time input to dates before
158169
aggregating, and, if the input is date-time the output will be as well.
159170

160-
>>>>>>> main
161171

162172
# BirdFlowR 0.1.0.9069
163173
2024-10-17

0 commit comments

Comments
 (0)