百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fasterize

> 编程语言
开源

适用于现代空间数据的高性能点阵转换 ▦

186 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

适用于现代空间数据的高性能点阵转换 ▦

fasterize

Fast polygon-to-raster conversion, burn polygon shapes and/or values into pixels. fasterize is a high-performance replacement for the rasterize() function in the raster package.

Functionality is currently limited to rasterizing polygons in sf-type data frames.

Installation

Install the current version of fasterize from CRAN:

r
install.packages('fasterize')

Install the development version of fasterize with devtools:

r
devtools::install_github("hypertidy/fasterize")

fasterize uses Rcpp and thus requires a compile toolchain to install from source. Testing (and for normal use of sf objects) requires sf, which requires GDAL, GEOS, and PROJ to be installed.

Usage

The main function, fasterize(), takes the same inputs as raster::rasterize() but currently has fewer options and is is limited to rasterizing polygons.

A raster() and plot() methods for rasters are re-exported from the raster package.

r
library(raster)
library(fasterize)
library(wk)
library(fasterize)
p123  dialect must be 'OGRSQL' or 'SQLITE', default value '' means 'OGRSQL'

``` r
pols_t$value  Unit: milliseconds
    #>       expr   min    lq   mean median     uq  max neval cld
    #>  terrarize 9.464 9.761 11.306 10.022 10.375 82.0   100  a 
    #>  fasterize 0.647 0.684  0.839  0.845  0.971  1.1   100   b

How does `fasterize()` do on a large set of polygons? Here I download
the IUCN shapefile for the ranges of all terrestrial mammals and
generate a 1/6 degree world map of mammalian biodiversity by rasterizing
all the layers.

(this doesn’t work anymore because the source data is gone, left as a
record 2024-09-25).

``` r
if(!dir.exists("Mammals_Terrestrial")) {
  download.file(
    "https://s3.amazonaws.com/hp3-shapefiles/Mammals_Terrestrial.zip",
    destfile = "Mammals_Terrestrial.zip") #  Unit: seconds
    #>     expr   min    lq  mean median    uq   max neval
    #>  mammals 0.847 0.857 0.883  0.886 0.894 0.963    20

## About

**fasterize** was developed openly at [EcoHealth
Alliance](https://www.ecohealthalliance.org/) under the USAID PREDICT
project by Noam Ross. The repository for hosting fasterize was taken
over by Michael Sumner in December 2022, and was later migrated from
Github ‘ecohealthalliance/fasterize’ to
 in March 2025.

Please note that this project is released with a [Contributor Code of
Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree
to abide by its terms.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++rrasterrcpprcpparmadillo

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言