I am trying to use Maxent.jar. This program uses a CSV file of points and ascii bioclim layers (basically, a map of the Americas with climate data) and overlays them on top of one another.

I find that my points and ascii files line up correctly when I use them in R (first image), but when I input the very same files into Maxent.jar, they do not line up correctly. In Maxent.jar plots (second image), the points (which are white in the Maxent plot) are too small compared to the map and are shifted too far north.

Points overlain on ascii file in R: correct Points (white dots) overlain on ascii file in Maxent.jar: incorrect

My original data (bioclim layers and points) had a Lat/Lon projection, and the bioclim layers were rasters. I used R to project the points and the layers to the Lambert Azimuthal Equal Area projection you can see in the images. Then I used R to convert the bioclim rasters into ascii using the following code from the rgdal library:

    writeGDAL(as(MyRaster, "SpatialGridDataFrame"), MyFilePath, 
        drivername = "AAIGrid")}

Obviously, there are many potential problems with geospatial data that can result in points being plotted incorrectly onto a map. What's really baffling me here is that the points plot correctly in one program and not in another. I even read the ascii file back into R and plotted my points onto that (rather than using my original raster), and everything still works perfectly in R. I have also confirmed that the header of the ascii file (showing the the number of rows and columns and the cell dimensions) exactly matches the dimensions of my original raster.

Does anyone have suggestions for why R would plot points onto an ascii file correctly, but another program would not?

Or has anyone had this specific problem with Maxent.jar?

Your Answer

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

Browse other questions tagged or ask your own question.