Open
Description
An undocumented (and useful) feature of the Rook and Queen contiguity weights constructors is that passing in points results in the construction of voronoi polygons, which are then used to build contiguity weights. The current docs imply that only polygons can be passed. You need to read the source code to understand how points result in the identification of contiguous neighbors. I propose modifying the Rook
and Queen
docs to say something like.
class Rook(W):
"""
Construct a weights object based on polygons that
that share at least one edge. A collection of pysal
polygons can be passed in; passing pysal points
results in voronoi polygons being built first.
Parameters
----------
polygons : list
a collection of PySAL polygons to build weights from
(a collection of points results in the construction of
voronoi polygons)
Activity