Running 'colourScale.R' [6s]
  Running 'omerc.R' [24s]
  Running 'openmap.R' [210s]
  Running 'worldMap.R' [20s]
Running the tests in 'tests/openmap.R' failed.
Complete output:
  > #+ setup
  > 
  > library('mapmisc')
  Loading required package: terra
  terra 1.7.71
  map images will be cached in  D:\temp\RtmpIp5q1z/mapmiscCache
  > 
  > #if(!exists('mapmiscCachePath'))
  > #  mapmiscCachePath = system.file('extdata', package='mapmisc')
  > 
  > #if(!exists('mapmiscCacheReadOnly'))
  > #  mapmiscCacheReadOnly = TRUE
  > 
  > 
  > options(
  + #  mapmiscCachePath = mapmiscCachePath,
  + #  mapmiscCacheReadOnly = mapmiscCacheReadOnly,
  +   mapmiscVerbose=TRUE)
  > 
  > #getOption("mapmiscCachePath")
  > #getOption("mapmiscCacheReadOnly")
  > #'
  > 
  > if(!interactive()) pdf("openmap.pdf")
  > 
  > #+ simplePlot
  > myraster = rast(ext(8,18,0,10), crs=crsLL)
  > values(myraster) = seq(0,1,len=ncell(myraster))
  > 
  > myPoints = as.points(myraster)[
  +   seq(1,ncell(myraster),len=5)]
  > 
  > plot(myraster)
  > points(myPoints)
  > #'
  > #' 
  > #+ africaPlots 
  >   
  >   # utm zone 32
  >   utmproj = crs("+init=epsg:3064") 
  >   myrasterUTM = project(myraster, utmproj)
  >   myPointsUTM = project(myPoints, utmproj)
  >   plot(myrasterUTM)
  >   points(myPointsUTM)
  >   
  >   myPointsMercator = project(myPoints, crsMerc)
  >   
  >   
  >   myplot = function(first,second=first) {
  +     par(mar=c(0,0,0,0))
  +     plot(first)
  +     plot(mytiles, add=TRUE)
  +     plot(second,add=TRUE,col='blue')
  + #	points(mycities,col='red')
  + #	text(mycities, labels=mycities$name, col='red',pos=4)
  +     scaleBar(first)
  +   }
  >   
  >   thezoom=6
  >   
  >   print(1)
  [1] 1
  > 
  > # and if the OpenStreetMap.org web site can be accessed
  >   
  >   # raster, result will be in project of the raster (long-lat)
  >   mytiles = openmap(
  +     x=extend(myraster,1),
  +     zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  downloading  http://tile.openstreetmap.org/6/33/30.png 
  trying URL 'http://tile.openstreetmap.org/6/33/30.png'
  Content type 'image/png' length 25328 bytes (24 KB)
  ==================================================
  downloaded 24 KB
  
  downloading  http://tile.openstreetmap.org/6/33/31.png 
  trying URL 'http://tile.openstreetmap.org/6/33/31.png'
  Content type 'image/png' length 24539 bytes (23 KB)
  ==================================================
  downloaded 23 KB
  
  downloading  http://tile.openstreetmap.org/6/33/32.png 
  trying URL 'http://tile.openstreetmap.org/6/33/32.png'
  Content type 'image/png' length 10005 bytes
  ==================================================
  downloaded 10005 bytes
  
  downloading  http://tile.openstreetmap.org/6/34/30.png 
  trying URL 'http://tile.openstreetmap.org/6/34/30.png'
  Content type 'image/png' length 34247 bytes (33 KB)
  ==================================================
  downloaded 33 KB
  
  downloading  http://tile.openstreetmap.org/6/34/31.png 
  trying URL 'http://tile.openstreetmap.org/6/34/31.png'
  Content type 'image/png' length 29479 bytes (28 KB)
  ==================================================
  downloaded 28 KB
  
  downloading  http://tile.openstreetmap.org/6/34/32.png 
  trying URL 'http://tile.openstreetmap.org/6/34/32.png'
  Content type 'image/png' length 23428 bytes (22 KB)
  ==================================================
  downloaded 22 KB
  
  downloading  http://tile.openstreetmap.org/6/35/30.png 
  trying URL 'http://tile.openstreetmap.org/6/35/30.png'
  Content type 'image/png' length 23769 bytes (23 KB)
  ==================================================
  downloaded 23 KB
  
  downloading  http://tile.openstreetmap.org/6/35/31.png 
  trying URL 'http://tile.openstreetmap.org/6/35/31.png'
  Content type 'image/png' length 22204 bytes (21 KB)
  ==================================================
  downloaded 21 KB
  
  downloading  http://tile.openstreetmap.org/6/35/32.png 
  trying URL 'http://tile.openstreetmap.org/6/35/32.png'
  Content type 'image/png' length 20531 bytes (20 KB)
  ==================================================
  downloaded 20 KB
  
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(extend(myraster,1),max=5)
  >   myplot(myraster, myPoints)
  > 
  > print(2)
  [1] 2
  > 
  > 
  >   # slash at the end
  >   mytiles = openmap(extend(myraster,1),zoom=thezoom, 
  +     path="http://tile.openstreetmap.org/")
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/32.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/32.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/32.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(extend(myraster,1),max=5)
  >   myplot(myraster, myPoints)
  > print(3)
  [1] 3
  > 
  >   
  >   # no http at beginning
  >   mytiles = openmap(extend(myraster,1),path="tile.openstreetmap.org")
  zoom is  6 ,  9 tiles
  tile.openstreetmap.org 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/32.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/32.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/32.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(extend(myraster,1),max=5)
  >   myplot(myraster, myPoints)
  >   
  > 
  > print(4)
  [1] 4
  > 
  >   
  >   # extent, tiles will be long-lat
  >   mytiles = openmap(ext(myraster),zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  >   # cities will be long=lat
  > #		mycities = GNcities(extent(myraster),max=5,lang="fr")
  > #		myplot(mycities,myPoints)
  > 
  > print(5)
  [1] 5
  > 
  >   
  >   # give the bbox, long lat
  >   mytiles = openmap(ext(myraster),zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(bbox(myraster),max=5)
  > #		myplot(mycities,myPoints)
  >   
  > 
  > print(6)
  [1] 6
  > 
  >   
  >   # give points, result is CRS of points (long-lat)
  >   mytiles = openmap(myPoints,zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   3  cycles:1  2  2 
  > #		mycities = GNcities(myPoints,max=5,lang="es")
  >   myplot(myPoints)
  > 
  > print(7)
  [1] 7
  > 
  >   
  >   # UTM raster
  >   mytiles = openmap(myrasterUTM,zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(myrasterUTM,max=5)
  >   myplot(myrasterUTM, myPointsUTM)
  > 
  > print(8)
  [1] 8
  > 
  >   
  >   # supply a crs
  >   mytiles = openmap(x=ext(myrasterUTM),zoom=thezoom, 
  +     crs=crs(myrasterUTM))
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   4  cycles:1  2  3  3 
  > #		mycities = GNcities(myrasterUTM,max=5)
  >   myplot(myrasterUTM, myPointsUTM)
  > 
  > print(9)
  [1] 9
  > 
  >   
  >   # utm points
  >   mytiles = openmap(myPointsUTM,zoom=thezoom)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   3  cycles:1  2  2 
  > #		mycities = GNcities(myPointsUTM,max=5)
  >   myplot(myPointsUTM)
  > 
  > print(10)
  [1] 10
  > 
  >   
  >   # specify different output crs
  >   mytiles = openmap(myPointsUTM, crs=crsLL)
  zoom is  6 ,  6 tiles
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/33/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/34/31.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/30.png  cached
  tile  D:\temp\RtmpIp5q1z/mapmiscCache/org/6/35/31.png  cached
  reprojecting
  reprojecting:   3  cycles:1  2  2 
  > #	mycities = GNcities(myPoints,max=5)
  >   myplot(myPoints)
  > 
  > print(11)
  [1] 11
  > 
  >   
  >   # one point only
  >   mytiles = openmap(x=crds(myPoints)[1,], zoom=4, crs=crs(myPoints), buffer=10, fact=2)
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  downloading  http://tile.openstreetmap.org/4/7/6.png 
  trying URL 'http://tile.openstreetmap.org/4/7/6.png'
  Content type 'image/png' length 12469 bytes (12 KB)
  ==================================================
  downloaded 12 KB
  
  downloading  http://tile.openstreetmap.org/4/7/7.png 
  trying URL 'http://tile.openstreetmap.org/4/7/7.png'
  Content type 'image/png' length 16067 bytes (15 KB)
  ==================================================
  downloaded 15 KB
  
  downloading  http://tile.openstreetmap.org/4/7/8.png 
  trying URL 'http://tile.openstreetmap.org/4/7/8.png'
  Content type 'image/png' length 364 bytes
  ==================================================
  downloaded 364 bytes
  
  downloading  http://tile.openstreetmap.org/4/8/6.png 
  trying URL 'http://tile.openstreetmap.org/4/8/6.png'
  Content type 'image/png' length 16429 bytes (16 KB)
  ==================================================
  downloaded 16 KB
  
  downloading  http://tile.openstreetmap.org/4/8/7.png 
  trying URL 'http://tile.openstreetmap.org/4/8/7.png'
  Content type 'image/png' length 20485 bytes (20 KB)
  ==================================================
  downloaded 20 KB
  
  downloading  http://tile.openstreetmap.org/4/8/8.png 
  trying URL 'http://tile.openstreetmap.org/4/8/8.png'
  Content type 'image/png' length 11338 bytes (11 KB)
  ==================================================
  downloaded 11 KB
  
  downloading  http://tile.openstreetmap.org/4/9/6.png 
  trying URL 'http://tile.openstreetmap.org/4/9/6.png'
  Content type 'image/png' length 22201 bytes (21 KB)
  ==================================================
  downloaded 21 KB
  
  downloading  http://tile.openstreetmap.org/4/9/7.png 
  trying URL 'http://tile.openstreetmap.org/4/9/7.png'
  Content type 'image/png' length 19847 bytes (19 KB)
  ==================================================
  downloaded 19 KB
  
  downloading  http://tile.openstreetmap.org/4/9/8.png 
  trying URL 'http://tile.openstreetmap.org/4/9/8.png'
  Content type 'image/png' length 21206 bytes (20 KB)
  ==================================================
  downloaded 20 KB
  
  reprojecting
  reprojecting:   10  cycles:1  2  3  4  5  6  7  8  9  9 
  >   myplot(myPoints)
  > 
  > print(12)  
  [1] 12
  > #'
  > #'   
  > #' ams city hall
  > #+ ams
  >   cityHall = vect(cbind(4.891111, 52.373056),
  +     crs=crsLL)
  > #  cityHall = spTransform(cityHall,CRS("+init=epsg:28992"))
  >   cityHall = project(cityHall,crs("+init=epsg:32631"))
  >   mytiles = openmap(cityHall, buffer=50)
  zoom is  17 ,  6 tiles
  http://tile.openstreetmap.org/ 
  http://tile.openstreetmap.org/ 
  downloading  http://tile.openstreetmap.org/17/67316/43072.png 
  trying URL 'http://tile.openstreetmap.org/17/67316/43072.png'
  Content type 'image/png' length 24918 bytes (24 KB)
  ==================================================
  downloaded 24 KB
  
  downloading  http://tile.openstreetmap.org/17/67316/43073.png 
  trying URL 'http://tile.openstreetmap.org/17/67316/43073.png'
  Content type 'image/png' length 22523 bytes (21 KB)
  ==================================================
  downloaded 21 KB
  
  downloading  http://tile.openstreetmap.org/17/67316/43074.png 
  trying URL 'http://tile.openstreetmap.org/17/67316/43074.png'
  Content type 'image/png' length 27092 bytes (26 KB)
  ==================================================
  downloaded 26 KB
  
  downloading  http://tile.openstreetmap.org/17/67317/43072.png 
  trying URL 'http://tile.openstreetmap.org/17/67317/43072.png'
  Content type 'image/png' length 24171 bytes (23 KB)
  ==================================================
  downloaded 23 KB
  
  downloading  http://tile.openstreetmap.org/17/67317/43073.png 
  trying URL 'http://tile.openstreetmap.org/17/67317/43073.png'
  Content type 'image/png' length 24182 bytes (23 KB)
  ==================================================
  downloaded 23 KB
  
  downloading  http://tile.openstreetmap.org/17/67317/43074.png 
  trying URL 'http://tile.openstreetmap.org/17/67317/43074.png'
  Content type 'image/png' length 21822 bytes (21 KB)
  ==================================================
  downloaded 21 KB
  
  reprojecting
  reprojecting:   2  cycles:1  1 
  > 
  >   map.new(mytiles)
  >   plot(mytiles, add=TRUE)
  >   points(cityHall, pch=3, col='blue',cex=4)
  >   scaleBar(mytiles, 'topleft', bty='n', col='red')
  > #'  
  >   
  >   if(!interactive()) dev.off()
  null device 
            1 
  > 
  > proc.time()
     user  system elapsed 
    56.56    4.98   62.98