Geospatial Modelling Environment & R

3218
5
03-05-2013 03:47 PM
KristinMeseck1
New Contributor II
Hi,

I'm relatively new to R and the Geospatial Modelling Environment (GME tools) that I'm using but quite used to Arc. I've been trying to use the "Distance Among Points" tool in GME (the code is below) but I keep getting the following two errors: Error: The command text could not be interpreted. Please check the syntax of the command. Error: An important error has occurred. Please include the information below if you submit a query about this error. Exception of type 'System.OutOfMemoryException' was thrown.

I have no idea what's wrong with my syntax, especially since the GME has a very good gui. And I realize that the OutOfMemoryException might be caused by one of many things. Essentially, any help would be greatly appreciated.



pointdistances(in="C:\All Data Files\My Documents All\My Documents\SDSU\Thesis\Data\GPS Data All\GIS\Model\ModelOutput\New File Geodatabase.gdb!PresEquiDist", fld="OBJECTID", out="C:\All Data Files\My Documents All\My Documents\SDSU\Thesis\Data\GPS Data All\GIS\Model\ModelOutput\GMEoutput\GMEpointDist2", in2="C:\All Data Files\My Documents All\My Documents\SDSU\Thesis\Data\GPS Data All\GIS\Model\ModelOutput\New File Geodatabase.gdb!RasttoPoint", fld2="OBJECTID");

-Kristin
0 Kudos
5 Replies
JeffreyEvans
Occasional Contributor III
Kristin,
R, and conversely GME, needs to read the entire problem into active memory. Because of this you have to account for the amount of RAM necessary to address the problem. This is particularly true for matrix type operations. For spatial modeling using R it is quite necessary to run a 64-bit OS with at least 6GB RAM. If that is the case I would look at your R installation. When you install R it, by default, installs both 32-bit and 64-bit versions of the software. There is a possibility that, if the 32-bit version is installed, that GME is pointing to it and not the 64-bit version. There may be a way to reconfigure GME to point to a specific R installation. Otherwise you could uninstall R and then when you reinstall customize your setup and unselect the 32-bit assembly.

Not to be critical of Hawth Beyer's fine work on GME but, I would encourage you to just learn R. There is, admittedly, a learning curve but there are also considerable online resources as well as several active communities that provide support. Because of what I imagine are programming necessities many of the tools in GME are not necessary to ideal way to accomplish a given task. The results returned from Distance Among Points can be accomplished in a single line of code in the spdep library. With spatial objects being standardized around the sp class, the addition of the raster library for out-of-memory processing, a port to the geos topology Java library via rgeos for vector overlay and a port to GDAL via rgdal for reading/writing spatial raster/vector formats R is a fairly comprehensive software for complex spatial analysis.
0 Kudos
KristinMeseck1
New Contributor II
Hi Jeffrey,

Thank you so much for responding. Yes, learning R is definitely one of my goals (I'm a geography grad student) and I think you're right about using it directly and cutting out GME as the middle man. If it's an easy enough task to complete just using R then I see no reason to depend on another program (and have to fix the problems that occur with it). Thanks so much for your response!

-Kristin
0 Kudos
JeffreyEvans
Occasional Contributor III
Kristin,
I would recommend starting with the Venables classic "An Introduction to R" http://cran.r-project.org/doc/manuals/R-intro.pdf.

For learning spatial classes the ASDAR book is a must http://www.amazon.com/Applied-Spatial-Data-Analysis-Use/dp/0387781706/ref=sr_1_1?s=books&ie=UTF8&qid....

I also just started a Blog on spatial statistics in R.
http://jeffspatial.wordpress.com/
0 Kudos
KristinMeseck1
New Contributor II
Jeff,

Thanks so much for the recommendations. I do already have "Discovering Statistics Using R" (Field, Miles, & Field) which has been useful, but the more resources I have the better. Were you referring to the 'airdist' Measure distance from plot function in spdep? Do you know if that will measure the distance between points in two different plots or just distance between the points of one plot? The description isn't quite clear to me.

Best,

Kristin
0 Kudos
JeffreyEvans
Occasional Contributor III
Kristin,
No, airdist is not the function I am referring to. This is getting quite "off topic" from ESRI related content. Why don't you contact me off list (jeffrey_evans<at>tnc.org) and I can provide some further direction.
0 Kudos