merge.tiles: Merges adjacent tiles (polygons) where possible

Description Usage Arguments Details Value Author(s)

View source: R/merge.R

Description

merges.tiles merges adjacent polygons

Usage

1
merge.tiles(x, y, id = rep(1L, length(x)))

Arguments

x

x coordinates

y

y coordinates

id

identifiers defining tiles - all contiguous coordinates with the same id define one polygon

Details

Each tile is a polygon defined by points with the id of the tile. The points for the same id must be contiguous. No tiles are allowed to overlap. Shared edges must be defined by points common to both tiles. The orientation must be consistent since only edges with opposite orientation will be merged.

The algorithm used to merge finds all common points in the data, for each common point checks whether edges from that point are shared and any such edges are marked for deletion.

The resulting set of ids will be a subset of the initial ids. Merged tiles recevied the id that comes earlier in the input id vector.

Value

List:

x

x coordinates

y

y coordinates

id

identifiers defining the resulting tiles

Author(s)

Simon Urbanek


s-u/fastshp documentation built on May 28, 2019, 10:47 a.m.