Specify the creation of lines along meridians by specifying their placement at particular lons (longitudes) and lats (latitudes) and their extents with xlim (extent of parallel line in longitude) and ylim (extent of meridional line in latitude).

graticule(lons, lats, nverts = NULL, xlim, ylim, proj = NULL, tiles = FALSE)

Arguments

lons

longitudes for meridional lines

lats

latitudes for parallel lines

nverts

number of discrete vertices for each segment

xlim

maximum range of parallel lines

ylim

maximum range of meridional lines

proj

optional proj.4 string for output object

tiles

if TRUE return polygons as output

Value

SpatialLines or SpatialPolygons object

Details

Provide a valid PROJ.4 string to return the graticule lines in this projection. If this is not specified the graticule lines are returned in their original longlat / WGS84. All segments are discretized as _rhumb_lines_ at `getOption("graticule.mindist")` metres, which defaults to `5e4`. The arguments xlim, ylim and nverts are ignored if tiles is TRUE.

Examples

graticule()
#>                           geometry ID
#> 1  MULTILINESTRING((-180 -90 ...))  1
#> 2  MULTILINESTRING((-165 -90 ...))  2
#> 3  MULTILINESTRING((-150 -90 ...))  3
#> 4  MULTILINESTRING((-135 -90 ...))  4
#> 5  MULTILINESTRING((-120 -90 ...))  5
#> 6  MULTILINESTRING((-105 -90 ...))  6
#> 7   MULTILINESTRING((-90 -90 ...))  7
#> 8   MULTILINESTRING((-75 -90 ...))  8
#> 9   MULTILINESTRING((-60 -90 ...))  9
#> 10  MULTILINESTRING((-45 -90 ...)) 10
#> 11  MULTILINESTRING((-30 -90 ...)) 11
#> 12  MULTILINESTRING((-15 -90 ...)) 12
#> 13    MULTILINESTRING((0 -90 ...)) 13
#> 14   MULTILINESTRING((15 -90 ...)) 14
#> 15   MULTILINESTRING((30 -90 ...)) 15
#> 16   MULTILINESTRING((45 -90 ...)) 16
#> 17   MULTILINESTRING((60 -90 ...)) 17
#> 18   MULTILINESTRING((75 -90 ...)) 18
#> 19   MULTILINESTRING((90 -90 ...)) 19
#> 20  MULTILINESTRING((105 -90 ...)) 20
#> 21  MULTILINESTRING((120 -90 ...)) 21
#> 22  MULTILINESTRING((135 -90 ...)) 22
#> 23  MULTILINESTRING((150 -90 ...)) 23
#> 24  MULTILINESTRING((165 -90 ...)) 24
#> 25  MULTILINESTRING((180 -90 ...)) 25
#> 26 MULTILINESTRING((-180 -90 ...)) 26
#> 27 MULTILINESTRING((-180 -80 ...)) 27
#> 28 MULTILINESTRING((-180 -70 ...)) 28
#> 29 MULTILINESTRING((-180 -60 ...)) 29
#> 30 MULTILINESTRING((-180 -50 ...)) 30
#> 31 MULTILINESTRING((-180 -40 ...)) 31
#> 32 MULTILINESTRING((-180 -30 ...)) 32
#> 33 MULTILINESTRING((-180 -20 ...)) 33
#> 34 MULTILINESTRING((-180 -10 ...)) 34
#> 35   MULTILINESTRING((-180 0 ...)) 35
#> 36  MULTILINESTRING((-180 10 ...)) 36
#> 37  MULTILINESTRING((-180 20 ...)) 37
#> 38  MULTILINESTRING((-180 30 ...)) 38
#> 39  MULTILINESTRING((-180 40 ...)) 39
#> 40  MULTILINESTRING((-180 50 ...)) 40
#> 41  MULTILINESTRING((-180 60 ...)) 41
#> 42  MULTILINESTRING((-180 70 ...)) 42
#> 43  MULTILINESTRING((-180 80 ...)) 43
#> 44  MULTILINESTRING((-180 90 ...)) 44