Importing Maxent output into ArcGIS for additional analysis

2,636 views
Skip to first unread message

Shab Sangay

unread,
May 22, 2011, 10:05:08 PM5/22/11
to Maxent
Hi,
I was trying to model habitat of red panda in Bhutan using the Maxent
soft ware and ArcGIS. The thing I am trying to do is that overlay the
maxent output map with the human population layer on the ArcGIS. But
it is not possible as the coordinate system and grid size is
different. Does anyone know how to make the Maxent output compactable
to be used in ArcGIS? The coordinate system of ArcGIS layer is WGS
84.

John Baumgartner

unread,
May 22, 2011, 11:50:08 PM5/22/11
to maxent
Hi,

The following should work:

  1. In ArcMap, convert your Maxent .asc output to a raster with the ASCII to Raster tool, with Output Data Type set to 'Float'.
  2. Use the Define Projection tool (Data Management Tools > Projections and Transformations) to assign a coordinate reference system to your Maxent output raster. (you need to select the appropriate geographic or projected coordinate system, which is whatever system the original data (environmental and species occurrence data given to Maxent) was in.
  3. Make sure your human population layer has a coordinate reference system specified (it sounds like you've done this... right-click the layer and go to Properties, then view the Source information to make sure the Spatial Reference (or Coordinate System) does not say 'undefined'. If it's not defined, you need to use the Define Projection tool on this layer as well, specifying WGS 84 (in your case).
  4. If the active data frame has a Coordinate System specified, ArcMap should project the layers on the fly as necessary to the data frame's coordinate system. To check, right-click the data frame in the table of contents (the yellow stack icon, below which all your layers are listed), and click Properties. Click the Coordinate System tab and if it's undefined, find and select an appropriate coordinate system (whatever projection you want your maps to be displayed in). 
  5. If your layers are not aligned correctly, you may have mis-specified the coordinate system for one or more layers.
Good luck,

John





--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To post to this group, send email to max...@googlegroups.com.
To unsubscribe from this group, send email to maxent+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maxent?hl=en.




--
John Baumgartner
PhD Candidate
The School of Botany
The University of Melbourne
Parkville, Vic, 3010
Australia

sangay dorji

unread,
May 23, 2011, 9:01:53 AM5/23/11
to max...@googlegroups.com
Dear john and Martina,
Thank you very much for the guidelines. It really worked well. Requesting for another help, I am confused about using environmental layers in addition to Bioclim layers. I have converted the DEM file into ASCII files, and land cover vector layer was first converted into raster and then to ASCII file. Now, do I need to extract slope, aspect, elevation for each point of my red panda location data or can I use those layers as a back ground layer like the Bioclim layers. I have also made pixel size of all layers as 50m x 50m. Do you think it is an appropriate pixel size.


Please advice me further.

Cheers,

Sangay

John Baumgartner

unread,
May 23, 2011, 10:00:54 AM5/23/11
to maxent
Hi again Sangay,

There are two ways to provide predictor data to Maxent, either in a SWD (samples with data, p 21 of the Maxent Tutorial), or as a directory of ASCII files. For the SWD approach, you would need to intersect each occurrence point with each of the predictor variables you're including in your model, so that you end up with a .csv file that has columns for 'species', 'longitude', 'latitude', as well as a column for each of the predictor variables. Each row is a separate occurrence record. You can also provide background data manually in SWD format, by generating a random sample of background points and intersecting with your enviro layers. Alternatively you can provide a directory of ASCII files, and let Maxent take its own random sample (default is 10,000 points, I believe) of the 'background'. This SWD method can save on processing time, so it's useful if the extent of the area you're modelling is very large. 

If you are NOT using the SWD approach, then you simply make sure the ASCII files for all your environmental predictors (Bioclim, slope, aspect, elevation, etc.) are in the same directory, and specify that as your Environmental Layers directory.

For a discussion of pixel size, the following might be worth a read... I'm sure there are other useful refs, but it's midnight and can't access that part of my brain right now ;) 
Guisan et al. Sensitivity of predictive species distribution models to change in grain size. Diversity and Distribution 2007 

Good luck,

John

sangay dorji

unread,
May 25, 2011, 4:21:54 AM5/25/11
to max...@googlegroups.com
Hi all,

Thanks for your valuable suggestions once again. Sorry for bringing up numerous issues here due lack of good GIS background. I got another issue again. When I was trying to run the Maxent with the Bioclim data and environmental data (DEM and Vegetation data), but it gives me an error message stating the dem and vegetation layer have different geographic dimensions comparing to Bioclims. I tried to re-scale all my layers to my original layer cell size (90,90), but it still gives me the same problem. But I did not had any problem in running the output using Bioclim variables only. I tried to consult people around and also referred past suggestions in this forum, but nothing helped. Do you have any suggestions?

Thanks again.

Sangay

Heather Peacock

unread,
May 25, 2011, 11:30:51 AM5/25/11
to max...@googlegroups.com
Hi Sangay,

You need to resample your other environmental layers to fit the resolution and extent of the WC data.  I also had some issues with this when I did it, apparently Maxent needs them to be exact.  I had to define the extent of the environmental layers in Arc using a WC layer and define the resolution of the other enviro layers by selecting a WC layer.

Hope this helps.

Heather

sangay dorji

unread,
May 30, 2011, 6:30:23 AM5/30/11
to max...@googlegroups.com
Hi all,
I have a problem of different raster dimension for 2 raster files (rows and columns are not equal for two raster layers). I have observed RMS error of 0.75, so if I draw a common boundary for two rasters, it is passing at different location of the cell and hence the resultant clipped raster showing different dimensions. Please some one advice me how to solve this problem.

Sangay

John Baumgartner

unread,
May 30, 2011, 8:39:25 PM5/30/11
to max...@googlegroups.com
Hi Sangay,

Are you using ArcGIS? If so, and you have a Spatial Analyst license, then a fairly straightforward way to achieve identical raster extent and cell size is to use the raster calculator. 

Firstly, set Snap Raster, Cell Size and Processing Extent to the raster that you want all other rasters to match. In ArcGIS 9.3 this is done via Options in the Spatial Analyst drop down on your toolbar (from memory). For ArcGIS 10, you set these variables in the Geoprocessing Environment options (Geoprocessing menu > Environment...), or, to set them temporarily (i.e. Just for the particular instance of the raster calculator tool) you can use the Environment button in the Raster Calculator dialog window. 

Once these variables are set, you can use Raster Calculator (9.3: access via Spatial Analyst toolbar; 10: access via Map Algebra > Raster Calculator in the Spatial Analyst toolbox) to clip the rasters to the specified extent, with the specified cell size. For 9.3, do this by simply typing [layername] (if you don't have the raster loaded as a layer in ArcMap, I think you can enter c:\path\to\filename instead... Not sure) into the expression dialog, and click evaluate. In ArcMap 10, I believe you need to have the raster loaded as a layer (or use Python), and similarly, just double click the layer name, and run. 

There's always the Clip tool, but I find that raster calculator works well for me.

ArcGIS 9.3:
http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Setting_the_extent_for_tools_run_via_the_Spatial_Analyst_toolbar

sangay dorji

unread,
May 31, 2011, 3:59:58 AM5/31/11
to max...@googlegroups.com
Dear John,
Thank you very much. It worked really well. Again, I am having some problem with my presence csv data. There is an error message saying my point data is out of bounding box. The point data have a same projection as the other layers. The same csv worked well with the WC ascii layers before WC layers has been clipped and resized. Now it is giving this error and still cannot run the program. I tried different methods, but cannot find a solution yet. Can you please help me again.

Thanks to all others as well.

Cheers

John Baumgartner

unread,
May 31, 2011, 9:59:12 AM5/31/11
to max...@googlegroups.com
Hi Sangay,

It might be worth opening one of your ASCIIs in a text editor and taking a look at the header information. Are you sure all of the lat/longs fall within the ASCIIs extent? i.e. Are any longitudes less than xllcorner, or greater than (xllcorner + (ncols*cellsize))? Are any latitudes less than yllcorner or greater than (yllcorner + (nrows*cellsize))?

John

sangay dorji

unread,
Jun 1, 2011, 12:17:27 AM6/1/11
to max...@googlegroups.com

Dear John and others,
Thanks again. Yes! I have checked my ASCIIs and they all have the same cell size, yllcorner, xllcorner and etc. My problem now is with my point data (csv file). It runs ok with the climate data, but I doesn't work my new ascii files which I resized. It is showing the same error message saying my point........x and ......y is out of bounding box. I tried all the ways that came into my mind to solve the problem, but could not handle this problem. Hi everyone, please advice me who had experienced similar problem in the past and resolved it. 

Cheers,

Sangay

John Baumgartner

unread,
Jun 1, 2011, 12:23:00 AM6/1/11
to max...@googlegroups.com
Can you copy and paste the header info from one of your clipped ASCIIs, as well as the minimum and maximum values for x and y in your .csv?

Also, are your decimal points periods ('.') or commas (',')?

John
Reply all
Reply to author
Forward
0 new messages