Skip to content
Back to skills

Maptools

ASecurity

R maptools package for spatial data tools. Use for reading/writing spatial data (deprecated, use sf).

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
datago

Security analysis

A100/100

Scanned June 4, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Maptools?

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

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

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: maptools
description: R maptools package for spatial data tools. Use for reading/writing spatial data (deprecated, use sf).
---

# maptools

Tools for handling spatial objects (deprecated - use sf).

## Note

maptools was retired in October 2023. Use sf instead.

## Migration to sf

```r
# Old maptools way
library(maptools)
shp <- readShapePoly("data.shp")
writePolyShape(shp, "output.shp")

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

## Reading Shapefiles

```r
# Old way
readShapePoly("polygons.shp")
readShapeLines("lines.shp")
readShapePoints("points.shp")

# New sf way (all types)
st_read("data.shp")
```

## Coordinate Operations

```r
# Old way
coordinates(sp_obj)
bbox(sp_obj)

# New sf way
st_coordinates(sf_obj)
st_bbox(sf_obj)
```

## Conversion

```r
# Old way (sp to data.frame)
as.data.frame(sp_obj)

# New sf way
as.data.frame(sf_obj)
st_drop_geometry(sf_obj)
```

## Point in Polygon

```r
# Old way
over(points, polygons)

# New sf way
st_join(points, polygons)
st_intersection(points, polygons)
```

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.