Removes points interactively from a spatial point pattern (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).

### Options

`PRINT` = string token |
What to print (`summary` , `monitoring` ); default `summ` , `moni` |
---|---|

`WINDOW` = scalar |
Which graphics window to use for the plot; default 1 |

### Parameters

`OLDY` = variates |
Vertical coordinates of each spatial point pattern; no default – this parameter must be set |
---|---|

`OLDX` = variates |
Horizontal coordinates of each spatial point pattern; no default – this parameter must be set |

`NEWY` = variates |
Variates to receive the vertical coordinates of the original points minus the deleted points of each pattern |

`NEWX` = variates |
Variates to receive the horizontal coordinates of the original points minus the deleted points of each pattern |

### Description

`PTREMOVE`

uses the `DREAD`

directive to delete points from a spatial point pattern. The coordinates of the existing points must be supplied using the parameters `OLDX`

and `OLDY`

. These points will be plotted on the current graphics device using `DPTMAP`

with a pen setting of `SYMBOLS=1`

. The `WINDOW`

option may be used to specify the graphics window to use for the plot.

The operation of `DREAD`

may vary slightly from one system to another. The Users’ Note supplied with Genstat explains how to read points and terminate input on specific devices. The usual method for reading points is to click the left mouse button at the required position. The usual way to terminate input is to click the right mouse button. The points read using `DREAD`

will be echoed using a pen setting of `SYMBOLS=2`

. The coordinates of the new spatial point pattern containing the original points minus any points which have been deleted may be saved using the parameters `NEWX`

and `NEWY`

.

Printed output is controlled using the `PRINT`

option. The settings available are `monitoring`

(which prints the coordinates of the points to be deleted) and `summary`

(which prints the coordinates of the new pattern consisting of the original points minus any that have been deleted under the headings `NEWX`

and `NEWY`

). The default setting is for both monitoring and summary.

Options: `PRINT`

, `WINDOW`

.

Parameters: `OLDY`

, `OLDX`

, `NEWY`

, `NEWX`

.

### Method

A procedure `PTCHECKXY`

is called to check that `OLDX`

and `OLDY`

have identical restrictions. `DPTMAP`

is then used to draw a map of the original point pattern. The `DREAD`

directive is used to read the coordinates of points to be deleted. Finally, the coordinates for the deleted points are removed from the original points using the `SUBSET`

procedure and the coordinates of the undeleted points are stored in new variates.

### Action with `RESTRICT`

If `OLDX`

and `OLDY`

are restricted, only the subset of values specified by the restriction will be included in the calculations.

### See also

Procedure: `DPTREAD`

, `DRPOLYGON`

.

Commands for: Graphics, Spatial statistics.

### Example

CAPTION 'PTREMOVE example'; STYLE=meta CALCULATE x,y = URAND(531647,0; 50) PTREMOVE OLDY=y; OLDX=x