Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new get_elev_profile() function + minor clean-up/refactor #99

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
da62f5a
Update loc_check to support custom coords + elev_col
elipousson Aug 20, 2024
7b93d43
Update loc_check test to match modified messages
elipousson Aug 20, 2024
32a351b
Add support for custom coords + elev_col
elipousson Aug 20, 2024
259cfec
Update docs
elipousson Aug 20, 2024
978953d
Add loc_linestring_to_point helper
elipousson Aug 20, 2024
513ab7c
Add relocate_sf_col_end helper
elipousson Aug 20, 2024
d9f65f4
Add st_point_distances helper
elipousson Aug 20, 2024
05acff4
Refactor proj_expand
elipousson Aug 20, 2024
285732e
Add get_elev_profile function
elipousson Aug 20, 2024
c7a9a66
Update docs for helper functions
elipousson Aug 20, 2024
09f76a0
Fix typo in proj_expand
elipousson Aug 20, 2024
f160a29
Fix test for loc_check
elipousson Aug 20, 2024
b89a257
Fix example for get_elev_profile
elipousson Aug 20, 2024
ac1b78c
Fill missing arguments for get_elev_raster
elipousson Aug 20, 2024
41867be
Fill missing dist_col definition
elipousson Aug 20, 2024
5418936
Fix example for get_elev_profile
elipousson Aug 20, 2024
e2da1f1
Fix #91
elipousson Aug 20, 2024
ae9a29b
Expand get_elev_profile docs
elipousson Aug 20, 2024
bee6ae0
Add Eli Pousson to contributors
elipousson Aug 20, 2024
4e47e92
Update NEWS
elipousson Aug 20, 2024
a7fb811
Fix merge conflicts w/ migrated repo
elipousson Sep 18, 2024
844467f
Update check-standard.yml to fix merge conflict
elipousson Sep 18, 2024
834e2bc
Fill in missing argument definitions
elipousson Sep 18, 2024
b95beda
Merge branch 'main' into get-elev-profile_feature
elipousson Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,32 @@ jobs:
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: "Install spatial libraries on linux"
if: runner.os == 'Linux'
run: sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev

- name: "Install spatial libraries on macOS"
if: runner.os == 'macOS'
run: |
# conflicts with gfortran from r-lib/actions when linking gcc
# rm '/usr/local/bin/gfortran'
brew install pkg-config gdal proj geos sqlite3

- name: Install dependencies on windows and mac
if: runner.os != 'Linux'
run: |
remotes::install_deps(dependencies = TRUE, type = "binary")
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Install dependencies linux
if: runner.os == 'Linux'
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Set API key
env:
OPENTOPO_KEY: ${{ secrets.OPENTOPO }}
Expand All @@ -102,4 +102,4 @@ jobs:
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
path: check
81 changes: 46 additions & 35 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,50 +1,61 @@
Package: elevatr
Title: Access Elevation Data from Various APIs
Version: 1.0.0.9999
Authors@R: c(person("Jeffrey", "Hollister", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9254-9740")),
person("Tarak", "Shah", role = "ctb"),
person("Jakub", "Nowosad", role = "ctb", comment = c(ORCID = "0000-0002-1057-3721")),
person("Alec L.", "Robitaille", role = "ctb", comment = c(ORCID = "0000-0002-4706-1762")),
person("Marcus W.", "Beck", role = "rev", comment = c(ORCID = "0000-0002-4996-0059")),
person("Mike", "Johnson", role = "ctb", comment = c(ORCID = "0000-0002-5288-8350")))
Authors@R: c(
person("Jeffrey", "Hollister", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-9254-9740")),
person("Tarak", "Shah", role = "ctb"),
person("Jakub", "Nowosad", role = "ctb",
comment = c(ORCID = "0000-0002-1057-3721")),
person("Alec L.", "Robitaille", role = "ctb",
comment = c(ORCID = "0000-0002-4706-1762")),
person("Marcus W.", "Beck", role = "rev",
comment = c(ORCID = "0000-0002-4996-0059")),
person("Mike", "Johnson", role = "ctb",
comment = c(ORCID = "0000-0002-5288-8350")),
person("Eli", "Pousson", role = "ctb",
comment = c(ORCID = "0000-0001-8280-1706"))
)
Maintainer: Jeffrey Hollister <[email protected]>
Description: Several web services are available that provide access to
elevation data. This package provides access to many of those services
and returns elevation data either as an 'sf' simple features object
from point elevation services or as a 'raster' object from raster
elevation services. In future versions, 'elevatr' will drop support
for 'raster' and will instead return 'terra' objects. Currently, the
package supports access to the Amazon Web Services Terrain Tiles
<https://registry.opendata.aws/terrain-tiles/>, the Open Topography
Global Datasets API <https://opentopography.org/developers/>, and the
USGS Elevation Point Query Service
<https://apps.nationalmap.gov/epqs/>.
License: MIT + file LICENSE
URL: https://github.com/usepa/elevatr/
BugReports: https://github.com/usepa/elevatr/issues/
Maintainer: Jeffrey Hollister <[email protected]>
Description: Several web services are available that provide access to elevation
data. This package provides access to many of those services and
returns elevation data either as an 'sf' simple features object
from point elevation services or as a 'raster' object from raster
elevation services. In future versions, 'elevatr' will drop
support for 'raster' and will instead return 'terra' objects.
Currently, the package supports access to the Amazon Web Services
Terrain Tiles <https://registry.opendata.aws/terrain-tiles/>,
the Open Topography Global Datasets
API <https://opentopography.org/developers/>, and the USGS
Elevation Point Query Service <https://apps.nationalmap.gov/epqs/>.
Depends: R (>= 3.5.0)
Depends:
R (>= 3.5.0)
Imports:
curl,
furrr,
future,
httr,
jsonlite,
methods,
progressr,
sf,
terra,
future,
furrr,
purrr,
units,
slippymath,
curl,
raster,
methods
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
sf,
slippymath,
terra,
units
Suggests:
testthat,
formatR,
knitr,
progress,
rmarkdown,
formatR,
progress
VignetteBuilder: knitr
testthat
VignetteBuilder:
knitr
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(get_aws_points)
export(get_aws_terrain)
export(get_elev_point)
export(get_elev_profile)
export(get_elev_raster)
export(get_epqs)
export(get_opentopo)
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ elevatr 1.0.0 (2024-0x-xx)
- add argument for specifying temp directory for download files. Allows users to specify a specific location. (Thanks, @andrew-caudillo: https://github.com/jhollist/elevatr/issues/95)
- exposed ncpu argument so user can control. Defaults to 2 if more than 2 cores available. Thanks to @courtiol for finding this issue and the suggestion!

# Added Functionality
- Add new `get_elev_profile()` function (#93, @elipousson)

# Fixes
- Fix issue with `SpatVector` input objects (#91, @elipousson)

elevatr 0.99.0 (2023-09-11)
=============

Expand Down Expand Up @@ -200,4 +206,4 @@ elevatr 0.1.0 (2017-01-25)
==========================

## Initial CRAN Release
- This is the initial CRAN release. Provides access to point elevation data from USGS and from Mapzen. Provides access to raster DEM from Mapzen Terrain Tiles and AWS Terrain Tiles.
- This is the initial CRAN release. Provides access to point elevation data from USGS and from Mapzen. Provides access to raster DEM from Mapzen Terrain Tiles and AWS Terrain Tiles.
Loading