Learn R Programming

slippymath (version 0.3.1)

within_merc_extent: within_mercator_extent

Description

Are points in meters within Mercator extent?

Usage

within_merc_extent(xy)

Arguments

xy

a matrix of Mercator xy coordinates.

Value

TRUE or FALSE

Details

When doing maths with Mercator coordinates in m, you can end up outside the Mercator extent with an undefined coordinate. This function returns true if all xy lie within the Mercator extent.

Examples

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

within_merc_extent(stray)
# }

Run the code above in your browser using DataLab