2

I imported one of my rasters into ArcMap to see how it is displayed in this program and noticed that it's values do not correspond to the same values I had in R.

Here are some screen caps:

In R:

enter image description here

Info about the raster (.asc format) in R:

  Formal class 'RasterLayer' [package "raster"] with 12 slots
  ..@ file    :Formal class '.RasterFile' [package "raster"] with 13 slots
  .. .. ..@ name        : chr "D:\\Users\\cost_guinea_29N.asc"
  .. .. ..@ datanotation: chr "FLT4S"
  .. .. ..@ byteorder   : chr "little"
  .. .. ..@ nodatavalue : num -Inf
  .. .. ..@ NAchanged   : logi FALSE
  .. .. ..@ nbands      : int 1
  .. .. ..@ bandorder   : chr "BIL"
  .. .. ..@ offset      : int 0
  .. .. ..@ toptobottom : logi TRUE
  .. .. ..@ blockrows   : int 1
  .. .. ..@ blockcols   : int 909
  .. .. ..@ driver      : chr "gdal"
  .. .. ..@ open        : logi FALSE
  ..@ data    :Formal class '.SingleLayerData' [package "raster"] with 13 slots
  .. .. ..@ values    : logi(0) 
  .. .. ..@ offset    : num 0
  .. .. ..@ gain      : num 1
  .. .. ..@ inmemory  : logi FALSE
  .. .. ..@ fromdisk  : logi TRUE
  .. .. ..@ isfactor  : logi FALSE
  .. .. ..@ attributes: list()
  .. .. ..@ haveminmax: logi FALSE
  .. .. ..@ min       : num Inf
  .. .. ..@ max       : num -Inf
  .. .. ..@ band      : int 1
  .. .. ..@ unit      : chr ""
  .. .. ..@ names     : chr "cost_guinea_29N"
  ..@ legend  :Formal class '.RasterLegend' [package "raster"] with 5 slots
  .. .. ..@ type      : chr(0) 
  .. .. ..@ values    : logi(0) 
  .. .. ..@ color     : logi(0) 
  .. .. ..@ names     : logi(0) 
  .. .. ..@ colortable: logi(0) 
  ..@ title   : chr(0) 
  ..@ extent  :Formal class 'Extent' [package "raster"] with 4 slots
  .. .. ..@ xmin: num -176511
  .. .. ..@ xmax: num 654315
  .. .. ..@ ymin: num 790241
  .. .. ..@ ymax: num 1408105
  ..@ rotated : logi FALSE
  ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
  .. .. ..@ geotrans: num(0) 
  .. .. ..@ transfun:function ()  
  ..@ ncols   : int 909
  ..@ nrows   : int 676
  ..@ crs     :Formal class 'CRS' [package "sp"] with 1 slot
  .. .. ..@ projargs: chr NA
  ..@ history : list()
  ..@ z       : list()

In ArcMap: enter image description here

Info about raster in ArcMap: enter image description here

enter image description here

Same layer, same source, same format, but different values.. why? R seems to display the correct values whereas ArcMap doesn't.

  • 1
    You just need to compile statistics. – Vince Jan 26 '18 at 11:36
5

R is displaying scientific notation whereas ArcGIS is displaying nonsense because the data is an ASCII Grid format and does not have associated statistics. To get ArcMAP to display real values, expand the catalog window, navigate to the ASCII Grid, right-click on the grid and select "Calculate Statistics". Then you can drag-and-drop the grid directly into ArcMAP. You could also use the Calculate Statistics tool under Data Management in the ArcToolbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.