terrainr 0.7.5
CRAN release: 2023-10-04
More tests are flagged to skip on CRAN, or when run offline
georeference_overlayshould give fewer useless warnings
terrainr 0.7.4
CRAN release: 2023-02-16
- New query method is dramatically faster and less-error prone.
terrainr 0.7.3
CRAN release: 2023-02-01
- Updated contours URL to new location
- Removing dependencies on raster and rgdal
- Fixed infinite loop when following two-stage APIs
- Removed HRO, as the endpoint appears to have disappeared
terrainr 0.7.2
CRAN release: 2022-12-07
- New features:
- Two new endpoints are available:
HRO, which provides orthoimagery for non-CONUS US domains, andUSGSNAIPImagery, which only returns NAIP (whereasUSGSNAIPPlus, the default forortho, will useHROwhere appropriate).
- Two new endpoints are available:
- Improvements and bug fixes:
- Updated NAIP URL to its new home, which should reenable NAIP downloads.
- Fixed warning in
geom_spatial_rgb()about “dropped aesthetics”. - Fixed
govunitstest.
- Dependency changes:
-
ggplot2now requires a minimum of 3.4.0
-
terrainr 0.7.1
CRAN release: 2022-08-11
- Improvements and bug fixes:
- Redocumented package to stay on CRAN.
-
merge_rastersno longer warns that options aren’t respected when using the fallback method before immediately passing said options togdalwarp. - Starting to move error messages into
rlangwith string interpolation viaglue.
- Dependency changes:
-
rlangandgluehave been added to Imports -
rasternow requires a minimum version of 3.5-19.
-
terrainr 0.7.0
CRAN release: 2022-05-05
- New features:
-
make_unityis a new function which uses the newunifirpackage to automatically create Unity scenes, no clicking necessary. - Internally, all calls to functions from {raster} have been replaced with calls to {terra}. This future-proofs the package against any coming deprecations and takes advantage of newer, faster terra code. This is not intended to be a breaking change; any methods that previously took {raster} objects should still work (and silently convert to {terra} under the hood). If you have any workflows impacted by this change, please file a bug report!
-
- Improvements and bug fixes:
-
make_manifest,transform_elevation, andtransform_overlayno longer error when providing non-standard side lengths; they now warn as intended. -
make_manifest,transform_elevation, andtransform_overlayshould no longer give warnings about nodata values in most cases. being clamped to 0. - Fixed some documentation, unused objects, restyled and removed lints.
-
transform_overlay(and by extension, every Unity overlay importer) now tries to automatically guess the scale of the input raster. Values under 1 are scaled from 0-1, integers under 255 are scaled 0-255, and integers under 65535 are scaled 0-65536. The main effect of this is more realistic coloring when importing terrain. Floats above 1 won’t be affected.
-
- Dependency changes:
-
terrais now included as an Import (had been recursively imported throughrasterpreviously). -
rasterandrgdalare now in Suggests (used temporarily inRaster*methods forget_tilesandadd_bbox_buffer, until the new version ofrasterhits CRAN).
-
- Internal changes:
-
raster_to_raw_tilesis now a thin wrapper around the functionstransform_overlayandtransform_elevation. It is no longer tested; it will be removed entirely in the next release (see deprecation notice in terrainr 0.5.0).
-
terrainr 0.6.1
CRAN release: 2022-02-10
- Improvements and bug fixes:
- The README of version 0.6.0 has a disclaimer at the top stating that the package is an experimental build relying on as-of-yet unreleased packages. This is not true. This release removes that language. Otherwise, this release is identical to version 0.6.0.
terrainr 0.6.0
CRAN release: 2022-02-04
- New features:
- Two new functions,
transform_elevationandtransform_overlay, should now provide raster transformation functions that were possible withraster_to_raw_tilesbut not withmake_manifest. As an added bonus, the internal code to handle tiling is now dramatically simpler.
- Two new functions,
- Improvements and bug fixes:
-
make_manifestwill now overwrite any file atimporter_path, in line with documented behavior. Previous versions would never overwriteimporter_path. -
merge_rasters’ fallback method now runs much faster
-
- Dependency changes:
-
gdalUtilshas been removed from dependencies following CRAN directions -
rgdalis now an explicit dependency (had previously been imported viagdalUtils)
-
terrainr 0.5.1
CRAN release: 2022-01-04
- New features:
- A new endpoint,
ecosystems, has been added toget_tilesandhit_national_map_api.
- A new endpoint,
- Improvements and bug fixes:
-
merge_rastersgains an argument,overwrite, which allows you to specify whether or not to overwriteoutput_rasterif it exists. Previous versions expected you to pass “-overwrite” tooptions. If a file exists atoutput_rasterandoverwriteis FALSE,merge_rasterswill throw an error.
-
- Dependency changes:
-
sfnow has a minimum dependency of 1.0-5, to take advantage of an upstream bug fix (relating tomerge_rastersoverwrite)
-
terrainr 0.5.0.
CRAN release: 2021-08-05
- New features:
- A new function,
make_manifest, now helps automate the import of terrain and imagery to Unity. It fully replacesraster_to_raw_tiles(see Deprecations below). Documentation updates are forthcoming.
- A new function,
- Deprecations:
-
raster_to_raw_tilesis now deprecated and will be removed in a future release (no earlier than 2022). Usemake_manifestinstead. - The method
get_tiles.listis now deprecated and will be removed in a future release (unexported in Fall 2021, removed no earlier than 2022). Convert your list to ansfobject instead. - The
bboxargument tohit_national_map_apiis now documented as “An object from [sf::st_bbox].” This is a change from the earlier options of a length 2 list or terrainr_bounding_box object. Those methods are currently still supported, but undocumented; they will be removed in a future release (no earlier than 2022).
-
- Improvements and bug fixes:
-
get_tilesno longer mangles data with projected coordinates (via a fix to the internal functionsplit_bbox). If for some reason you want the old behavior back, set the new argumentprojectedtoFALSEwhile providing projected data. - The documentation for
add_bbox_bufferandset_bbox_side_lengthnow specifies that they should only be used with geographic coordinate systems. If you use these functions with projected data, they will warn; this may be upgraded to an error in future versions. - The README images are now of beautiful Hyampom, California, a somewhat more appealing vista than the original Mt Marcy scene.
- The “Import to Unity” vignette has been rewritten to use make_manifest, as has the overview vignette and other documentation.
- Typos in the message
merge_rastersgives when using the fallback method have been fixed. -
merge_rastersgains an argumentforce_fallbackwhich, if TRUE, will use the older, slower method for merging tiles. This is not recommended, but is useful for testing.
-
- Internal changes:
- The slow removal of all
terrainr_*custom classes marches on! These classes should no longer be present in any user-facing, non-deprecated code; the only functions still relying on custom classes are internal utilities and thesplit_bboxfunction responsible for tilingget_tilesrequests. -
split_bboxshould now run faster, particularly for large tile sets, as some nested loops have been vectorized. - Improvements to test coverage and CI.
- The slow removal of all
terrainr 0.4.1
CRAN release: 2021-05-30
- Improvements and bug fixes:
-
get_tilesnow displays a bulleted list of endpoints (again?), rather than a jumble of raw markdown -
add_bbox_bufferproperly sets the CRS of the output when attempting to buffer geodesic coordinates. - Typo fixes to an error message in
combine_overlays
-
- Internal changes:
- Added
importFromtag toterrainr-package.Rto silence R CMD CHECK NOTE.
- Added
terrainr 0.4.0
CRAN release: 2021-04-23
- Breaking changes:
- Three changes in how
vector_to_overlaydeals with missing CRS invector_data:- A new argument,
error_crs, behaves just likeerror_crsinadd_bbox: ifNULL, the function will give a warning when assuming CRS; ifFALSE, the function will assume a CRS silently, and ifTRUE, the function will error ifvector_datais missing a CRS. -
target_crshas been removed.vector_datawill be given the CRS ofreference_rasterif it doesn’t have its own CRS, and will always be projected to the CRS ofreference_raster. -
error_crshas been added to mirroradd_bbox_buffer: ifNULLand your input data has no CRS,vector_to_overlaywill warn about assuming the raster CRS. Set toTRUEto error orFALSEto ignore the warning.
- A new argument,
- NAIP imagery is now downloaded with
transparent = "false"to minimize the number of times the backup method tomerge_rasters(see below) is called. To restore the old behavior, settransparent = "true"in eitherget_tilesorhit_national_map_api. -
get_tileswill now inferbboxSRandimageSRfrom providedsforRasterobjects if not otherwise specified. To restore the old behavior, setbboxSRandimageSRto4326inget_tiles(or set your data’s CRS to 4326 before callingget_tiles).
- Three changes in how
- Improvements and bug fixes:
- Internal changes:
- Removed code to check for
ggplot2fromvector_to_overlaynow thatggplot2is required -
calc_haversine_distance(not exported) now assumes it’s been provided with degrees.coord_unitshas been removed as an argument. -
get_tiles.terrainr_bounding_boxhas been removed; it should no longer be possible for users to haveterrainr_bounding_boxobjects unless they were using non-exported functionality.
- Removed code to check for
terrainr 0.3.1
CRAN release: 2021-02-23
- First CRAN submission!
- This is the smallest of patch releases, with almost no user-facing changes.
- Internal changes:
- Added rOpenSci reviewers to DESCRIPTION.
- Changed USGS API link to new website.
- Added rOpenSci badge to README.
- Changed most PNG images to slightly smaller JPGs.
- Edited URLs for new rOpenSci website.
- Moved lifecycle badge href to new site.
- Some small spelling issues have been fixed.
- Added tags to non-exported point_to_distance and terrainr_bounding_box functions
- Added single quotes around Unity in the DESCRIPTION
terrainr 0.3.0
- Breaking changes:
-
terrainr_*classes have been effectively removed and are no longer exported. Functions which previously expected these objects now generally acceptsfandRasterclass objects instead. Functions which previously returned these objects now generally returnsfobjects instead (#24). - The list returned by
get_tilesnow uses the service names provided by the user, not the endpoint names. This means thatget_tiles(..., services = "elevation")will now use the nameelevationinstead of3DEPElevation, and remain standard across versions (#12). -
get_bboxandget_coordinate_bboxhave been removed. Functions that used to expectterrainr_bounding_boxobjects now accept objects of classsforraster(#24). -
add_bbox_bufferloses thedivisibleargument. For precise control over side length, useset_bbox_side_length(which should be more accurate, if slightly more conservative, than thedivisiblesystem ever was) (#17). -
convert_distancehas been removed (internally replaced by theunitspackage) (#7). -
merge_rastersloses theinput_imagesandoutput_imagefunction, as most downloaded files are now already georeferenced. To recreate this functionality, georeference image tiles directly viaoutput <- georeference_overlay(img_tiles, ref_tiles, tempfile(fileext = ".tif"))and then provideoutputtomerge_rasters. - A handful of utility functions are no longer exported:
calc_haversine_distancepoint_from_distancerad_to_degdeg_to_rad
-
- New features:
- Two new functions,
geom_spatial_rgbandstat_spatial_rgb, allow you to use RGB map tiles as backgrounds for further plotting. -
calc_haversine_distancegains an argumentcoord_unitsallowing it to handle coordinates in radians as well as degrees.
- Two new functions,
- Improvements and bug fixes:
-
georeference_overlayprovidestempfile(fileext = ".tif")as a default output location if nooutput_fileis provided. -
get_tilesnow tells you what tiles it’s retrieving, not retriving.
-
- Internal changes:
-
calc_haversine_distancehas been internally simplified somewhat to reduce code duplication. - All
servicesarguments tohit_national_map_apiandget_tilescan now handle both base64 and binary returns, removing the need to manually categorize endpoints (54ad9fb).-
hit_national_map_apiauto-detects whether API endpoints are returning base64 or binary and handles them appropriately -
get_tilesnow auto-detects whetherhit_national_map_apiis returning base64 or binary and writes to file appropriately.
-
-
hit_national_map_apiis now more likely to fail with a human-friendly error message if API endpoints return a non-200 status (54ad9fb). -
hit_national_map_api(and by extensionget_tiles) now register a user agent.
-
- Changes in dependencies:
-
gdalUtilitieshas been removed, with functionality replaced bysf. -
rlanghas been removed, with functionality removed. -
unitshas been added. -
ggplot2has been moved to Imports (was previously in Suggests) due to the newgeom_spatial_rgbandstat_spatial_rgbfunctions.
-
terrainr 0.2.1
- Improvements and bug fixes:
- The
transportationendpoint has moved servers, and is now handled by the same function that handles DEMs and orthoimages
- The
- Internal changes:
- The main branch of
terrainris nowmain - Tests run on a schedule on Monday/Wednesday/Friday mornings, to alert to endpoint changes
- Restyled code
- The main branch of
terrainr 0.2.0
- Breaking changes:
-
merge_rastersloses the argumentmerge_raster. For the “georeference a single image” use case, see the newgeoreference_overlayfunction. -
get_tilesgains an argumentresolution(details below) betweenside_lengthandservices. No functionality should be changed, but code with unnamed arguments toservices,verbose, orgeoreferencemay be impacted.
-
- New features:
- A new family of functions for dealing with overlay creation:
-
vector_to_overlaylets users quickly produce image overlays from vector data. -
georeference_overlayreplaces the use of merge_raster for creating single-file georeferenced overlay files. -
combine_overlayslets users, well, combine overlays into a single image
-
-
get_tilesgains an argument,resolution, specifying the number of meters each pixel should represent (so higher images result in smaller downloads). -
get_bboxprovides an S3 generic to createterrainr_bounding_boxobjects. In this version, that means users can useget_bboxto get bounding boxes fromsfandRasterLayerobjects, and it means adding methods will be easier going forward. The genericget_bboxmethod is equivalent toget_coord_bbox -
raster_to_raw_tileshandles rectangles appropriately
- A new family of functions for dealing with overlay creation:
- Improvements and bug fixes:
-
get_tiles,raster_to_raw_tiles, andmerge_rastersare now much more conscientious about deleting tempfiles when they’re done with them. -
merge_rastersno longer fails when handed a mix of 3- and 4-band raster files. The current implementation will cast all 4 band rasters to 3 band images and then return a 3 band raster image. - The
output_imageargument tomerge_rastersnow has a default value oftempfile(fileext = ".tif")to be a little more friendly to users. - Arguments
latandlngtoget_bbox(andget_coord_bbox) no longer need to be quoted – either the tidyverse-feeling NSE approach or the more standard quoted argument approach will work.
-
- Internal changes:
- All terrainr-provided functions now explicitly use the terrainr:: namespace.
- Changes in dependencies:
-
sfhas been added as an explicit import due tovector_to_overlay.sfis required bygdalUtilities, also imported by this package, so this change should have no impact on users. -
rlangis added as a dependency to allowlatandlngbe unquoted inget_bbox. -
ggplot2has been added toSuggestsdue tovector_to_overlay. -
jpegandtiffhave been added toSuggestsdue togeoreference_overlay. I’d expect more image libraries to join this list over time.
-
terrainr 0.1.0
- New features:
- set_bbox_side_length wraps add_bbox_buffer to set each side of the bounding box to an equal length (within ~1% accuracy)
- First version released on GitHub
terrainr 0.0.0.9001
- First development version
- Supports retrieval from 3DEP and NAIP data sources
- Supports export to Unity-friendly format
- Functions in this version:
- Utility functions:
- add_bbox_buffer
- calc_haversine_distance
- convert_distance
- deg_to_rad
- get_bbox_centroid
- get_coord_bbox
- point_from_distance
- rad_to_deg
- Data retrieval functions:
- get_tiles
- hit_national_map_api
- Data processing functions:
- merge_rasters
- raster_to_raw_tiles
- Classes and class utility functions:
- terrainr_bounding_box (class)
- terrainr_coordinate_pair (class)
- terrainr_bounding_box (creation utility)
- terrainr_coordinate_pair (creation utility)
- export_bounding_box
- export_coord_pair
- Utility functions:
