269 reputation
110
bio website
location Ontario, Canada
age 40
visits member for 2 years, 7 months
seen Apr 13 at 17:16

I mainly use the statistical programming language R to solve problems, typically of a spatial, biological, and geographical nature. I have been using R since it was S-plus (back in the late 90s). Despite this I have an unfortunate tendency to resort to the for loop, which is not exactly favoured in R practice, probably because I learned to program using Turbo Pascal version 5.5!


Sep
24
awarded  Autobiographer
Jul
2
awarded  Curious
Feb
21
awarded  Popular Question
Mar
3
awarded  Yearling
Jul
4
accepted Correct use of the terms geographic, path, and Euclidean distance
Jul
4
comment Correct use of the terms geographic, path, and Euclidean distance
Utterly comprehensive and detailed answer! I thought that cost distance calculations were typically implemented using graph theory representations of rasters. The cost distances are, then, found as the minimum weight path through a weighted graph. While this may be a typical algorithmic solution, is the approach you imply likely to be more efficient?
May
17
comment Opening ArcGIS layer package in open source software?
Very helpful. As indicated in your figure, the shapefiles I was looking for were in commonData\Data0
May
17
accepted Opening ArcGIS layer package in open source software?
May
16
asked Opening ArcGIS layer package in open source software?
Apr
30
awarded  Commentator
Apr
30
comment How to intersect lines and polygons in R?
@Simbamangu it doesn't seem that gIntersection() will really do what you want. If your lines, forming a grid, were polygonized, it might work, but this is probably not what you want. I suggest asking this either on StackOverflow where more spatial R folks hang out, or on the R-sig-geo list where you'll reach the architects of rgeos and related tools.
Apr
24
accepted What are some examples of model-based upscaling of raster data?
Apr
22
comment How to intersect lines and polygons in R?
@Simbamangu I just used your files to run the above script, and I found that the line should be changed to: poly <- readShapePoly("poly.shp"). There are no files polygon.* in the zip you provided. It then worked for me, performing the intersection as expected. Could the error be as simple as loading the wrong shape file? (I am using rgeos package version 0.2-1 under R 2.14.2)
Apr
22
comment How to intersect lines and polygons in R?
It likely comes down to the format of your Spatial* object. Try producing a SpatialLines and a SpatialPolygons object from first principles and compare what you have there to the object you load using readShapePoly(). It could be something like IDs are not continuous, or hole attributes.
Apr
22
comment How to intersect lines and polygons in R?
I have found rgeos::gIntersection() to also be quite fussy about the nature of the Spatial* object you pass it. I have also solved very cryptic error messages from this function by using the byid=TRUE parameter. Not sure if this will work in your case.
Apr
12
revised What are some examples of model-based upscaling of raster data?
added 81 characters in body
Apr
12
revised What are some examples of model-based upscaling of raster data?
added 627 characters in body
Apr
12
comment What are some examples of model-based upscaling of raster data?
Agreed that the resulting product wouldn't be a raster if cells weren't regular. However, it is still a data structure that could, in theory, be of value. Thanks for your good coverage of this topic from a GIS perspective. I suspect that what I am after may be not really be a GIS question, per se, but rather one of spatial analysis in general.
Apr
11
accepted Appropriate distance metric for spatial clustering of geographic coordinates
Apr
10
revised What are some examples of model-based upscaling of raster data?
added 86 characters in body