0

Hope someone here can help me with this, or know where I can ask.

I have made a distribution model using maxent (versio 3.3.3) in R (dismo package), and thereafter made a map of limiting factors as described in the appendix of Elith et. al. (http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2010.00036.x/full), using the maxent software through the windows cmd window. The instructions have worked fine, and I now have the limiting factors map in a file called lf_map.asc (ca 10 GB). In order to open the map in ArcGis, I have imported the asc-file as a raster into R, and saved it as a tif-file, using this R-script:

lf_map<- raster("//home//...//lf_map.asc")

writeRaster(lf_map,"//home//...//lf_map.tif")

When I open it in ArcGis, the different variables(factors) from the model have the names 0-4 in the map (I have 5 variables in the model), but now I don't know which variables belong to which number. I have also tried to use the ASCII to Raster (Conversion) tool in ArcGis, but the names still come out as 0 to 4, and not as the names of the variables. Does anyone know how to find out this?

Best regards

Kristin

Kristin W
  • 33
  • 3
  • Check this: http://stackoverflow.com/questions/26763013/r-write-rasterstack-and-preserve-layer-names – Lucas Fortini Mar 24 '15 at 18:15
  • Thank you for looking into my question. I think this is a bit different though. I have only one lm_map.asc file that I want to use in the writeRaster function, not a raster stack. This raster has 5 values, and each value correspond to one of the layers(rasters) used to make the lf_map.asc file with the Maxent software, and these are the layer(raster)names that I want to preserve. Either the names disappear when I'm making the lm_map.asc file with the maxent software, or they disappear when I'm converting the asc-file to tif using R or ArcGis as explained above. – Kristin W Mar 25 '15 at 08:07
  • I stumbled over the answer myself: see below – Kristin W Apr 03 '15 at 10:51

1 Answers1

0

I stumbled over the answer myself: I checked the cmd-window where I had run the script for the Limiting factors.map (it was still available, since it was in a detached screen), and now I saw that when the process was finished, the information about which number equaled which variable was printed in the cmd-window. Apparently, the variables were sorted alphabetically. 0=Aspect; 1= Mean summer temp etc.

Kristin W
  • 33
  • 3