[R-sig-Geo] Overlapping area Script

alice Hughes dr_achughes at hotmail.co.uk
Sun May 6 20:44:12 CEST 2012


Dear All

I would really appreciate some help with a script which a colleague wrote for me, but I am having problems running (and have not been able to contact my colleague).The script is designed to compare the area of suitable habitat in binary projections of a large number of species current and future distributions, and create an excel file detailing the total area suitable in the present and future scenario, in addition to the area which overlaps.These maps are made from Maxent outputs, which have been reclassified to give binary projections for each species and will be used to assess how climatic change may potentially effect the total area which is suitable for each species. However despite considerable effort I cannot get the attached script to run. It creates an excel with the first species current and future areas of suitable extent detailed, but "NA" for overlap, then gives error warnings (shown below), but changes I have tried have failed to make the script run any further (though I have generated new error messages...)Any help or advice would be very greatly appreciated, I can also send some example files of current and future distributions if anyone thinks they maybe able to help.Thanks and best wishes
Alice C Hughes 

"+ png(paste(out.dir, spp,'_overlap.png', sep=''), width=nrow(spp.asc),height=ncol(spp.asc), units='px', res=300, pointsize=5, bg='white') #start the plot+ par(mar=c(0,0,0,0)+0.1) #remove any plot margins+ image(overlap, ann=FALSE,axes=FALSE,col=cols, zlim=c(0,3)) #plot the richness+ legend.gradient(legend.pnts,cols=cols,limits=c(0,3), title='overlap', cex=2)+ dev.off()+ }Error in nrow(spp.asc) : object 'bat.asc' not foundIn addition: There were 12 warnings (use warnings() to see them)> > write.csv(overlap.matrix, paste(out.dir, "all_species.csv",sep=''))> "
Date: Fri, 17 Feb 2012 12:18:55 +0100
From: Roger.Bivand at nhh.no
To: michael.denslow at gmail.com
CC: r-sig-geo at r-project.org; skopp at esri.com
Subject: Re: [R-sig-Geo] R / ArcGIS

On Fri, 17 Feb 2012, Michael Denslow wrote:
 
> On Fri, Feb 17, 2012 at 2:15 AM, Edzer Pebesma
> <edzer.pebesma at uni-muenster.de> wrote:
>> Hi,
>>
>> I might succeed meeting with some ESRI / ArcGIS folks at AAG next week;
>> I'm in touch with them in particular about linking R to ArcGIS.
>>
>> I would like to find out if any of you has been successful (or
>> unsuccessful) in reading or writing ArcGIS geodatabase files directly
>> from R, by using the rgdal driver, or by some other means.
>
> Thanks for working on this. I have had success reading .mdb files but
> not .gdb files. I typically use rgdal for this sort of thing. I was
> under the impression that GDAL support for .gdb files started with
> 1.9.
 
This is off-topic here - the topic here is space-time data.
 
Your question is answered with respect to Personal geodatabases on the 
Windows platform in thread:
 
http://article.gmane.org/gmane.comp.lang.r.geo/13571
 
(link to gmane because it crosses a month boundary). You did join that 
thread, and said there that you are using OSX. You were able to open Pgeo 
files, I think. Are you thinking of the new file geodatabase format? If 
you read:
 
http://www.gdal.org/ogr/drv_filegdb.html
 
you will see that you must build GDAL linking to the proprietary FileGDB 
API SDK, which requires an ESRI global account. Reading the OGR format 
file would tell you that, no?
 
Roger
 
>
> I am very interested in this issue since I am a regular user of ArcGIS
> (teaching) and R (research).
>
> Michael
>
>
>>
>> Another issue is reading/writing spatio-temporal features  (netcdf does
>> spatio-temporal grids/arrays pretty well it seems); rumours go that
>> ArcGIS might, in the near future, support reading/writing SpatiaLite.
>>
>> With best regards,
>> --
>> Edzer Pebesma
>> Institute for Geoinformatics (ifgi), University of Münster
>> Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
>> 8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
>> http://www.52north.org/geostatistics      e.pebesma at wwu.de
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
>
 
-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120506/a2b53559/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: area2 (3).r
Type: application/octet-stream
Size: 3046 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120506/a2b53559/attachment.obj>


More information about the R-sig-Geo mailing list