R: Add Lat-Lon points using projection

addLLXY {GEOmap} | R Documentation

## 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)

### 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)

### Value

Graphical Side Effects

### Author(s)

Jonathan M. Lees<jonathan.lees.edu>

### See Also

plotGEOmapXY, sqrTICXY

### Examples

    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) & PLAT<max(A$LAT)],max(A$LAT))
      PLON  = pretty(A$LON)
            PLON = c(min(A$LON), PLON[PLON>min(A$LON) & PLON<max(A$LON)],
     max(A$LON))

    addLLXY(PLAT,  PLON, PROJ=PROJ, LABS=TRUE, PMAT=NULL, TICS=c(.1,.1) )

    ###############

[Package GEOmap version 2.4-0 Index]