Re: [R-sig-Geo] extract mean raster value from polygon

2016-03-14 Thread Alexander Shenkin
gate(meuse.grid["dist"], my_blpi, mean) > spplot(a) > > Package raster may have routines that do the same thing faster for > large > raster data. In raster, ``aggregate'' has a very different meaning. > > > On 11/03/16 11:07, Alexander

[R-sig-Geo] extract mean raster value from polygon

2016-03-11 Thread Alexander Shenkin
Hello All, I've been working to be able to make elevation profiles from a DEM along a swath, rather than just a line (thanks to Forrest Stevens for the help so far). To that end, I've made a function, create_perp_buffers, that creates polygons perpendicular to, and along, a transect (see grap

[R-sig-Geo] Elevation profiles

2016-01-25 Thread Alexander Shenkin
Hello All, I've done this in ArcMAP, but further requirements are making it harder to do it there, so was hoping I can do it in R. I have SRTM DEM rasters, and want to create an elevation profile. This profile is drawn along a polyline connecting 10 GPS points. I was able to do all that in

Re: [R-sig-Geo] Closing readOGR handles

2012-03-30 Thread Alexander Shenkin
;rgdal") Package: rgdal Title: Bindings for the Geospatial Data Abstraction Library Version: 0.7-8 Date: 2012-01-18 thanks, allie On 3/30/2012 9:42 AM, Barry Rowlingson wrote: > On Fri, Mar 30, 2012 at 3:15 PM, Alexander Shenkin wrote: >> Hi folks, >> >> I'm openi

[R-sig-Geo] Closing readOGR handles

2012-03-30 Thread Alexander Shenkin
Hi folks, I'm opening some ESRI shapefiles with readOGR. R seems to keep open file handles on the files opened. Is there any way to close those handles without quitting R? I don't see a read-only option on readOGR, nor do I see any close methods. I've tried GDAL.close(x), but I get errors sayi

Re: [R-sig-Geo] Which points fall in which polygons?

2012-03-14 Thread Alexander Shenkin
gt; On Thu, Mar 15, 2012 at 6:08 AM, Alexander Shenkin <mailto:ashen...@ufl.edu>> wrote: > > Hello folks, > > I have two data sources: an ESRI shapefile (UTM/WGS84 projection) of > numerous polygons, each of which have one of two values (burned > [=1] and &g

[R-sig-Geo] Which points fall in which polygons?

2012-03-14 Thread Alexander Shenkin
Hello folks, I have two data sources: an ESRI shapefile (UTM/WGS84 projection) of numerous polygons, each of which have one of two values (burned [=1] and unburned [=2]); and a set of X/Y distances from the corner of the polygon that represent tree locations. I'd like to tag each X/Y point in the

Re: [R-sig-Geo] spatstat error, rotate after union

2011-01-17 Thread Alexander Shenkin
ction In the meantime, another dubious workaround is to: rotate(as.polygonal(as.mask(union.owin(square(),disc() perhaps fiddling with the pixel size beforehand. thanks, allie On 1/17/2011 9:39 PM, Rolf Turner wrote: > > On 18/01/2011, at 9:47 AM, Alexander Shenkin wrote: >

[R-sig-Geo] spatstat error, rotate after union

2011-01-17 Thread Alexander Shenkin
Hello Folks, I'm getting an error trying to rotate after union operations: library(spatstat) library(gpclib) spatstat.options(gpclib=TRUE) rotate( union.owin( square(), disc() ) ) Polygon contains duplicated vertices Error in owin(poly = bdry, unitname = unitname