Quadtree-class: Quadtree class

Quadtree-classR Documentation

Quadtree class

Description

This S4 class is essentially a wrapper around a CppQuadtree C++ object. Quadtree has one slot, which is named ptr and contains a CppQuadtree object. Instances of this class can be created through the quadtree() function.

An important note to make is that functions that modify a Quadtree modify the existing object. For example, running transform_values(qt, function(x) x+1) modifies qt. This differs from the way R objects usually function - most functions that modify R objects return a modified copy of the object, thus preserving the original object. Note that the copy() function, which makes a deep copy of a Quadtree, can be used to preserve a copy of a Quadtree before modifying it.

The methods of the C++ object (CppQuadtree) stored in the ptr slot can be accessed from R, but the typical end-user should have no need of these methods - they are meant for internal use. That being said, descriptions of the available methods can be found on the CppQuadtree documentation page.

Details

Functions for creating a Quadtree object:

  • quadtree()

  • read_quadtree()

Methods:

  • as_data_frame()

  • as_raster()

  • as_vector()

  • copy()

  • extent()

  • extract()

  • get_neighbors()

  • lcp_finder()

  • n_cells()

  • projection()

  • plot()

  • set_values()

  • show()

  • summary()

  • transform_values()

  • write_quadtree()

Slots

ptr

a C++ object of class CppQuadtree


quadtree documentation built on Aug. 29, 2023, 5:11 p.m.