R/SETPOLIMAP.R

Defines functions `SETPOLIMAP`

`SETPOLIMAP` <-
function()
  {

    MAP = list()

    MAP$LASI = list(x=RPMG::fmod(c(158.586782627612,181.362845379991,206.522449583200,239.362354016863,209.170828973012,206.522449583200,195.399256145992,194.869580268030,159.646134383536,93.7014875772293,20.6062164184311,6.30496771344882,25.3732993200918,28.8161925268468,29.6107063437903,25.9029751980541,20.6062164184311,17.1633232116761,18.752350845563,25.1084613811107,39.1448721471118,43.1174412318291,43.3822791708102,47.0900103165464,56.0945002419056,69.3363971909632,69.3363971909632,113.829170939797,156.203241176781), 360),
      y=c(-56.5650724720842,-49.8314996813474,-38.0958442460632,-24.8210864586105,5.5761849967158,22.3139230765474,54.2502968840421,65.7935645253053,79.645485694821,82.916078193179,82.1465270170947,79.0683223127579,70.0260959937684,67.3326668774737,63.1001354090105,60.7914818807579,56.9437260003368,52.9035823258947,45.0156827710316,44.2461315949474,40.5907635085474,38.6668855683368,30.9713738074947,21.9291474885053,20.0052695482947,13.0793089635369,-8.08334837877895,-36.1719663058526,-56.7574602661053))


### > DUMPLOC(LNAM)

    MAP$LNAM =list(x=RPMG::fmod(c(60.331904415964,73.0441248866266,87.0805349896499,99.2630796073682,101.381783019145,120.185275798667,131.573306636969,105.089513989755,57.9483630777148,31.9942462834454,12.6610776509794,11.8665638715629,21.9304050775042,39.1448702981931,59.8022285630198)+180, 360),
      y=c(33.6648029237895,29.6246592493474,28.4703324852211,24.6225766048,29.8170470433684,43.4765804188632,54.0579090900210,71.1804227578947,77.1444443725474,74.0662396682105,68.4869936416,58.6752161465263,53.2883579139368,55.7893992362105,33.4724151297684))

### LSAM = locator(type="l", col=2)
###  DUMPLOC(LSAM)
### >  DUMPLOC(LSAM)
    MAP$LSAM=list(x=RPMG::fmod(c(60.331904415964,72.2496111072102,87.6102108425942,96.3498624161747,96.3498624161747,98.2037279014797,101.911458872090,102.970810577978,106.943379475060,115.153355195696,123.893006769277,138.988768578189,147.463582225297,115.153355195696,116.212706901585,61.3912561218526)+180, 360),
      y=c(32.7028639536842,18.2737794021053,9.80871646517896,3.26753146846316,-2.88887794021052,-12.5082676412632,-24.6286986645895,-45.5989682128842,-58.1041748242526,-57.1422358541474,-51.5629898275368,-37.3262930699789,-4.04320470433684,14.6184113157053,22.3139230765474,32.5104761596632))

### LAFR =  locator(type="l", col=2)


### > DUMPLOC(LAFR)
    MAP$LAFR=list(x=RPMG::fmod(c(173.682536946039,167.591264637180,159.116450990071,163.618695740098,168.120940490124,179.244133401954,187.45410912259,190.367326313783,195.928922769698,221.883039563968,232.741394549325,239.627180637601,235.919449666991,225.325932608105,216.851118960997,206.787277755056,204.668574343279,209.965332872722,208.376305313889,196.723436549115,190.632164240255,178.449619622537)+180, 360),
      y=c(35.9734564520421,32.3180883656421,23.0834742526316,10.3858798472421,2.6903680864,0.958877940210531,-12.7006554352842,-28.0916789569684,-37.3262930699789,-33.6709249835789,-17.8951258738526,2.49798029237895,19.8128817542737,41.5527024786526,42.7070292427789,41.3603146846316,38.6668855683368,34.8191296879158,33.0876395417263,34.4343540998737,37.5125588042105,36.9353954221474))

### LEUR =  locator(type="l", col=2)
### DUMPLOC(LEUR)

    MAP$LEUR = list(x=RPMG::fmod(c(146.139392592937,152.230664901796,166.002237078347,175.271564504872,185.070567784341,190.897002166728,195.399246916754,202.814708857974,207.581791534472,210.230170799194,209.965332872722,200.960843372669,201.490519225613,205.727926049167,213.143387990387,212.348874210971,190.367326313783,155.938395872406,145.874554666464)+180, 360),
      y=c(39.051661156379,35.7810686580210,35.7810686580210,35.7810686580210,38.6668855683368,37.3201710101895,35.7810686580210,34.0495785118316,34.4343540998737,40.3983757145263,45.0156827710316,46.7471729172211,53.4807457079579,56.7513382063158,63.4849109970526,71.3728105519158,70.9880349638737,67.1402790834526,39.4364367444211))

 ###   MAP$LEUR$x[MAP$LEUR$x>180] = MAP$LEUR$x[MAP$LEUR$x>180]-360


    PNTSX = vector()
    PNTSY = vector()

 stks =  list(nam='', num=0, index=0, col=0, style=0)
 
    stks$nam   = names(MAP)
    stks$num = rep(0, length(MAP))
    stks$index = rep(0, length(MAP))
    stks$col = seq(from=2, to=length(MAP)+1)
     stks$style = rep(2, length(MAP))

    ind = 1
    no = 0
       for(i in 1:length(MAP))
      {
        n = length(MAP[[i]]$x)
        stks$num[i] = n
        PNTSX = c(PNTSX, MAP[[i]]$x)
        PNTSY = c(PNTSY, MAP[[i]]$y)


        
      }
k = cumsum(stks$num)
stks$index = c(0, k[1:(length(k)-1)])

    LMAP = list(STROKES=stks, POINTS=list(lat=PNTSY, lon=PNTSX))
   
    LMAP$POINTS$lon = RPMG::fmod( LMAP$POINTS$lon, 360)

    LMAP = boundGEOmap(LMAP)
   
    
    return(LMAP)


  }

Try the GEOmap package in your browser

Any scripts or data that you put into this service are public.

GEOmap documentation built on Sept. 1, 2023, 5:09 p.m.