Tile2R: simple utility to offset and scale XY coordinates with...

Description Usage Arguments Details Value Author(s) Examples

Description

simple utility to offset and scale XY coordinates with respect to the center

Usage

1
Tile2R(points, center)

Arguments

points

XY coordinates returned by e.g. LatLon2XY

center

XY coordinates of center returned by e.g. LatLon2XY

Details

mainly used for shrinking the size of a tile to the minimum size.

Value

list with X and Y pixel values

Author(s)

Markus Loecher

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
latR <- c(34.5,34.9);


 lonR <- c(-100.3, -100);


 lat.center <- 34.7;


 lon.center <- -100.2;


 zoom = 10;


 ll <- LatLon2XY(latR[1], lonR[1], zoom);#lower left corner


 ur <- LatLon2XY(latR[2], lonR[2], zoom );#upper right corner


 cr <- LatLon2XY(lat.center, lon.center, zoom );#center


 ll.Rcoords <- Tile2R(ll, cr);


 ur.Rcoords <- Tile2R(ur, cr);

RgoogleMaps documentation built on Feb. 12, 2020, 5:59 p.m.