Releases: firelab/gdalraster
gdalraster 2.5.0
Dependencies
- package cli has been added to
ImportsandLinkingTo - package vctrs has been added to
Suggests
Features
- use package cli for enhanced progress reporting throughout (#889, thanks to @pepijn-devries)
- add
gt_from_dim_bbox()andbbox_from_dim_gt(): standalone functions for converting between geotransform coefficients and bounding boxes (#878, thanks to @mdsumner) - add class method
GDALRaster$setBbox(): convenience wrapper for setting the geotransform from a bounding box (#878, thanks to @mdsumner) - add
read_to_nativeRaster(): read raster data directly as an R object of classnativeRasterfor fast rendering, also added as the class methodGDALRaster$readToNativeRaster()(#875, thanks to @mdsumner) - add
is_los_visible(): check line of sight between pairs of point locations usingGDALIsLineOfSightVisible()(#869) - add
vector_to_MEM(): use pixel data in an existing R vector to create a GDAL in-memory raster with zero copy (#910) - add
vsi_glob(): get file and directory names matching a pattern that may contain wildcards, wrapper ofVSIGlob()in GDAL >= 3.11 (#864) - add
vsi_uri_to_vsi_path(): return VSI compatible paths from URIs / URLs, wrapper ofVSIURIToVSIPath()in GDAL >= 3.12 (#865) - class
VSIFile: add a writable fieldreportVSIFErrorAsEof, and check the VSI error indicator in theread()andeof()methods if GDAL >= 3.10 (#901) - add
g_build_polygon_from_edges(): build a polygon from a set of arcs, wrapper ofOGRBuildPolygonFromEdges()(#863) - add
g_build_collection(): build a collection-type geometry from a set of input geometries given as a list of WKBrawvectors or acharactervector of WKT strings (#867) g_intersects(): performance improvements and use prepared geometry in 1:many batch mode- class
GDALVector: add methodisReadOnly() - raster attribute table: support new field types
GFT_Boolean,GFT_DateTimeandGFT_WKBGeometrywith GDAL >= 3.12 (#860) - class
GDALRaster: recognize the new color interpretation (GCI_xxxx) items added to theGDALColorInterpenumeration in GDAL 3.10 (#900) calc(): add support for input and output rasters as dataset objects, instead of only as file names (#870)set_config_option(): if theCPL_LOG_ERRORSoption is set, then set the global error handler appropriately for that case (addresses #905)
Fixes
- class
VSIFile: fix crash when passing open options in the constructor (#883, thanks to @pepijn-devries) - fix
read_ds(): the argumentas_wkband raster dataset propertyreadByteAsRawwere not synchronized (#873, thanks to @mdsumner) GDALVector::open(): remove warning if Spatialite is not available when opening with a SQL statement and the SQLite dialect is specified (fixes #908)- class
GDALVector: honor thequietobject setting in several places it was not checked before printing a console message - test fixes: use the
MEMvector dataset format instead ofMemoryif GDAL >= 3.11 - fix test for
identifyDriver(): make conditional on PostGISRaster / PostgreSQL driver presence (#880)
Internal
- use
CSLConstListwithGDALGetMetadata()andGDALSetMetadata()for as per https://gdal.org/en/latest/user/migration_guide.html (#868, thanks to @mdsumner) - use "safe" versions of the GDAL path manipulation functions in the internal wrappers if GDAL >= 3.11, and add
.cpl_get_path(),.cpl_get_dirname()and.cpl_launder_for_filename() VSIFile::read(): avoid a copy from temporary buffer most of the time (#888)- class
GDALAlg: useGDALAlgorithmRegistryInstantiateAlgFromPath()if GDAL >= 3.12 (#859) GDALAlg::parseCommandLineArgs(): look up argument aliases in a couple of places they were hard coded, and refactor- code linting
Authors
- add Michael D. Sumner as author (
"aut", previously"ctb") - add Pepijn de Vries as contributor (
"ctb")
gdalraster 2.4.0
Repository change
- the development repository moved into the
firelaborganization at https://github.com/firelab/gdalraster - the package website with documentation and additional web articles is now at https://firelab.github.io/gdalraster/
Spatial Reference System API
- add
srs_info_from_db(): obtain information about coordinate reference systems in the PROJ database (#832) - add
srs_get_axes(): return a list of the axis names and orientations for a spatial coordinate reference system (#837) - add to the set of SRS query functions:
srs_get_area_of_use(),srs_get_axes_count(),srs_epsg_treats_as_lat_long(),srs_epsg_treats_as_northing_easting()andsrs_get_celestial_body_name()(#831, #839)
Other features and improvements
gdal_formats(): add Update ("u") torw_flagswhen GDAL >= 3.11, and add several new columns to the output data frame containing various driver metadata (#833)vsi_read_dir(): fix slow string processing of the file list for return, especially for large listings e.g. recursive (#841, thanks to @mdsumner)plot_raster(): accept a color palette for the argumentcol_map_fn, to support an implied ramp function (#830, thanks to @wiesehahn)- add checks for ctrl-c user interrupt in
buildRAT()andcombine()(#844) - add
GDALRaster::getSpatialRef(): class method on aGDALRasterobject synonymous withGDALRaster::getProjection()andGDALRaster::getProjectionRef(), for consistency with classGDALVectorand with theosgeo.gdalbindings (#845)
Documentation
- update web article Vector Read Benchmarks: new hardware specs, timings, and add C++ raw performance comparisons
gdalraster 2.3.0
Dependencies
- package yyjsonr has been added to Imports
Features / enhancements
GDAL CLI bindings
gdal_usage(): include the list of potential step algorithms for"raster pipeline"and"vector pipeline"(#789)gdal_run(): add argumentsetVectorArgsFromObject(#790)- add
GDALAlg::getExplicitlySetArgs(): exposed class method to return a named list of arguments that have been set explicitly along with their values (#807) - add
GDALAlg::setArg(): exposed class method to set algorithm argument values individually by API (#822)
Raster
- class
GDALRaster: add helper methods for iterating I/O on raster blocks, or on multi-block chunks of user-defined size,readBlock()/writeBlock(),make_chunk_index()andreadChunk()/writeChunk()(#819) - add
make_chunk_index()stand-alone function for use without a dataset object - add
GDALRaster::getMinMaxLocation(): compute the min/max values for a raster band and their locations, usingGDALComputeRasterMinMaxLocation()in GDAL >= 3.11 (#820) rasterToVRT(): add argumentkrnl_fnsupporting a Function element in KernelFilteredSource with GDAL >= 3.12, one of"min","max","stddev","median"or"mode"(#821)- class
GDALRaster: add a constructor withallowed_driversargument (#793)
Multidimensional raster
- add
mdim_as_classic(): return a view of an MDArray as a "classic" GDALDataset (i.e., 2D), and add columnmultidim_raster(TRUE|FALSE) in the data frame output ofgdal_formats()(#799) - add
mdim_info(): report structure and content of a multidimensional dataset, interface togdalmdiminfoutility - add
mdim_translate(): convert multidimensional data between different formats, and subset, interface togdalmdimtranslateutility (#803)
Geometry API
- add
g_geom_count(): return the number of elements in a geometry or number of geometries in container - add
g_get_geom(): fetch a geometry from a geometry container - add
g_unary_union(): wrapper forOGR_G_UnaryUnion() - add
g_concave_hull(): wrapper forOGR_G_ConcaveHull() - add
g_normalize(): wrapper forOGR_G_Normalize() g_delaunay_triangulation(): add argumentconstrained, wrapper forOGR_G_ConstrainedDelaunayTriangulation()- add
plot_geom(): plot WKT or WKB geometries
Other features
- add
gdal_get_driver_md(): retrieve driver metadata (#795) - add
vsi_stat_exists(),vsi_stat_type()andvsi_stat_size(): specializations ofvsi_stat()operating on a vector of potentially multiple file system object names (#825)
Bug fix
- fixes for
ogr_ds_delete_field_domain(), and condition tests on GDAL 3.12 (#823) - ensure that the global error handler is restored when the input dataset cannot be opened in some OGR management functions (#787)
Internal
gdalraster 2.2.1
Bug fix and maintenance release
- updates in class
GDALAlg, experimental bindings to the new GDAL CLI API (#782)- improve input validation
- ensure algorithm names originating in
Rcpp::CharacterVectorare always passed explicitly asconst char *in C API calls - fix clang compiler warning from
-Wunused-const-variable
- add
gdal_global_reg_names(): return a character vector containing the names of the algorithms in the GDAL global algorithm registry (#782) - handle GDAL CPL error messages via Rcpp, and suppress driver warnings during package initialization (#784)
plot_raster(): useon.exit()forpar()reset (#780)- fixes in several unit tests, mainly fixing
on.exit()cleanup code (#783) - Documentation
- update text in the "Development Status" section describing the experimental GDAL CLI bindings
- condition the example code for the CLI bindings on the availability of top-level algorithm names from the global algorithm registry (for now, until the upstream API is declared stable)
- remove some non-ASCII characters found in .Rd files and other miscellaneous improvements in .Rd formatting
gdalraster 2.2.0
gdalraster 2.2.0
Features
- initial bindings to the "gdal" command line interface (CLI) added in GDAL 3.11
Other updates and fixes
pixel_extract(): add checks for potential ctrl-c user interrupt during extract for a large number of points- allow reporting a raster driver name as empty string for a dataset that has no driver (#761, thanks to @mdsumner)
- changes to address crash in
ogr_reproject()following GDALERROR 1: Reprojection failedon certain CRAN platforms with alternative BLAS/LAPACK implementations- disable for now the Arrow code path for GDAL vector translate in the examples and tests for
ogr_reproject()(cf. https://gdal.org/en/stable/programs/ogr2ogr.html#known-issues) - retain basic tests of
ogr_reproject()across all GDAL versions but skip more complex tests if GDAL < 3.11.3 ("stable" version as of July 2025) - move Vector API Overview from vignette to a web article
- disable for now the Arrow code path for GDAL vector translate in the examples and tests for
Documentation
- add conda-forge installation instructions in the README and web docs (#762, thanks to @matthewfeickert)
- update the sample data elevation raster (inst/extdata/storml_elev.tif) to avoid visual artifacts (#768)
- add web article Using "gdal" CLI algorithms from R
Internal
- avoid clang warning from
-Wimplicit-const-int-float-conversionin src/vsifile.cpp - method
setGDALDatasetH_()in classesGDALRasterandGDALVector: check shared flag of the incomingGDALDatasetHand set them_sharedmember variable - class
GDALRaster: callGDALReleaseDataset()instead ofGDALClose()in theclose()method and destructor when the dataset is non-shared - skip tests that require PostGIS drivers if they are not available
- code linting
gdalraster 2.1.0
Features / enhancements
Raster
pixel_extract(): support optional point IDs in the first column of an input data frame and add argumentas_data_frame(#751)- performance improvement for
plot_raster()viacol_tbl(#735 thanks @mdsumner)
Vector
- add write support for field domains (#738, #739)
GDALVector$getFieldDomain(): a coded values domain is now returned as a two-column data frame of (codes, values) instead of character vector of"CODE=VALUE", a breaking change but the return value was not previously documented. The returned field domain definition now aligns with the specification added under theogr_definehelp topic in #738
Geometry API
- add
g_boundary(): compute the boundary of input geometry, wrapper ofOGR_G_Boundary()(#727) - add
g_convex_hull(): compute convex hull for input geometries, wrapper ofOGR_G_ConvexHull()(#726) - add
g_delaunay_triangulation(): return a Delaunay triangulation of the vertices of the input geometry, wrapper ofOGR_G_DelaunayTriangulation()(#729) - add
g_set_3D()/g_set_measured(): add/remove the explicit Z/M coordinate dimension on the input geometries, wrappers ofOGR_G_Set3D()/OGR_G_SetMeasured()(#743) - add
g_is_ring(): tests whether a geometry is a ring,TRUEif the coordinates of the geometry form a ring by checking length and closure (self-intersection is not checked), otherwiseFALSE(OGR_G_IsRing()) - support one-to-many input (this-to-others) in binary predicate functions and in
g_distance()(#728) g_transform(): performance improvement when multiple input geometries (#745)g_envelope(): add argumentas_3d, wrapper ofOGR_G_GetEnvelope3D()in the GDAL Geometry API (#724)- fixes and improvements in handling of NULL geometries (#732)
- minor fixes and improvements to input validation and error handling (#737)
Spatial Reference System API
- add
srs_to_projjson(), wrapper forOSRExportToPROJJSON()in the GDAL Spatial Reference System API (#721) srs_to_wkt(): add argumentgcs_only, wrapper forOSRCloneGeogCS()in the GDAL SRS API
Coordinate transformation
transform_bounds(): support multiple input bounding boxes given as rows of a matrix or data frame (#744)
Bug fixes
g_envelope(): fix the order of xy coordinates in the returned envelope(s), fixes #725 a breaking changepixel_extract(): fix input validation forxy_srs
Internal
- improve input validation for the
ogr_managefunctions (#749) - add tests in
tests/testthat/test-gdal_create.Rfor the thecreate()andcreateCopy()R public interfaces, and improve input validation (#748) - additional tests for class
GDALVectorwith a few minor code improvements (#747) - class
GDALVector: improve error handling insetIgnoredFields()/setSelectedFields()and add several new tests (#731) - make variables
constexprorconstin several places
Documentation
- add web article Vector Read Benchmarks
gdalraster 2.0.0
Summary of main changes
- add bindings to the GDAL Vector API, implemented in the exposed C++ class
GDALVectoralong with several additions and enhancements toogr_*()stand-alone functions - enhance and expand existing bindings to the Geometry API, now operating on raw vectors of WKB or WKT strings
- enhance and expand existing bindings to the Spatial Reference Systems API
- add several new features and improvements to the Raster API, Virtual Systems Interface (VSI) API, and coordinate transformation functions
- add helper functions for working with GDAL raster data types (see
?data_type_helpers) - add an S4
show()method for all Rcpp exposed classes - bug fixes, code linting and other internal improvements
Dependencies
- package nanoarrow has been added to Imports and LinkingTo
- package wk has been added to Imports
- C++17 is now a System Requirement
- PROJ is removed as a stand-alone external System Requirement since:
- gdalraster as of 1.12 requires GDAL >= 3.1
- PROJ has been a GDAL build requirement since GDAL 3.0
- gdalraster only uses PROJ via GDAL headers (i.e., there is no longer a requirement for linking to external libproj in this case)
Vector API bindings
- add class
GDALVector: encapsulates anOGRLayerobject and theGDALDatasetthat contains it, exposing 48 class methods for obtaining vector layer information, attribute and spatial filtering, and reading/writing feature data - wrap GDAL's Arrow C Stream interface for reading vector data by exposing an ArrowArrayStream on a layer as a
nanoarrow_array_streamobject (GDAL >= 3.6) (#591) - add
ogr_reproject(): reproject a vector layer (purpose-built wrapper ofGDALVectorTranslate()) - add
ogr_proc(): interface to GDAL OGR facilities for vector geoprocessing - add
ogr_layer_rename(): rename an existing layer in a vector dataset (GDAL >= 3.5) ogr_execute_sql()now returns an object of classGDALVectorfor SQL SELECT statements- add argument
return_objinogr_ds_create()andogr_layer_create(),TRUEto return aGDALVectorobject for write access on the created layer - the
layerargument in certainogr_managefunctions now supportsNULLor empty string, which will default to the first layer by index (mainly as a convenience for single-layer formats) - remove element
$is_ignoredfrom the list object for a feature class definition (affects certainogr_defineandogr_managefunctions): potentially breaking change but assumed to be unused in layer / field creation (#513)
Geometry API
- update the geometry interface to support the vector API in gdalraster 2.0, with changes to existing functions, and add
g_wk2wk()(WKB <--> WKT conversion),g_create()(create geometries from input points),g_add_geom()(build container geometry types from sub-geometries) (#572) - the geometry wrapper functions now operate on input of either WKB raw vector, list of WKB, or character vector of WKT strings, with returned geometries as either WKB raw vector (or list of) or WKT character string (vector of)
- breaking changes: breaks some existing functions by renaming argument
wkttogeom, and by returning raw vectors of WKB by default from functions that return geometries (as_wkb = TRUEby default) - update
g_is_valid(),g_is_empty(),g_name()andg_buffer()to the new style Geometry API - add
g_make_valid(): attempt to make invalid geometries valid - add
g_summary(): obtain text summaries of WKB/WKT geometries (GDAL >= 3.7) - add
g_simplify(): simplify WKB/WKT geometries, optionally preserving topology - add
g_swap_xy(): swap x and y coordinates of the input geometry - add
g_geodesic_area()andg_geodesic_length()(#671) - add
g_is_3D()andg_is_measured()(#650) - add
g_envelope(): computes and returns the bounding envelope(s) for input geometries - add
g_coords(): extract coordinate values from geometries g_transform(): add argumenttraditional_gis_orderwith defaultTRUE, to support authority compliant order for geometries using geographic coordinatesbbox_transform(): add argumentuse_transform_bounds(TRUEby default but requires GDAL >= 3.4)
Spatial Reference Systems API
- improve and expand bindings to a subset of the GDAL Spatial Reference System API (#584)
- breaking change in
srs_is_same(): argumentsrs1is renamed tosrsand argumentsrs2tosrs_other - functions that previously required input as a WKT string now accept SRS definitions in any of the formats supported by
srs_to_wkt()(wrapper ofOSRSetFromUserInput()) - the documentation is grouped under two topics,
?srs_convertand?srs_query, and now includes the following:srs_convertfunctions:epsg_to_wkt(),srs_to_wkt()srs_queryfunctions:srs_find_epsg(),srs_get_name(),srs_is_geographic(),srs_is_derived_gcs(),srs_is_local(),srs_is_projected(),srs_is_compound(),srs_is_geocentric(),srs_is_vertical(),srs_is_dynamic(),srs_is_same(),srs_get_angular_units(),srs_get_linear_units(),srs_get_coord_epoch(),srs_get_utm_zone(),srs_get_axis_mapping_strategy()
GDALRaster-class
- add method
$get_block_indexing(): helper to get indexing values for the block layout of a raster band (#667) - add method
$addBand(): add a band to a dataset if the underlying format supports this action, e.g.,MEMandVRT - add method
$clearColorTable(): clear the color table associated with a raster band - add method
$getMaskBand(): return the mask filename and band number associated with a given band of the dataset - add method
$getMaskFlags(): return the status flags of the mask band associated with a given band of the dataset - add method
$setMetadata(): set dataset or band-level metadata from a character vector ofNAME=VALUEpairs (instead of per metadata item with the existing method$setMetadataItem()) - support
band = 0in the existing method$setDescription()to set the dataset-level description - improve methods
$bbox()and$res()to handle south-up / rotated raster (with related fixes inread_ds()andplot_raster()) (#569)
GDAL VSI for operations on virtual file systems
- add
vsi_get_actual_url(): return the actual URL of a supplied VSI filename, wrapper ofVSIGetActualURL()in the GDAL API - add
vsi_get_signed_url(): return a signed URL for a supplied VSI filename, wrapper ofVSIGetSignedURL()in the GDAL API - add
vsi_is_local(): returns whether the file/filesystem is "local", wrapper ofVSIIsLocal()in the GDAL API
GDAL configuration
- add
get_cache_max()andset_cache_max(): get/set maximum memory size available for the GDAL block cache get_cache_used(): change the return value to Rnumerictype carrying theinteger64class attribute, and add argumentunitsdefaulting to"MB"- expose
gdal_version_num()(previously internal/undocumented): return the full version number as anintegervalue (convenience foras.integer(gdal_version()[2])) - add
gdal_compute_version(): compute the integer version number (GDAL_VERSION_NUM) from the individual components (major, minor, revision)
Other stand-alone functions
- add
pixel_extract(): extract pixel values at geospatial point locations, with options for multiple interpolation methods and returning the individual pixel values from a N x N kernel (#570) - add
transform_bounds(): transform a bounding box, densifying the edges to account for nonlinear transformations along these edges and extracting the outermost bounds (wrapper ofOCTTransformBounds()in the GDAL Spatial Reference System API, requires GDAL >= 3.4) - add
autoCreateWarpedVRT(): create a warped virtual dataset representing the input raster warped into the target coordinate system (wrapper ofGDALAutoCreateWarpedVRT()) - add
validateCreationOptions(): validate the list of creation options that are handled by a driver (#663) getCreationOptions(): change the return value to a named list of options with their information (#662)getCreationOptions(): include$minand$maxattributes in the returned list if GDAL >= 3.11create(): add argumentreturn_obj,TRUEto return an object of classGDALRasterwith update access on the created datasetcreateCopy(): add argumentreturn_obj,TRUEto return an object of classGDALRasterwith update access on the created datasetcreateCopy(): an object of classGDALRastercan be given for argumentsrc_filenameto specify the source datasetwarp(): source and destination rasters may be given as objects of classGDALRastertranslate(): source raster can be given as aGDALRasterobjectinspectDataset(): handle the case if separate raster and vector drivers are identified but a specific flag for the dataset type was not given (#693)rasterize(): support passing aGDALRasterobject for in-place updating (#660)- accept one (x, y) as a vector in functions that expect matrix or data frame input (
transform_xy(),inverse_proj(),apply_geotransform(),get_pixel_line()) transform_xy()/inv_project(): support input points with z vertices (three column xyz) or time values (four column xyzt), and optionally accept input of point geometries as character vector of WKT strings, WKB raw vector, or list of WKB raw vectorstransform_xy()/inv_project(): account for be...
gdalraster 1.12.0
Features / enhancements
- add
inspectDataset(): obtain information about a GDAL raster or vector dataset (#552) - add
identifyDriver(): identify the driver that can open a given filename, connection string, etc. (#553) transform_xy()andinv_project(): accept the SRS arguments in any format supported bysrs_to_wkt()vsi_read_dir(): add therecursiveargument (#426); omit "." and ".." from the output directory listing; add theall_filesargument,TRUEto include hidden files; sort the directory listing alphabetically
Bug fixes
- fix the mode name for
"color-relief"inDEFAULT_DEM_PROC(#430) - fix a unit test for class
VSIFile: create file with "w+" access for read/write (#546) ogr_def_geom_field(): fix input validation for thesrsargument (#507)createCopy(): check the driver for GDAL_DCAP_CREATE capability as well as GDAL_DCAP_CREATECOPY (#479)plot_raster(): default to no stretch when the input is an RGB Byte raster (#435)
Documentation
- fix an example for class
VSIFilethat needs "w+" access instead of "w" - fix missing double quote in
transform_xy()examples - document the
fillRaster()method in classGDALRaster
gdalraster 1.11.1
-
fix test in test-ogr_manage.R: the test for GeoJSON layer did not need to check existence using
with_update = TRUEon a file in extdata (#410) -
add
apply_geotransform(): convert raster column/row to geospatial x/y coordinates, wrapper ofGDALApplyGeoTransform()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 functionapply_geotransform()on an object of classGDALRaster -
vsi_curl_clear_cache(): add parameterquietto wrap the API call in a quiet error handler,TRUEby default -
Documentation: document the
w+access flag for classVSIFile; addCPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITEconfiguration option in vignette GDAL Config Quick Reference; replacepaste0()withfile.path()in the examples throughout -
code linting
gdalraster 1.11.0
System requirements
- GDAL >= 3.1.0 is now required (previously >= 2.4.0)
- package
bit64has been added to Imports - package
RcppInt64has been added in LinkingTo
New utility functions for managing vector data sources
- initial bindings to the GDAL/OGR Vector API supporting data source management:
ogr_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() - documentation and helper functions for feature class definition:
ogr_def_field(),ogr_def_geom_field(),ogr_def_layer()
New bindings to the GDAL VSIVirtualHandle API
- class
VSIFilewrapsVSIVirtualHandlefor Standard C binary file I/O on regular file systems, URLs, cloud storage services, Zip/GZip/7z/RAR, and in-memory files
GDAL VSI for operations on virtual file systems (bug fix / enhancements)
- bug fix in
vsi_mkdir(): the file mode was set incorrectly becausemodewas not passed correctly as octal literal.modeis now passed as a character string containing the file mode as octal. - add
vsi_get_file_metadata(): returns metadata for network filesystem objects (/vsicurl/, /vsis3/, /vsiaz/, etc.), and with GDAL >= 3.7, /vsizip/ SOZip metadata - add
vsi_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) - add
vsi_clear_path_options(): clear path specific configuration options previously set withvsi_set_path_option()(GDAL >= 3.6) vsi_rmdir(): add argumentrecursive,TRUEto delete the directory and its contentvsi_mkdir(): add argumentrecursive,TRUEto create the directory and its ancestors- several VSI functions returned
0or-1invisibly indicating success/failure, consistent with GDAL return values. Those return values are now visible to be consistent with return values fromVSIFileclass methods. vsi_stat()withinfo = "size", andvsi_get_disk_free_space()now returnbit64::integer64type
GDALRaster-class
- behavior change: the class methods
$info()and$infoAsJSON()now use the default command-line arguments for the underlyinggdalinfoutility. Arguments are configurable in the new read/write$infoOptionsfield, which is an empty vector by default (character(0)). - add support for I/O of Byte raster as R
rawtype, and add the setting$readByteAsRawas a class field (#314, thanks to @mdsumner) - add read/write fields
$infoOptionsand$quietfor applying per-object settings - add an optional constructor to allow specifying whether the dataset is opened in shared mode,
TRUEby default - add method
$getActualBlockSize(): retrieve the actual block size for a given block offset - add method
$get_pixel_line(): class method alternative to calling the stand-alone functionget_pixel_line()on an object of classGDALRaster(#339) - add method
$getProjection(): equivalent to$getProjectionRef()(consistent withosgeo.gdal.Dataset.getProjection()/osgeo.gdal.Dataset.getProjectionRef()in the GDAL Python API) - method
$getDefaultRAT(): add progress bar since retrieving large raster attribute tables could take >30 sec
Stand-alone processing functions
calc(): add support for multiband output (#319)calc(): add input validation forvar.names, must be inexprget_pixel_line(): an object of classGDALRastercan now be passed for thegtparameter, in which case the geotransform will be obtained from the object and bounds checking on the raster extent will be done (original behavior forgtas numeric vector is unchanged) (#339)ogr2ogr(): add parameteropen_optionsto support options on the source datasetread_ds(): add parameteras_rawto read a Byte raster as Rrawtype (#314, thanks to @mdsumner)
GDAL configuration
- add
dump_open_datasets(): dump a list of all open datasets (shared or not) to the console - add
get_num_cpus(): get the number of processors detected by GDAL - add
get_usable_physical_ram(): get usable physical RAM reported by GDAL - add
has_spatialite(): returnsTRUEif GDAL was built with SpatiaLite support - add
http_enabled(): returnsTRUEif GDAL was built with libcurl support - add
.cpl_http_cleanup(): wrapper ofCPLHTTPCleanup()for internal use (2024-05-29)
Geometry functions
- new additional geometry functions operating on WKT (GEOS via GDAL headers):
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() - add
bbox_transform(): transform a bounding box to a different projection g_transform(): now usesOGR_GeomTransformer_Create()andOGR_GeomTransformer_Transform()in the GDAL API, enhanced version ofOGR_G_Transform(); add argumentswrap_date_lineanddate_line_offset
Documentation
- add Discussions on the GitHub repository
- add a section for HTTP/HTTPS (/vsicurl/) in the vignette GDAL Config Quick Reference
- DESCRIPTION file: add Michael D. Sumner in
Authors@R
Other internal changes and fixes
- fix memory leaks detected by Valgrind in
GDALRasterclass methods$info(),$infoAsJSON()and$getDefaultRAT() - register a finalizer to call
CPLHTTPCleanup()upon R session exit - add
GDALRasterclass method$setFilename(): set the filename of an uninitializedGDALRasterobject, currently undocumented / for internal use - add
GDALRasterclass method_getGDALDatasetH(): get the GDAL dataset handle for internal use buildRAT(): if the input raster is an object of classGDALRaster, use it by reference rather than instantiating anotherGDALRasterobject internallycalc(): close input raster dataset before exit when a differing extent is detected- add some missing null checks, and object destruction on error conditions, in src/geos_wkt.cpp
- improve the check for
"-json"as acl_argtoogrinfo() - code linting