Skip to content

Latest commit

Β 

History

History
48 lines (36 loc) Β· 3.04 KB

CONTRIBUTING.md

File metadata and controls

48 lines (36 loc) Β· 3.04 KB

Contributing to the fasterize R package

You want to contribute to fasterize? Great!

Please submit questions, bug reports, and requests in the issues tracker. Please submit bug reports with a minimal reprex.

If you plan to contribute code, go ahead and fork the repo and submit a pull request. A few notes:

  • This package is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. Why? We want contribution to be enjoyable and rewarding for everyone!
  • If you have large change, please open an issue first to discuss.
  • I'll generally include contributors as authors in the DESCRIPTION file (with their permission) for most contributions that go beyond small typos in code or documentation.
  • This package generally uses the rOpenSci packaging guidelines for style and structure.
  • Documentation is generated by roxygen2. Please write documentation in code files and let it auto-generate documentation files. We use a recent version so documentation my be written in markdown
  • We aim for testing that has high coverage and is robust. Include tests with any major contribution to code. Test your changes the package with goodpractice before submitting your change.

Roadmap

fasterize aims to be limited in scope, lightweight in code and dependencies, easy to maintain, and fast as hell. It's limited to operations converting vector to raster and raster to vector data, in C++, with minimum memory use or function overhead, dealing with only sf and raster/stars formats. Conversion to other vector/raster types and or within-type processing should be handled elsewhere so as not to impose overhead on the core functions.

Things we want to do:

  • Rasterization of lines and points.
  • Converstion of rasters to shapes. I have half-finished contourize() and polygonize() functions on a branch I will try to get up here soon.
  • More aggregation functions
  • Rasterization directly to (and from) out-of-memory formats.
  • Expose the C++ API to make the low-level functions available for other uses.

Things we don't want to do:

  • Dependency on GDAL or other libraries that need to be installed out of R
  • Plotting functions
  • Stuff that calls back to R from C++
  • Aggregation functions that require keeping large stacks of raster in memory. It's better to just use raster::calc() on a RasterStack.

In general, speed and handling of very large objects is favored. Fanatical tweaking is encouraged. Even small operations, like type checking, are implemented in C++ to reduce function overhead. Profile and test your code. On OSX, Instruments works well for this. The alpha-stage gprofiler package does joint R/C(++) code profiling.