Learn R Programming

OSMscale (version 0.5.20)

proj: CRS of various PROJ.4 projections

Description

coordinate reference system (CRS) Object for several proj4 character strings. posm and pll are taken directly from OpenStreetMap::osm and longlat.
pmap gets the projection string from map objects as returned by pointsMap.

Usage

putm(long, zone = mean(long, na.rm = TRUE)%/%6 + 31)

posm()

pll()

pmap(map)

Value

sf::st_crs objects for one of:

- UTM projection with given zone

- Open street map (and google) mercator projection

- Latitude Longitude projection

Arguments

long

Vector of decimal longitude coordinates (East/West values). Not needed of zone is given.

zone

UTM (Universal Transverse Mercator) zone, see e.g. https://upload.wikimedia.org/wikipedia/commons/e/ed/Utm-zones.jpg. DEFAULT: UTM zone at mean of long

map

for pmap: map object as returned by pointsMap

Author

Berry Boessenkool, berry-b@gmx.de, Aug 2016

See Also

projectPoints, degree

Examples

Run this code
posm()
str(posm())
pll()
putm(5:14) # Germany
putm(zone=33) # Berlin

map <- list(tiles=list(dummy=list(projection=pll())),
            bbox=list(p1=par("usr")[c(1,4)], p2=par("usr")[2:3]) )
pmap(map)

Run the code above in your browser using DataLab