Skip to content

Releases: luukvdmeer/sfnetworks

Version 0.6.4

10 Apr 14:27
2eb08cf
Compare
Choose a tag to compare

New features

  • The sfnetwork() construction function now has an argument message which can be set to FALSE when the network validity checks should not print informational messages to the console. Refs #261.

Maintenance

  • Code and documentation was updated where needed to align with changes in base R and/or package dependencies. No changes to program logic or behavior.

Version 0.6.3

27 Mar 11:13
23a4125
Compare
Choose a tag to compare

Bug fixes

  • Argument names of sfnetwork S3 methods for sf::st_geometry(), sf::st_bbox(), sf::st_m_range() and sf::st_set_precision() are updated to be consistent with their corresponding generic functions in sf.
  • Arguments active and ... are removed from the sfnetwork S3 method for sf::st_precision() to be consistent with its corresponding generic function in sf.

Refactoring

  • Argument active is removed from the sfnetwork S3 method for sf::st_crs() to be consistent with the above-mentioned change regarding sf::st_precision() (since both CRS and precision can not differ between nodes and edges).

Version 0.6.2

26 Feb 19:05
Compare
Choose a tag to compare

Bug fixes

  • The to_spatial_contracted() morpher now correctly handles cases for undirected networks in which only loop edges are created after contraction. Refs #237.

Refactoring

  • The to_spatial_contracted() morpher now directly returns the original network when none of the contraction groups contain more than one node.

Other

  • Umbrella packages tidyverse and spatstat are no longer suggested packages. Only individual members of these packages are now suggested packages.
  • Updated unit tests.

Version 0.6.1

08 Nov 18:58
Compare
Choose a tag to compare

Bug fixes

  • Unit tests in test_join.R now successfully run also on R-devel.

Refactoring

  • Updated plot algorithm to be faster and more efficient. Refs #226.

Version 0.6.0 "Coerde"

20 Aug 07:58
9ac2842
Compare
Choose a tag to compare

New features

  • Updates to to_spatial_smooth() morpher:
    • Argument summarise_attributes added to summarise attribute values of concatenated edges. Refs #120.
    • Argument require_equal added to specify if and which attributes should be checked for equality before removing a pseudo node. Refs #124.
    • Argument protect added to specify nodes that should never be removed, even if they are a pseudo node. Refs #177.
    • Concatenated edges after smoothing are now allowed to cross themselves. Refs #117.
  • Updates to st_network_cost():
    • Duplicated nodes are now accepted in the to argument. Refs #183.
    • Cost matrix output now contains units. Refs #119.
    • Argument direction added to specify if outbound, inbound or all edges should be considered. This replaces the argument mode from igraph::distances(). The default is "out", while before it was "all". For undirected networks this argument is ignored.
  • Edge measure function gained an argument degrees which can be set to TRUE to return angles in degrees instead of radians.
  • By default st_network_paths() now encodes nodes by their name, whenever a name attribute is present in the nodes table. This can be disabled by setting use_names = FALSE. Refs #154.
  • Functions sf::st_precision() and sf::st_set_precision() now have a method for sfnetwork objects, such that coordinate precision can be queried and set. Refs #209.
  • Functions sf::st_intersection() and sf::st_difference() now have a method for sfnetwork objects, such that networks can be spatially clipped. The method for sf::st_crop() now uses the same workflow. These functions do not work yet on edges of undirected networks. Refs #133.
  • Function sf::st_drop_geometry() is now a generic and therefore got an sfnetwork method.
  • Several other sf functions got an sfnetwork method, merely to be consistent in the type of functions we provide a method for. Only those functions that mutate the geometry column of an sf object in such a way that would break the valid spatial network structure are not supported.
  • Methods for sf::st_coordinates(), sf::st_bbox() and sf::st_crs() gained an active argument such that this information can be extracted from any network element without first activating it. Refs #215.

Bug fixes

  • Rd files do not contain code anymore that is incompatible with HTML5. Refs #221.
  • Print methods now return x invisibly. Refs #217.

Refactoring

  • Error messages when edge measure or query functions are applied to a network with active nodes, or when node measure or query functions are applied to a network with active edges, are now more informative. Refs #216.
  • Calculating straight-line distances of edges is now more performant. Refs #180.
  • Edge measure function edge_circuity() does not return units objects anymore, since circuity is unitless.

Community

  • Vignettes updated to showcase new features.
  • Code of conduct updated according to newer template.
  • Contributing guidelines extended with templates for commit messages.
  • Master branch renamed to main, and protected from directed pushes.

Version 0.5.5

21 Feb 12:24
Compare
Choose a tag to compare
  • Adjusted the code used to check the version of PROJ on attach. In particular, the new approach tests only sf::sf_extSoftVersion()["proj.4"] since sf::sf_extSoftVersion()["PROJ"] might not be defined for sf < 1.0. Refs #198 and #200.
  • Adjusted one of the vignettes following the changes in dplyr 1.0.8. Ref #202. Thanks @romainfrancois.
  • Removed conflicting URL from package documentation spatial_edge_measures

Version 0.5.4

15 Dec 18:51
Compare
Choose a tag to compare

Changelog

  • A startup message is included to urge users of PROJ <= 6 to recreate the CRS for the Roxel dataset. Refs #190 and fixed with #193
  • Example using GraphML in vignette 1 has been removed provisionally to address #194

Version 0.5.3

07 Oct 13:50
782081f
Compare
Choose a tag to compare

Changelog

  • Addition of the n_active and n_inactive arguments to the print method of an sfnetwork object. The arguments define how many rows are printed for respectively the active and inactive network element. The values of these arguments can also be set globally by running e.g. options(sfn_max_print_active = 1, sfn_max_print_inactive = 2). Refs #157
  • The example dataset Roxel is updated to comply with recent updates on the way a CRS is specified in an sf object. Refs #167
  • GitHub Actions workflows are updated to comply with new developments.
  • Documentation updates:
    • Vignette file names are updated such that the appear in correct order on CRAN. Refs #162
    • Example section of the plot method for sfnetwork objects now includes an example of how to add graticules and axes. Refs #159

Version 0.5.2

20 May 16:39
Compare
Choose a tag to compare

Changelog

  • Compatibility with s2 by adding a s2::as_s2_geography() method for sfnetwork objects. In the new version of sf, the s2 package will be used for geometric operations involving longitude-latitude coordinates, see here.
  • Bug fixes:
    • When setting length_as_weight = TRUE in the sfnetwork construction function, the added weight column now preserves specification of units.
    • st_network_blend() now internally uses sf::st_cast() instead of sfheaders::sfc_cast() to avoid errors with some CRS specifications.
  • Documentation updates:
    • Extended documentation for the shortest paths functions.
    • Clear mention in vignettes that tidygraph behavior regarding the weight attribute settings is sometimes differing from igraph.

Version 0.5.1

01 Apr 08:23
Compare
Choose a tag to compare

Changelog

  • Compatibility with spatstat v2, which is now splitted into multiple sub-packages. See here for details. In sfnetworks, this affected the functions as_sfnetwork.linnet(), as_sfnetwork.psp() and as.linnet.sfnetwork(). Using this functions now requires spatstat >= 2.0.0 and sf >= 0.9.8.
  • Bug fixes:
    • Usage of match for checking coordinate equality is replaced by a new st_match function specifically designed for this task. This fixes bugs related to numeric approximations of detailed coordinates. See #130
  • Documentation updates:
    • It is now clearly documented that using sf::st_reverse() to reverse edge linestrings is only possible with GEOS versions >= 3.7.