merge.tiles {fastshp}R Documentation

Merges adjacent tiles (polygons) where possible

Description

merges.tiles merges adjacent polygons

Usage

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


[Package fastshp version 0.1-0 Index]