218 reputation
13
bio website
location
age
visits member for 2 years, 2 months
seen 2 days ago

Mar
6
comment Calling external files in Python Geoprocessing Service
OK, good luck. If you figure this out, please do post the answer here.
Mar
6
comment Calling external files in Python Geoprocessing Service
I don't know anything about this particular problem, but have you tried using something like Rscript test.R arg1 arg2 arg3 instead? Just in case you weren't aware of that option, here's a simple example of what that looks like in practice.
Oct
21
awarded  Yearling
Oct
4
comment Given a Lat and Lon, identify if the point is over land or ocean?
Glad to help. Turns out colSums(rgeos::gIntersects(pts, wrld_simpl, byid=TRUE)) also works (& see too rgeos::gIntersection() for something slightly different). If you've got only a few ocean pts, you can get their distance from land with geosphere::dist2Line() which takes a SpatialPoints* and a SpatialPolygons*. It's really slow though, taking something like 20 seconds per SpatialPoint when wrld_simpl is the SpatialPolygons object. Might be faster if you reduced the # of component polygons by merging whichever you can, though prob. better to just find a different approach.
Oct
2
answered Given a Lat and Lon, identify if the point is over land or ocean?
Jun
20
comment how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?
@Spacedman -- From my quick tests, it looks like obrien and rowlings2 run neck and neck, with obrien maybe 2% faster.
Jun
20
revised how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?
added 275 characters in body
Jun
20
comment how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?
@Spacedman -- Bingo. Need to do apply(gIntersects(pts, ply, byid=TRUE), 2, any). In fact, I'll go ahead and switch the answer to that, since it encompasses the case of a single polygon as well.
Jun
19
awarded  Teacher
Jun
18
revised how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?
added 210 characters in body
Jun
18
answered how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?
Dec
8
awarded  Editor
Dec
8
revised Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?
Fixed spelling in title
Dec
8
suggested suggested edit on Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?
Sep
29
awarded  Supporter