Learn R Programming

slippymath (version 0.3.1)

merc_truncate: merc_truncate

Description

Truncate coordinate to Mercator extent.

Usage

merc_truncate(xy)

Arguments

xy

a matrix of Mercator XY points.

Value

a matrix of XY points.

Details

If a point in m lies outside the Mercator extent, this function can be used to truncate it to the boundary of the extent.

Examples

Run this code
# NOT RUN {
stray <- matrix(c(20037509,
                   -2918162.223463),
                 nrow = 1)

merc_truncate(stray)

# }

Run the code above in your browser using DataLab