dimension_values
Query coordinate values for all dimensions of a data cube
Description
Dimension values give the coordinates along the spatial and temporal axes of a data cube.
Usage
dimension_values (obj, datetime_unit = NULL )
Arguments
obj
a data cube proxy (class cube), or a data cube view object
datetime_unit
unit used to format values in the datetime dimension, one of “Y”, “m”, “d”, “H”, “M”, “S”, defaults to the unit of the cube.
Value
list with elements t,y,x
Examples
# create image collection from example Landsat data only
# if not already done in other examples
if (! file.exists (file.path (tempdir (), "L8.db" ))) {
L8_files <- list.files (system.file ("L8NY18" , package = "gdalcubes" ),
".TIF" , recursive = TRUE , full.names = TRUE )
create_image_collection (L8_files, "L8_L1TP" , file.path (tempdir (), "L8.db" ), quiet = TRUE )
}
L8.col = image_collection (file.path (tempdir (), "L8.db" ))
v = cube_view (extent= list (left= 388941.2 , right= 766552.4 ,
bottom= 4345299 , top= 4744931 , t0= "2018-04" , t1= "2018-06" ),
srs= "EPSG:32618" , nx = 497 , ny= 526 , dt= "P1M" )
dimension_values (raster_cube (L8.col, v))
$t
[1] "2018-04-01" "2018-05-01" "2018-06-01"
$y
[1] 4345299 4346059 4346819 4347578 4348338 4349098 4349858 4350617 4351377
[10] 4352137 4352897 4353656 4354416 4355176 4355936 4356695 4357455 4358215
[19] 4358975 4359734 4360494 4361254 4362014 4362773 4363533 4364293 4365053
[28] 4365812 4366572 4367332 4368092 4368851 4369611 4370371 4371131 4371890
[37] 4372650 4373410 4374170 4374930 4375689 4376449 4377209 4377969 4378728
[46] 4379488 4380248 4381008 4381767 4382527 4383287 4384047 4384806 4385566
[55] 4386326 4387086 4387845 4388605 4389365 4390125 4390884 4391644 4392404
[64] 4393164 4393923 4394683 4395443 4396203 4396962 4397722 4398482 4399242
[73] 4400001 4400761 4401521 4402281 4403041 4403800 4404560 4405320 4406080
[82] 4406839 4407599 4408359 4409119 4409878 4410638 4411398 4412158 4412917
[91] 4413677 4414437 4415197 4415956 4416716 4417476 4418236 4418995 4419755
[100] 4420515 4421275 4422034 4422794 4423554 4424314 4425073 4425833 4426593
[109] 4427353 4428112 4428872 4429632 4430392 4431152 4431911 4432671 4433431
[118] 4434191 4434950 4435710 4436470 4437230 4437989 4438749 4439509 4440269
[127] 4441028 4441788 4442548 4443308 4444067 4444827 4445587 4446347 4447106
[136] 4447866 4448626 4449386 4450145 4450905 4451665 4452425 4453184 4453944
[145] 4454704 4455464 4456223 4456983 4457743 4458503 4459262 4460022 4460782
[154] 4461542 4462302 4463061 4463821 4464581 4465341 4466100 4466860 4467620
[163] 4468380 4469139 4469899 4470659 4471419 4472178 4472938 4473698 4474458
[172] 4475217 4475977 4476737 4477497 4478256 4479016 4479776 4480536 4481295
[181] 4482055 4482815 4483575 4484334 4485094 4485854 4486614 4487373 4488133
[190] 4488893 4489653 4490413 4491172 4491932 4492692 4493452 4494211 4494971
[199] 4495731 4496491 4497250 4498010 4498770 4499530 4500289 4501049 4501809
[208] 4502569 4503328 4504088 4504848 4505608 4506367 4507127 4507887 4508647
[217] 4509406 4510166 4510926 4511686 4512445 4513205 4513965 4514725 4515484
[226] 4516244 4517004 4517764 4518524 4519283 4520043 4520803 4521563 4522322
[235] 4523082 4523842 4524602 4525361 4526121 4526881 4527641 4528400 4529160
[244] 4529920 4530680 4531439 4532199 4532959 4533719 4534478 4535238 4535998
[253] 4536758 4537517 4538277 4539037 4539797 4540556 4541316 4542076 4542836
[262] 4543595 4544355 4545115 4545875 4546635 4547394 4548154 4548914 4549674
[271] 4550433 4551193 4551953 4552713 4553472 4554232 4554992 4555752 4556511
[280] 4557271 4558031 4558791 4559550 4560310 4561070 4561830 4562589 4563349
[289] 4564109 4564869 4565628 4566388 4567148 4567908 4568667 4569427 4570187
[298] 4570947 4571706 4572466 4573226 4573986 4574746 4575505 4576265 4577025
[307] 4577785 4578544 4579304 4580064 4580824 4581583 4582343 4583103 4583863
[316] 4584622 4585382 4586142 4586902 4587661 4588421 4589181 4589941 4590700
[325] 4591460 4592220 4592980 4593739 4594499 4595259 4596019 4596778 4597538
[334] 4598298 4599058 4599817 4600577 4601337 4602097 4602857 4603616 4604376
[343] 4605136 4605896 4606655 4607415 4608175 4608935 4609694 4610454 4611214
[352] 4611974 4612733 4613493 4614253 4615013 4615772 4616532 4617292 4618052
[361] 4618811 4619571 4620331 4621091 4621850 4622610 4623370 4624130 4624889
[370] 4625649 4626409 4627169 4627928 4628688 4629448 4630208 4630968 4631727
[379] 4632487 4633247 4634007 4634766 4635526 4636286 4637046 4637805 4638565
[388] 4639325 4640085 4640844 4641604 4642364 4643124 4643883 4644643 4645403
[397] 4646163 4646922 4647682 4648442 4649202 4649961 4650721 4651481 4652241
[406] 4653000 4653760 4654520 4655280 4656039 4656799 4657559 4658319 4659078
[415] 4659838 4660598 4661358 4662118 4662877 4663637 4664397 4665157 4665916
[424] 4666676 4667436 4668196 4668955 4669715 4670475 4671235 4671994 4672754
[433] 4673514 4674274 4675033 4675793 4676553 4677313 4678072 4678832 4679592
[442] 4680352 4681111 4681871 4682631 4683391 4684150 4684910 4685670 4686430
[451] 4687189 4687949 4688709 4689469 4690229 4690988 4691748 4692508 4693268
[460] 4694027 4694787 4695547 4696307 4697066 4697826 4698586 4699346 4700105
[469] 4700865 4701625 4702385 4703144 4703904 4704664 4705424 4706183 4706943
[478] 4707703 4708463 4709222 4709982 4710742 4711502 4712261 4713021 4713781
[487] 4714541 4715300 4716060 4716820 4717580 4718340 4719099 4719859 4720619
[496] 4721379 4722138 4722898 4723658 4724418 4725177 4725937 4726697 4727457
[505] 4728216 4728976 4729736 4730496 4731255 4732015 4732775 4733535 4734294
[514] 4735054 4735814 4736574 4737333 4738093 4738853 4739613 4740372 4741132
[523] 4741892 4742652 4743411 4744171
$x
[1] 388941.2 389701.0 390460.8 391220.5 391980.3 392740.1 393499.9 394259.7
[9] 395019.4 395779.2 396539.0 397298.8 398058.6 398818.4 399578.1 400337.9
[17] 401097.7 401857.5 402617.3 403377.0 404136.8 404896.6 405656.4 406416.2
[25] 407175.9 407935.7 408695.5 409455.3 410215.1 410974.9 411734.6 412494.4
[33] 413254.2 414014.0 414773.8 415533.5 416293.3 417053.1 417812.9 418572.7
[41] 419332.4 420092.2 420852.0 421611.8 422371.6 423131.3 423891.1 424650.9
[49] 425410.7 426170.5 426930.3 427690.0 428449.8 429209.6 429969.4 430729.2
[57] 431488.9 432248.7 433008.5 433768.3 434528.1 435287.8 436047.6 436807.4
[65] 437567.2 438327.0 439086.8 439846.5 440606.3 441366.1 442125.9 442885.7
[73] 443645.4 444405.2 445165.0 445924.8 446684.6 447444.3 448204.1 448963.9
[81] 449723.7 450483.5 451243.2 452003.0 452762.8 453522.6 454282.4 455042.2
[89] 455801.9 456561.7 457321.5 458081.3 458841.1 459600.8 460360.6 461120.4
[97] 461880.2 462640.0 463399.7 464159.5 464919.3 465679.1 466438.9 467198.7
[105] 467958.4 468718.2 469478.0 470237.8 470997.6 471757.3 472517.1 473276.9
[113] 474036.7 474796.5 475556.2 476316.0 477075.8 477835.6 478595.4 479355.1
[121] 480114.9 480874.7 481634.5 482394.3 483154.1 483913.8 484673.6 485433.4
[129] 486193.2 486953.0 487712.7 488472.5 489232.3 489992.1 490751.9 491511.6
[137] 492271.4 493031.2 493791.0 494550.8 495310.6 496070.3 496830.1 497589.9
[145] 498349.7 499109.5 499869.2 500629.0 501388.8 502148.6 502908.4 503668.1
[153] 504427.9 505187.7 505947.5 506707.3 507467.0 508226.8 508986.6 509746.4
[161] 510506.2 511266.0 512025.7 512785.5 513545.3 514305.1 515064.9 515824.6
[169] 516584.4 517344.2 518104.0 518863.8 519623.5 520383.3 521143.1 521902.9
[177] 522662.7 523422.5 524182.2 524942.0 525701.8 526461.6 527221.4 527981.1
[185] 528740.9 529500.7 530260.5 531020.3 531780.0 532539.8 533299.6 534059.4
[193] 534819.2 535578.9 536338.7 537098.5 537858.3 538618.1 539377.9 540137.6
[201] 540897.4 541657.2 542417.0 543176.8 543936.5 544696.3 545456.1 546215.9
[209] 546975.7 547735.4 548495.2 549255.0 550014.8 550774.6 551534.4 552294.1
[217] 553053.9 553813.7 554573.5 555333.3 556093.0 556852.8 557612.6 558372.4
[225] 559132.2 559891.9 560651.7 561411.5 562171.3 562931.1 563690.8 564450.6
[233] 565210.4 565970.2 566730.0 567489.8 568249.5 569009.3 569769.1 570528.9
[241] 571288.7 572048.4 572808.2 573568.0 574327.8 575087.6 575847.3 576607.1
[249] 577366.9 578126.7 578886.5 579646.3 580406.0 581165.8 581925.6 582685.4
[257] 583445.2 584204.9 584964.7 585724.5 586484.3 587244.1 588003.8 588763.6
[265] 589523.4 590283.2 591043.0 591802.8 592562.5 593322.3 594082.1 594841.9
[273] 595601.7 596361.4 597121.2 597881.0 598640.8 599400.6 600160.3 600920.1
[281] 601679.9 602439.7 603199.5 603959.2 604719.0 605478.8 606238.6 606998.4
[289] 607758.2 608517.9 609277.7 610037.5 610797.3 611557.1 612316.8 613076.6
[297] 613836.4 614596.2 615356.0 616115.7 616875.5 617635.3 618395.1 619154.9
[305] 619914.7 620674.4 621434.2 622194.0 622953.8 623713.6 624473.3 625233.1
[313] 625992.9 626752.7 627512.5 628272.2 629032.0 629791.8 630551.6 631311.4
[321] 632071.1 632830.9 633590.7 634350.5 635110.3 635870.1 636629.8 637389.6
[329] 638149.4 638909.2 639669.0 640428.7 641188.5 641948.3 642708.1 643467.9
[337] 644227.6 644987.4 645747.2 646507.0 647266.8 648026.6 648786.3 649546.1
[345] 650305.9 651065.7 651825.5 652585.2 653345.0 654104.8 654864.6 655624.4
[353] 656384.1 657143.9 657903.7 658663.5 659423.3 660183.0 660942.8 661702.6
[361] 662462.4 663222.2 663982.0 664741.7 665501.5 666261.3 667021.1 667780.9
[369] 668540.6 669300.4 670060.2 670820.0 671579.8 672339.5 673099.3 673859.1
[377] 674618.9 675378.7 676138.5 676898.2 677658.0 678417.8 679177.6 679937.4
[385] 680697.1 681456.9 682216.7 682976.5 683736.3 684496.0 685255.8 686015.6
[393] 686775.4 687535.2 688294.9 689054.7 689814.5 690574.3 691334.1 692093.9
[401] 692853.6 693613.4 694373.2 695133.0 695892.8 696652.5 697412.3 698172.1
[409] 698931.9 699691.7 700451.4 701211.2 701971.0 702730.8 703490.6 704250.4
[417] 705010.1 705769.9 706529.7 707289.5 708049.3 708809.0 709568.8 710328.6
[425] 711088.4 711848.2 712607.9 713367.7 714127.5 714887.3 715647.1 716406.8
[433] 717166.6 717926.4 718686.2 719446.0 720205.8 720965.5 721725.3 722485.1
[441] 723244.9 724004.7 724764.4 725524.2 726284.0 727043.8 727803.6 728563.3
[449] 729323.1 730082.9 730842.7 731602.5 732362.3 733122.0 733881.8 734641.6
[457] 735401.4 736161.2 736920.9 737680.7 738440.5 739200.3 739960.1 740719.8
[465] 741479.6 742239.4 742999.2 743759.0 744518.7 745278.5 746038.3 746798.1
[473] 747557.9 748317.7 749077.4 749837.2 750597.0 751356.8 752116.6 752876.3
[481] 753636.1 754395.9 755155.7 755915.5 756675.2 757435.0 758194.8 758954.6
[489] 759714.4 760474.2 761233.9 761993.7 762753.5 763513.3 764273.1 765032.8
[497] 765792.6