Package 'gdalraster.windows'

Title: Self-Contained gdalraster Builds for Windows
Description: Installs a self-contained GDAL build runtime on Windows and builds a vendored gdalraster package against it. The resulting package carries its native dependency closure and runtime data, so it loads in fresh R sessions without activation hooks or environment changes.
Authors: Jimmy Briggs [aut, cre] (ORCID: <https://orcid.org/0000-0002-7489-8787>)
Maintainer: Jimmy Briggs <[email protected]>
License: MIT + file LICENSE
Version: 0.5.0
Built: 2026-10-18 06:30:53 UTC
Source: https://github.com/jimbrig/gdalraster.windows

Help Index


Build a self-contained gdalraster package

Description

Compiles gdalraster against the managed GDAL SDK, vendors the bundle's DLL dependency closure, GDAL/PROJ data, and pure-Python utilities into the installed package, then records build provenance.

Usage

gdal_build_gdalraster(
  gdal_home = default_gdal_home(),
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  source_tarball = NULL,
  repo = .gdalraster_repo,
  ref = "HEAD",
  upgrade = FALSE,
  repos = getOption("repos"),
  force = FALSE,
  enable_python = TRUE
)

Arguments

gdal_home

Installed GDAL build runtime.

lib

Destination library. Defaults to .libPaths()[1].

isolated

Install into the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

source_tarball

Optional local gdalraster source tarball.

repo

Upstream source repository.

ref

Git reference used for the source archive.

upgrade

Install missing R dependencies before compiling.

repos

CRAN-like repositories used when upgrade = TRUE.

force

Replace an existing gdalraster package.

enable_python

Provision the managed embedded-Python .pth file after installation when possible.

Value

Invisibly, the destination library.


Enable GDAL embedded-Python utilities

Description

Writes a managed .pth file into the system CPython site-packages directory. The file points to the pure-Python osgeo_utils vendored inside the installed gdalraster package. This does not modify PYTHONPATH and does not affect isolated virtual environments.

Usage

gdal_enable_python(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  python = NULL,
  site_packages = NULL,
  quiet = FALSE
)

Arguments

lib

Library containing the self-contained gdalraster package. Defaults to .libPaths()[1].

isolated

Use the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

python

Optional path to the CPython executable GDAL embeds.

site_packages

Optional explicit site-packages directory.

quiet

Suppress status messages.

Value

Invisibly, the .pth path, or NULL when no system CPython can be located.


Resolve the managed GDAL runtime directory

Description

Resolution order is the gdalraster.windows.gdal_home option, the GDALRASTER_WINDOWS_GDAL_HOME environment variable, then the package-managed user data directory. The returned path is normalized to forward slashes.

Usage

gdal_home()

Value

A single path.


Install a self-contained GDAL build runtime

Description

Installs a release bundle used to compile gdal_build_gdalraster(). The installed runtime is a build-time SDK; packages produced by gdal_build_gdalraster() vendor everything needed at run time.

Usage

gdal_install_runtime(
  repo = .bundle_repo,
  tag = "latest",
  asset_pattern = .bundle_asset_pattern,
  gdal_home = default_gdal_home(),
  force = FALSE,
  local_zip = NULL,
  fallback_zip = NULL
)

Arguments

repo

GitHub repository that publishes bundle releases.

tag

Bundle release tag or "latest".

asset_pattern

Regular expression selecting a bundle zip asset.

gdal_home

Destination runtime directory.

force

Reinstall an existing runtime.

local_zip

Optional local bundle zip. This takes precedence over a release download.

fallback_zip

Optional local zip used if release resolution or download fails.

Details

The installer is idempotent. When the requested bundle tag is already recorded in MANIFEST.dcf, installation is skipped unless force = TRUE.

Value

Invisibly, the installed runtime directory.


Set up a self-contained gdalraster installation

Description

Installs the GDAL build runtime when needed, builds and vendors gdalraster, provisions embedded Python when available, and verifies the result in fresh processes. The default destination is .libPaths()[1].

Usage

gdal_setup(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  update = FALSE,
  force = FALSE,
  tag = "latest",
  local_zip = NULL,
  fallback_zip = NULL,
  source_tarball = NULL,
  upgrade = FALSE,
  verify = TRUE
)

Arguments

lib

Destination library for gdalraster. Defaults to .libPaths()[1].

isolated

Install into the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

update

Upgrade the runtime to the requested/latest bundle and rebuild.

force

Reinstall and rebuild even when provenance is current.

tag

Runtime bundle release tag or "latest".

local_zip

Optional local runtime bundle.

fallback_zip

Optional local fallback runtime bundle.

source_tarball

Optional local gdalraster source tarball.

upgrade

Install gdalraster R dependencies before compiling.

verify

Run gdal_verify() after setup.

Value

Invisibly, a list describing performed actions.


Report GDAL and gdalraster installation state

Description

Reports the installed GDAL runtime, the gdalraster build in the active library, staleness against the newest ⁠gdal-v*⁠ bundle, embedded-Python provisioning, and session collision risks without changing the session.

Usage

gdal_sitrep(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  network = rlang::is_interactive(),
  quiet = FALSE
)

Arguments

lib

Library expected to contain the managed gdalraster build. Defaults to .libPaths()[1].

isolated

Inspect the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

network

Query GitHub for the latest GDAL runtime bundle (⁠gdal-v*⁠).

quiet

Return state without printing it.

Details

The default inspects .libPaths()[1], the library used by library(gdalraster). Pass lib for a custom library, or isolated = TRUE for the package-managed isolated library.

Value

Invisibly, a named list describing installation state.


Uninstall managed GDAL resources

Description

Uninstall managed GDAL resources

Usage

gdal_uninstall(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  runtime = TRUE,
  package = TRUE,
  python = TRUE,
  force = FALSE
)

Arguments

lib

Library containing the managed gdalraster package. Defaults to .libPaths()[1].

isolated

Remove the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

runtime

Remove the GDAL build runtime.

package

Remove the managed gdalraster package.

python

Remove managed embedded-Python .pth files.

force

Confirm removal in non-interactive sessions.

Value

Invisibly, the removed paths.


Update the GDAL runtime and rebuild gdalraster

Description

Update the GDAL runtime and rebuild gdalraster

Usage

gdal_update(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  tag = "latest",
  local_zip = NULL,
  fallback_zip = NULL,
  source_tarball = NULL,
  upgrade = FALSE,
  verify = TRUE
)

Arguments

lib

Destination library for gdalraster. Defaults to .libPaths()[1].

isolated

Install into the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

tag

Runtime bundle release tag or "latest".

local_zip

Optional local runtime bundle.

fallback_zip

Optional local fallback runtime bundle.

source_tarball

Optional local gdalraster source tarball.

upgrade

Install gdalraster R dependencies before compiling.

verify

Run gdal_verify() after setup.

Value

The result of gdal_setup(), invisibly.


Verify the self-contained gdalraster installation

Description

Runs verification in fresh Rscript --vanilla processes. Checks the GDAL Algorithm API, GEOS and CRS support, Arrow/Parquet/HDF5/netCDF driver registration, a first Parquet dataset open, and the GeoPackage Python validator when embedded Python has been provisioned.

Usage

gdal_verify(
  lib = NULL,
  isolated = FALSE,
  user_lib = NULL,
  python = TRUE,
  quiet = FALSE
)

Arguments

lib

Library containing the managed gdalraster package. Defaults to .libPaths()[1].

isolated

Verify the package-managed isolated library instead of .libPaths()[1]. Ignored when lib is set.

user_lib

Deprecated. user_lib = TRUE is now the default; user_lib = FALSE is equivalent to isolated = TRUE.

python

Run the embedded-Python validation when its managed .pth file is ready.

quiet

Suppress verification output.

Value

TRUE on success and FALSE on failure.