Reproducible example showing this behaviour with high values on sideroads:
remotes::install_dev("stplanr")
#> Using github PAT from envvar GITHUB_PAT
#> Skipping install of 'stplanr' from a github remote, the SHA1 (6583e631) has not changed since last install.
#> Use `force = TRUE` to force installation
library(stplanr)
rnet_x = rnet_subset(osm_net_example[1], route_network_small)
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries
#> Warning in st_cast.sf(sf::st_cast(x, "MULTILINESTRING"), "LINESTRING"):
#> repeating attributes for all sub-geometries for which they may not be constant
# The source object:
rnet_y = route_network_small["flow"]
rnet_y$quietness = rnorm(nrow(rnet_y))
funs = list(flow = sum, quietness = mean)
rnet_merged = rnet_merge(rnet_x[1], rnet_y[c("flow", "quietness")],
dist = 9, segment_length = 20, funs = funs)
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries
#> Warning: repeating attributes for all sub-geometries for which they may not be
#> constant
#> Linking to GEOS 3.11.1, GDAL 3.6.4, PROJ 9.1.1; sf_use_s2() is TRUE
#> Warning: st_centroid assumes attributes are constant over geometries
#> Joining with `by = join_by(osm_id)`
plot(rnet_y["flow"])
Reproducible example showing this behaviour with high values on sideroads:
Created on 2023-08-24 with reprex v2.0.2
See https://github.com/nptscot/networkmerge/issues/54 for details