GDALVector
: add a BBOX
option for the per-object setting $returnGeomAs
(2024-10-03)
add minimal S3 classes OGRFeature
and OGRFeatureSet
with methods for print()
and plot()
(2024-09-28)
add g_summary()
: obtain text summaries of WKB/WKT geometries (GDAL >= 3.7) (2024-09-24)
update g_is_valid()
, g_is_empty()
, g_name()
and g_buffer()
to the new style geometry API: the OGR GEOS wrappers now operate on input of WKB raw vector, list of WKB, or character vector of WKT strings, with return as either WKB raw vector (or list of) / WKT character string (vector of) (2024-09-22)
add GDALVector::quiet
: exposed read/write field to optionally suppress warnings etc. (2024-09-20)
the layer
argument may be NULL
or empty string in certain ogr_manage
functions, defaulting to the first layer by index (mainly convenience for single-layer formats) (2024-09-19)
GDALVector
: add get/set metadata methods for layer-level metadata if the format supports it (2024-09-19)
transform_xy()
and inv_project()
: accept SRS arguments in any format supported by srs_to_wkt()
(previously required SRS arguments in WKT format) (2024-09-19)
vsi_read_dir()
: omit "."
and ".."
from the listing (behavior change); add argument all_files
, TRUE
to include hidden files; sort the listing alphabetically (2024-09-17)
GDALVector
: support writing OFTTime fields from string input "HH:MM:SS"
(2024-09-16)
GDALVector
: improve NULL
handling in feature write methods (NA
, NULL
and empty vector (e.g., raw(0)
) map to OGR NULL) (2024-09-15)
fix GDALVector::setSpatialFilter()
: SRS was not set on the geometry before using it as the layer spatial filter, which could cause segfault (2024-09-15)
add g_make_valid()
: attempt to make invalid geometries valid, operating on input of WKB raw vector, list of WKB, or character vector of WKT strings (2024-09-15)
remove the class field GDALVector::featureTemplate
as not needed / not useful, and its removal fixes Valgrind errors (#520) (2024-09-14)
add g_wk2wk()
: geometry WKB/WKT conversion (2024-09-13)
(internal) GDALVector::initDF_()
: create the data frame vectors with Rcpp::no_init()
(2024-09-12)
(internal) add src/transform.h, header for src/transform.cpp (2024-09-11)
remove is_ignored
from feature class definition, potentially breaking change but assumed to be unused in feature class / field creation (2024-09-11)
add return_obj
argument in ogr_ds_create()
and ogr_layer_create()
, TRUE
to return a writable GDALVector
object on the created layer (2024-09-11)
GDALVector
: add method $setSelectedFields()
, alternative to $setIgnoredFields()
(2024-09-10)
(internal) GDALVector
: use $setIgnoredFields()
when $returnGeomAs
is set to NONE
(2024-09-09)
GDALVector
: add a SUMMARY
option for the per-object setting $returnGeomAs
(2024-09-09)
GDALVector
: add $promoteToMulti
as a per-object setting (2024-09-09)
GDALVector
: add class methods for writing features in a layer: $createFeature()
, $setFeature()
, $upsertFeature()
(2024-09-08)
fix input validation in ogr_def_geom_field()
: if srs
is NULL
set to empty string, avoids exception in ogr_layer_create()
if no SRS is given when using a layer definition created with ogr_def_layer()
(2024-09-07)
add ogr_layer_rename()
: rename an existing layer in a vector dataset (GDAL >= 3.5) (2024-09-04)
(internal) add header src/gdal_vsi.h
and minor code cleanups in src/gdal_vsi.cpp
(2024-09-02)
(internal) use consistent naming convention for C++ class member variables (2024-08-31)
(internal) pass by const reference in some srs and geom functions (2024-08-31)
(internal) class GDALVector
: add get/set methods for the dataset and layer handles for internal use (2024-08-18)
(internal) try/catch if potentially large allocation of std::vector (2024-08-18)
add GDALRaster::getMaskBand()
: return the mask filename and band number associated with a given band of the dataset (2024-08-15)
add GDALRaster::getMaskFlags()
: return the status flags of the mask band associated with a given band of the dataset (2024-08-14)
createCopy()
: fix the check of CreateCopy() availability from the driver by testing for GDAL_DCAP_CREATECOPY or GDAL_DCAP_CREATE, previously only tested for GDAL_DCAP_CREATECOPY (2024-08-12)
add srs_get_name()
: return the spatial reference system name (2024-08-12)
add srs_find_epsg()
: try to identify a matching EPSG code for a given SRS definition (2024-08-11)
translate()
: source raster can be a GDALRaster
object (2024-08-11)
add autoCreateWarpedVRT()
: create a warped virtual dataset representing the input raster warped into the target coordinate system, wrapper of GDALAutoCreateWarpedVRT()
(2024-08-10)
GDALRaster::setDescription()
: support band = 0
to set the dataset-level description (2024-08-10)
warp()
: source and destination rasters may be objects of class GDALRaster
(#469) (2024-08-10)
add GDALRaster::addBand()
: add a band to a dataset if the underlying format supports this action, e.g., MEM
and VRT
(2024-08-09)
createCopy()
: add argument return_obj
, TRUE
to return an object of class GDALRaster
for the created dataset; an object of class GDALRaster
can be given for argument src_filename
to specify the source dataset (2024-08-07)
create()
: add argument return_obj
, TRUE
to return an object of class GDALRaster
for the created dataset (2024-08-07)
add GDALRaster::setMetadata()
: set dataset or band-level metadata from a character vector of NAME=VALUE pairs (instead of per metadata item with the existing $setMetadataItem()
) (2024-08-07)
add transactions support in class GDALVector
($startTransaction()
, $commitTransaction()
, $rollbackTransaction()
) (2024-08-03)
add GDALVector::deleteFeature()
: delete feature from layer (2024-08-03)
add featureTemplate
as a read-only field in class GDALVector
(2024-08-03)
add GDALVector::setNextByIndex()
: move the read cursor to the i
th feature in the current result set (2024-08-02)
add GDALVector::setIgnoredFields()
: set which fields can be omitted when retrieving features from the layer (2024-08-01)
add GDALVector class methods: getAttributeFilter()
, setSpatialFilter()
, getSpatialFilter()
(2024-07-30)
add ogr_proc()
: GDAL OGR facilities for vector geoprocessing (2024-07-28)
ogr_execute_sql()
: now returns an object of class GDALVector
for SQL SELECT statements (2024-07-24)
add class GDALVector
, initial implementation / WIP (2024-07-22)
add package wk
to Suggests (2024-07-22)
plot_raster()
: default to no stretch when the input is an RGB Byte raster, addresses #429 (2024-07-10)
add GDALRaster$clearColorTable()
: clear the color table associated with a raster band (2024-07-10)
fix the mode name for color-relief
in DEFAULT_DEM_PROC
("color-relief"
instead of "color_relief"
, fixes #428) (2024-07-09)
vsi_read_dir()
: add parameter recursive
, TRUE
to read the list of entries in the directory and subdirectories (2024-07-01)
avoid data copy in GDALRaster::getDefaultRAT()
for better performance in the case of large attribute tables (2024-06-24)
add vsi_get_actual_url()
: return the actual URL of a supplied VSI filename, wrapper of VSIGetActualURL()
in the GDAL API (2024-06-20)
add vsi_get_signed_url()
: return a signed URL for a supplied VSI filename, wrapper of VSIGetSignedURL()
in the GDAL API (2024-06-20)
Documentation: additions to the section on Azure (/vsiaz/) in GDAL Config Quick Reference; update Raster API Tutorial to use argument return_obj
with create()
and createCopy()
; document $fillRaster()
method in GDALRaster-class
; add the -srcband
and -dstband
command-line options in the documentation for warp()
; add Development practices in CONTRIBUTING.md; add the OpenSSF best practices badge in README; add fig.alt
text to articles for web accessibility; add the OpenSSF Scorecard badge in README; add example in ogr2ogr()
for dissolve features based on an attribute value; cleanup code that removes temp files in the examples is wrapped in \dontshow{}
fix test in test-ogr_manage.R: the test for GeoJSON layer did not need to check existence using with_update = TRUE
on a file in extdata (#410)
add apply_geotransform()
: convert raster column/row to geospatial x/y coordinates, wrapper of GDALApplyGeoTransform()
in the GDAL API, operating on a matrix of input col/row coordinates (the internal wrapper .apply_geotransform()
is unchanged)
add GDALRaster$apply_geotransform()
: class method alternative to calling the stand-alone function apply_geotransform()
on an object of class GDALRaster
vsi_curl_clear_cache()
: add parameter quiet
to wrap the API call in a quiet error handler, TRUE
by default
Documentation: document the w+
access flag for class VSIFile
; add CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE
configuration option in vignette GDAL Config Quick Reference; replace paste0()
with file.path()
in the examples throughout
code linting
bit64
has been added to ImportsRcppInt64
has been added in LinkingToogr_ds_exists()
, ogr_ds_format()
, ogr_ds_test_cap()
, ogr_ds_create()
, ogr_ds_layer_count()
, ogr_ds_layer_names()
, ogr_layer_exists()
, ogr_layer_test_cap()
, ogr_layer_create()
, ogr_layer_field_names()
, ogr_layer_delete()
, ogr_field_index()
, ogr_field_create()
, ogr_geom_field_create()
, ogr_field_rename()
, ogr_field_delete()
, ogr_execute_sql()
ogr_def_field()
, ogr_def_geom_field()
, ogr_def_layer()
VSIFile
wraps VSIVirtualHandle
for Standard C binary file I/O on regular file systems, URLs, cloud storage services, Zip/GZip/7z/RAR, and in-memory filesvsi_mkdir()
: the file mode was set incorrectly because mode
was not passed correctly as octal literal. mode
is now passed as a character string containing the file mode as octal.vsi_get_file_metadata()
: returns metadata for network filesystem objects (/vsicurl/, /vsis3/, /vsiaz/, etc.), and with GDAL >= 3.7, /vsizip/ SOZip metadatavsi_set_path_option()
: set a path specific option for a given path prefix, e.g., credential setting for a virtual file system (GDAL >= 3.6)vsi_clear_path_options()
: clear path specific configuration options previously set with vsi_set_path_option()
(GDAL >= 3.6)vsi_rmdir()
: add argument recursive
, TRUE
to delete the directory and its contentvsi_mkdir()
: add argument recursive
, TRUE
to create the directory and its ancestors0
or -1
invisibly indicating success/failure, consistent with GDAL return values. Those return values are now visible to be consistent with return values from VSIFile
class methods.vsi_stat()
with info = "size"
, and vsi_get_disk_free_space()
now return bit64::integer64
type$info()
and $infoAsJSON()
now use the default command-line arguments for the underlying gdalinfo
utility. Arguments are configurable in the new read/write $infoOptions
field, which is an empty vector by default (character(0)
).raw
type, and add the setting $readByteAsRaw
as a class field (#314, thanks to @mdsumner)$infoOptions
and $quiet
for applying per-object settingsTRUE
by default$getActualBlockSize()
: retrieve the actual block size for a given block offset$get_pixel_line()
: class method alternative to calling the stand-alone function get_pixel_line()
on an object of class GDALRaster
(#339)$getProjection()
: equivalent to $getProjectionRef()
(consistent with osgeo.gdal.Dataset.getProjection()
/ osgeo.gdal.Dataset.getProjectionRef()
in the GDAL Python API)$getDefaultRAT()
: add progress bar since retrieving large raster attribute tables could take >30 seccalc()
: add support for multiband output (#319)calc()
: add input validation for var.names
, must be in expr
get_pixel_line()
: an object of class GDALRaster
can now be passed for the gt
parameter, in which case the geotransform will be obtained from the object and bounds checking on the raster extent will be done (original behavior for gt
as numeric vector is unchanged) (#339)ogr2ogr()
: add parameter open_options
to support options on the source datasetread_ds()
: add parameter as_raw
to read a Byte raster as R raw
type (#314, thanks to @mdsumner)dump_open_datasets()
: dump a list of all open datasets (shared or not) to the consoleget_num_cpus()
: get the number of processors detected by GDALget_usable_physical_ram()
: get usable physical RAM reported by GDALhas_spatialite()
: returns TRUE
if GDAL was built with SpatiaLite supporthttp_enabled()
: returns TRUE
if GDAL was built with libcurl support.cpl_http_cleanup()
: wrapper of CPLHTTPCleanup()
for internal use (2024-05-29)g_is_empty()
, g_is_valid()
, g_name()
, g_intersects()
, g_equals()
, g_disjoint()
, g_touches()
, g_contains()
, g_within()
, g_crosses()
,g_overlaps()
, g_intersection()
, g_union()
, g_difference()
, g_sym_difference()
, g_distance()
, g_length()
, g_area()
, g_centroid()
bbox_transform()
: transform a bounding box to a different projectiong_transform()
: now uses OGR_GeomTransformer_Create()
and OGR_GeomTransformer_Transform()
in the GDAL API, enhanced version of OGR_G_Transform()
; add arguments wrap_date_line
and date_line_offset
Authors@R
GDALRaster
class methods $info()
, $infoAsJSON()
and $getDefaultRAT()
CPLHTTPCleanup()
upon R session exitGDALRaster
class method $setFilename()
: set the filename of an uninitialized GDALRaster
object, currently undocumented / for internal useGDALRaster
class method _getGDALDatasetH()
: get the GDAL dataset handle for internal usebuildRAT()
: if the input raster is an object of class GDALRaster
, use it by reference rather than instantiating another GDALRaster
object internallycalc()
: close input raster dataset before exit when a differing extent is detected"-json"
as a cl_arg
to ogrinfo()
vsi_get_fs_prefixes()
: get the list of prefixes for virtual file system handlers currently registeredvsi_get_fs_options()
: get the list of options associated with a virtual file system handler (for setting with set_config_option()
)vsi_supports_rnd_write()
and vsi_supports_seq_write()
: test whether the filesystem supports random write or sequential write, conditional on whether a local temp file is allowed before uploading to the target locationvsi_get_disk_free_space()
: return the free disk space available on the filesystemvsi_copy_file()
and vsi_sync()
(#233)ogrinfo()
: wrapper of the ogrinfo
command-line utility, retrieve information about a vector data source and potentially edit data with SQL statements (GDAL >= 3.7)ogr2ogr()
: wrapper of the ogr2ogr
command-line utility, convert vector data between different formatsg_transform()
: apply a coordinate transformation to a WKT geometrygeos_version()
: get version information for the GEOS library in use by GDALpush_error_handler()
: wrapper for CPLPushErrorHandler()
in the GDAL Common Portability Librarypop_error_handler()
: wrapper for CPLPopErrorHandler()
in the GDAL Common Portability Librarycalc()
: the argument usePixelLonLat
is deprecated as unnecessary, variables pixelLon
/ pixelLat
are now auto-detected if used in the calc expression; small performance improvement from computing pixelY
only when neededquiet
in several functions to configure progress reporting (#237)gdal_formats()
now returns a data frame with the supported raster and vector formats, and information about the capabilities of each format drivernew()
: assign default variable names in the constructor if names are not givensrc/geos_wkt.cpp
, src/transform.cpp
, src/wkt_conv.cpp
: deallocate some OGR geometry and OSR spatial ref objects to fix memory leaksGDALRaster::getMetadataDomainList()
: deallocate the returned string list to avoid memory leakGDALRaster::close()
: clear cache if needed, and check the return values of GDALClose()
and GDALFlushCache()
if GDAL >= 3.7configure.ac
: add back proj-include
and proj-lib
, the latter needed in some cases for source install on macOS; rework for the system requirement of GDAL built against GEOShas_geos()
checks and update the documentation, since GDAL with GEOS is now required.editorconfig
file and bulk reformat code stylelintr
and add .lintr
fileNULL
-> nullptr
in C++ codeOSR_DEFAULT_AXIS_MAPPING_STRATEGY=TRADITIONAL_GIS_ORDER
from _gdal_init()
(#209), since this could give a different SRS comparison result depending on GDAL version in cases where axis mapping matters and the default options in OSRIsSameEx()
are usedvsi_copy_file()
: wrapper for VSICopyFile()
vsi_curl_clear_cache()
: wrapper for VSICurlClearCache()
and VSICurlPartialClearCache()
vsi_mkdir()
: wrapper for VSIMkdir()
vsi_read_dir()
: wrapper for VSIReadDirEx()
vsi_rename()
: wrapper for VSIRename()
vsi_rmdir()
: wrapper for VSIRmdir()
vsi_stat()
: wrapper for VSIStatExL()
vsi_sync()
: wrapper for VSISync()
vsi_unlink()
: wrapper for VSIUnlink()
vsi_unlink_batch()
: wrapper for VSIUnlinkBatch()
GDALRaster$new()
: add a constructor for passing dataset open optionsfootprint()
: wrapper of the gdal_footprint
command-line utility, compute footprint of a raster (GDAL >= 3.8)read_ds()
: add as_list
argument for option to return multi-band output in list form; attach attribute gis
to the output, a list containing bbox, dimension and spatial reference (thanks to input from @mdsumner #185)plot_raster()
: accept pixel data in list form (band vectors as list elements), and make use of gis
attribute if present (thanks to input from @mdsumner #185)srs_is_same()
: add arguments for criterion
, ignore_axis_mapping
and ignore_coord_epoch
_check_gdal_filename()
: minimal filename check and UTF-8_get_physical_RAM()
: wrapper for CPLGetUsablePhysicalRAM()
for internal useSystemRequirements
since it is required by the imported package xml2read_only=TRUE
is now an optional default in the class constructorclearStatistics()
: clear statistics on PAM supported datasets (GDAL >= 3.2)addFilesInZip()
: create/append to Seek-Optimized ZIP files (GDAL >= 3.7)plot_raster()
: now uses georeferenced coordinates by default instead of pixel/line (#184 thanks to @mdsumner)calc()
using Landsat bands should have applied scale/offset as given in the .json metadata - this has been correctedAWS_REGION
, and a section for SOZip to GDAL Config Quick Refread_only=TRUE
in the constructor for GDALRaster
translate()
and warp()
in Raster API Tutorialautoconf
macros for compiler invocations; get the PROJ data directory from pkg-config
if possible; add action-if-cross-compiling
argument (#190 and #197; thanks to Simon Urbanek for debugging an initial issue and providing helpful feedback)pkg-config
on Windows when possible (#125 thanks to @kalibera)translate()
and warp()
: close the output dataset before closing source dataset(s) in case the output is VRTpolygonize()
: create a polygon feature layer from raster data, wrapper for GDALPolygonize
in the GDAL Algorithms API.rasterize()
: burn vector geometries (points, lines, or polygons) into a raster, wrapper for the gdal_rasterize
command-line utilitybuildVRT()
: build a GDAL virtual raster mosaic from a list of datasets, wrapper for the gdalbuildvrt
command-line utilitytranslate()
: convert raster data between different formats, wrapper for the gdal_translate
command-line utilityt_srs
optional in warp()
TRADITIONAL_GIS_ORDER=OSR_DEFAULT_AXIS_MAPPING_STRATEGY
is now set on package loadwarp()
has additional documentation covering several processing optionsCOMPRESS_OVERVIEW
configuration option to the documentation for GDALRaster::buildOverviews()
str()
of the GDALRaster
object in the Raster API TutorialdisplayRAT()
)getDefaultRAT()
, setDefaultRAT()
getDefaultHistogram()
: fetch default raster histogram for a bandgetHistogram()
: compute raster histogram for a bandgetMinMax()
: compute min/max for a raster bandgetMetadataDomainList()
: get a list of metadata domains for a dataset or raster bandgetMetadataItem()
for a specific domain at dataset level (#109)buildRAT()
: compute for a raster band the set of unique pixel values and their counts, and build a GDAL Raster Attribute Table as data framedisplayRAT()
: generate a presentation Raster Attribute Table, showing colors if the table contains RGB columnsgdal_formats()
: report the supported raster formatsgetCreationOptions()
: get the list of creation options of a raster formatcopyDatasetFiles()
: copy all the files associated with a datasetdeleteDataset()
: delete a dataset in a format-specific wayrenameDataset()
: rename a dataset in a format-specific wayincr
for the count increment in CmbTable::update()
can be zerouint64_t
for the count accumulator (previously long long
) and make explicit the return cast in get_count()
(no user-visible changes)plot_raster()
: normalize legend correctly for minmax_def
and minmax_pct_cut
(#131)RunningStats-class
gdal_formats()
and getCreationOptions()
getColorTable()
, getPaletteInterp()
, setColorTable()
getRasterColorInterp()
, setRasterColorInterp()
: get/set color interpretation for raster bandsgetDescription()
, setDescription()
: get/set description for raster band objectsflushCache()
: flush all write cached data to diskgetFileList()
: returns a list of files forming the datasetinfoAsJSON()
: returns output of the gdalinfo
command-line utility as a JSON-formatted stringnew()
: add a warning in the class constructor if the raster has an int64 data type (would be handled as double for now)bandCopyWholeRaster()
: wrapper for GDALRasterBandCopyWholeRaster()
, efficiently copy a whole raster bandcreateColorRamp()
: wrapper for GDALCreateColorRamp()
, automatically create a ramp from one color to anothersieveFilter()
: wrapper for GDALSieveFilter()
in the Algorithms API, remove small raster polygonsproj_version()
, proj_search_paths()
, proj_networking()
(via GDAL headers)g_buffer()
: compute buffer of a WKT geometry (GEOS convenience function via GDAL headers)updateFromMatrixByRow()
: update the hash table from a matrix having integer combinations arranged in rowsasMatrix()
: return the combinations table as a numeric matrix (alternative to asDataFrame()
)warp()
caused segfault if proj.db could not be found (#96)plot_raster()
: default value of the legend
argument has been changed to FALSE
; legend can now use a color table for continuous data; add argument maxColorValue
(e.g., to use RGB 0:255 instead of 0:1 in col_tbl
)bbox_from_wkt()
, bbox_to_wkt()
: add arguments extend_x
, extend_y
add dem_proc()
: wrapper for the gdaldem
command-line utility to generate DEM derivatives
add the following set methods in class GDALRaster
: setMetadataItem()
, setUnitType()
, setScale()
, setOffset()
add GDALRaster$buildOverviews()
: build raster overviews
add GDALRaster$dim()
: returns a vector of xsize, ysize, nbands
transform_xy()
and inv_project()
: pts
can be a data frame or matrix
plot_raster()
now accepts a GDALRaster
object for the data
argument
plot_raster()
: make the legend narrower and add argument digits
to format legend labels when raster data are floating point
add test suite and code coverage report
GDALRaster::read()
: data are now read as R integer
type when possible for the raster data type (#23)
add fillNodata()
: wrapper for GDALFillNodata()
in the GDAL Algorithms API
add read_ds()
: convenience wrapper for GDALRaster$read()
add plot_raster()
: display raster data using base R graphics
add get_cache_used()
: wrapper for GDALGetCacheUsed64()
with return value in MB
add GDALRaster$getOverviewCount()
: return the number of overview layers available
GDALRaster$info()
: drop -nomd
argument from the internal call
bbox_from_wkt()
: return NA
if creation of the geometry object fails (#27)
fix GDALRaster$getMetadata()
: requesting band-level metadata for a domain other than the default metadata domain was returning dataset-level metadata instead
add vignette containing an R port of the GDAL Raster API tutorial
add description of the GDAL_RASTERIO_RESAMPLING
configuration option in the documentation for GDALRaster$read()
add web article on the GDAL block cache and configuration of GDAL_CACHEMAX
starting at v. 1.2.0, {gdalraster}
will require R >= 4.2.0
fix: check for GEOS availability in bbox geometry functions
fix: wrong array dimensions in read()
(#5). Starting at v. 1.2.0, read()
will return vector instead of matrix which better matches the concept of a native GDAL-like interface (thanks to Michael Sumner).
add: has_geos()
exported to R
add: srs_is_same()
- wrapper for OSRIsSame() in the GDAL Spatial Reference System C API
documentation - minor edits throughout to improve clarity