Unrasterize

Motivation

Raster data formats have become increasingly popular to represent global population density (see, for example, CIESIN’s Gridded Population of the World). But the sheer number of pixels can make working with raster data difficult for certain use cases.

Enter unrasterize, a lightweight package to extract representative population points from raster data. The resulting points exist in vector format (i.e., GeoJSON) and can be used by downstream applications.

Sample Output

https://farm5.staticflickr.com/4708/39370187915_693f694b79_z_d.jpg

Contents

Usage

For an example of unrasterize in action, see this Jupyter notebook.

Unrasterize API

The following classes exist to convert raster data to GeoJSON.

For large raster files, the WindowedUnrasterizer is the most memory efficient, with the caveat that it may select some points from adjacent windows that are very close together.

Classes

unrasterize.BaseUnrasterizer
unrasterize.Unrasterizer
unrasterize.WindowedUnrasterizer

Contributing

View unrasterize on GitHub.

Indices and tables