Skip to content
Back to skills

Rgdal

ASecurity

R rgdal package for geospatial data. Use for reading/writing spatial data formats (deprecated, use sf/terra).

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 4, 2026
data

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill rgdal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rgdal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rgdal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-rgdal/badge)](https://www.skillsdirectory.com/skills/leolin990405-rgdal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rgdal
description: R rgdal package for geospatial data. Use for reading/writing spatial data formats (deprecated, use sf/terra).
---

# rgdal

Bindings for GDAL/OGR (deprecated - use sf or terra).

## Note

rgdal was retired in October 2023. Use sf or terra instead.

## Migration to sf

```r
# Old rgdal way
library(rgdal)
shp <- readOGR("data.shp")
writeOGR(shp, "output.shp", layer = "data", driver = "ESRI Shapefile")

# New sf way
library(sf)
shp <- st_read("data.shp")
st_write(shp, "output.shp")
```

## Migration to terra

```r
# Old rgdal way
library(rgdal)
raster <- readGDAL("raster.tif")

# New terra way
library(terra)
raster <- rast("raster.tif")
```

## CRS Handling

```r
# Old way
proj4string(sp_obj) <- CRS("+proj=longlat +datum=WGS84")
spTransform(sp_obj, CRS("+proj=utm +zone=10"))

# New sf way
st_crs(sf_obj) <- 4326
st_transform(sf_obj, 32610)
```

## Available Drivers

```r
# In sf
st_drivers()

# In terra
gdal(drivers = TRUE)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.