Skip to content

Bearings and reprojections

Compare
Choose a tag to compare
@Robinlovelace Robinlovelace released this 30 Aug 11:52
· 1563 commits to master since this release

stplanr 0.1.4

NEW FEATURES

  • New function reproject() is a simple wrapper around spTransform() that uses
    crs_select_aeq() to convert a spatial object in geographic (lat/lon) coordinates
    into on with projected coordinates, with units of 1 m. This is useful for various
    spatial operations, such as finding the length and area of an object.
  • Implement gprojected(), a function for performing GIS operations on a temporary, projected, version
    of spatial objects.
  • Addition of line_bearing() to return the bearing of lines based on start and end points.
  • Addition of angle_diff() for finding the angular difference between lines: are they roughly parallel or perpendicular?

BUG FIXES

  • line2df() now works on lines with multiple vertices and is faster.
  • Fixes in the examples used to illustrate how od_dist() works.

stplanr 0.1.3

NEW FEATURES

  • Update to OSRM functions to support API v5.
  • New parameter byvars in the overline() function, to allow disaggregation of results by a grouping variable (see example(overline)).
  • Faster implementation of od2line(): od2line2(). Plan is to replace the original if no issues are found with new implementation.
  • New function od2odf() which converts OD data into a dataframe of origins and destinations (feeds od2line2() but also useful as self-standing function).
  • New argument new_proj in buff_geo() allows the results to be exported to any coordinate reference system (CRS).
  • New function gprojected() generalises concept of buff_geo(), building on crs_select_aeq() to allow any GIS query to be conducted on a temporary projected version of spatial objects with geographical CRSs.
  • New function od_dist() can quickly calculate Euclidean distances of OD pairs without converting to spatial objects.

BUG FIXES

  • Bug fix in onewayid() so it captures all lines.
  • Various improvements to documentation and code.