Skip to content

Commit

Permalink
Proof-read
Browse files Browse the repository at this point in the history
  • Loading branch information
loreabad6 committed Jan 31, 2021
1 parent 9d87a86 commit eba28b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/morphers.R
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ to_spatial_smooth = function(x, store_original_data = FALSE) {
# --> There are two pseudo nodes that form the boundary of the set.
# --> These are the ones connected to only one other pseudo node.
N_b = N[degree(G) == 1]
# If these boundaries do not exists:
# If these boundaries do not exist:
# --> We are dealing with a loop of connected pseudo nodes.
# --> The loop is by definition not connected to the rest of the network.
# --> Hence, there is no need to create a new edge.
Expand Down
4 changes: 2 additions & 2 deletions man/st_network_cost.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/join_filter.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ plot(st_geometry(joined, "edges"))
plot(st_as_sf(joined, "nodes"), pch = 20, add = TRUE)
```

In the example above, the polygons are spatially distinct. Hence, each node can only intersect with a single polygon. But what would happen if we do a join with polygons that overlap? The attributes from which polygon will then be attached to a node that intersects with multiple polygons at once? In `sf` this issue is solved by duplicating such a point as much times as the number of polygons it intersects with, and attaching attributes of each intersecting polygon to one of these duplicates. This approach does not fit the network case, however. An edge can only have a single node at each of its endpoints, and thus, the duplicated nodes will be isolated an be redundant in the network structure. Therefore, `sfnetworks` will only join the information from the first match whenever there are multiple matches for a single node. A warning is given in that case such that you are aware of the fact that not all information was joined into the network.
In the example above, the polygons are spatially distinct. Hence, each node can only intersect with a single polygon. But what would happen if we do a join with polygons that overlap? The attributes from which polygon will then be attached to a node that intersects with multiple polygons at once? In `sf` this issue is solved by duplicating such a point as much times as the number of polygons it intersects with, and attaching attributes of each intersecting polygon to one of these duplicates. This approach does not fit the network case, however. An edge can only have a single node at each of its endpoints, and thus, the duplicated nodes will be isolated and will be redundant in the network structure. Therefore, `sfnetworks` will only join the information from the first match whenever there are multiple matches for a single node. A warning is given in that case such that you are aware of the fact that not all information was joined into the network.

Note that in the case of joining on the edges, multiple matches per edge are not a problem for the network structure. It will simply duplicate the edge (i.e. creating a set of parallel edges) whenever this occurs.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/preprocess_and_clean.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ clustered %>%
# For the others, which were used as grouping variables:
# --> Drop these attributes.
combinations = list(
is_priority = any,
is_priority = function(x) any(x),
"ignore"
)
Expand Down

0 comments on commit eba28b7

Please sign in to comment.