Learn R Programming

GEOmap (version 2.5-11)

addLLXY: Add Lat-Lon points using projection

Description

Add Lat-Lon points using projection

Usage

addLLXY(lats, lons, PROJ = PROJ, PMAT = NULL,
col = gray(0.7), GRID = TRUE, GRIDcol = 1, LABS = NULL,
LABcol = 1, BORDER = NULL, TICS = c(1, 1), xpd=TRUE)

Value

Graphical Side Effects

Arguments

lats

Latitudes in Degrees

lons

Longitude in Degrees

PROJ

Map Projection list

PMAT

Perspective matrix conversion

col

color

GRID

logical, TRUE=add grid lines

GRIDcol

color for grid lines

LABS

vector of labels

LABcol

color for labels

BORDER

add border

TICS

tick marks

xpd

logical, expand plotting region (see par)

Author

Jonathan M. Lees<jonathan.lees.edu>

See Also

plotGEOmapXY, sqrTICXY

Examples

Run this code

library(geomapdata)


data('fujitopo', package='geomapdata')
data('japmap', package='geomapdata')

PLOC=list(LON=range(c( japmap$STROKES$LON1,japmap$STROKES$LON2) ),
LAT=range(c( japmap$STROKES$LAT1,japmap$STROKES$LAT2) ))
PLOC$x = PLOC$LON
PLOC$y = PLOC$LAT

PROJ = setPROJ(type=2, LAT0=mean(PLOC$y) , LON0=mean(PLOC$x) )
isel1 = which( japmap$STROKES$code != "i" & japmap$STROKES$num>120 )


plotGEOmapXY(japmap, PROJ=PROJ,SEL=isel1,  add=FALSE, axes=FALSE, xlab="", ylab="")
A = PLOC

   PLAT =  pretty(A$LAT)
    PLAT = c(min(A$LAT),  PLAT[PLAT>min(A$LAT) & PLATmin(A$LON) & PLON

Run the code above in your browser using DataLab