Re: [R-sig-Geo] raster() not reading in discrete values

2010-11-11 Thread Tyler Dean Rudolph
urther, if your descriptive values are actually text then GDAL cannot > > represent them - only numeric types are supported, even though the > > rasters in R can have text/character types. > > > > Cheers, Mike. > > > > On Thu, Nov 11, 2010 at 11:35 AM, Tyler Dean Rud

[R-sig-Geo] raster() not reading in discrete values

2010-11-10 Thread Tyler Dean Rudolph
I have a pretty simple code to extract cell values from a habitat map (RasterLayer) based on xy coordinates. I recently updated habitat information with a new raster image but for some reason now when I read in the values it's as though they are no longer being interpreted as discrete values, so i

Re: [R-sig-Geo] spatial range parameter in ruf.fit (package ruf)

2010-07-27 Thread Tyler Dean Rudolph
name="Bird 412", standardized=FALSE) ## ## Inspect spatial range derived by maximum likelihood d412.fit$theta[1] range 0.3969813 Tyler On Mon, Jul 26, 2010 at 2:58 PM, Tyler Dean Rudolph < tylerdeanrudo...@gmail.com> wrote: > Hi John and thanks

Re: [R-sig-Geo] spatial range parameter in ruf.fit (package ruf)

2010-07-26 Thread Tyler Dean Rudolph
se the smoothing parameter from the kernel > estimator at the starting estimate. 250 would be correct in the jay cases. > John > > - Original Message ----- > *From:* Tyler Dean Rudolph > *To:* r-sig-geo@stat.math.ethz.ch > *Cc:* Mark S. Handcock ; John M. > Marzluff >

[R-sig-Geo] spatial range parameter in ruf.fit (package ruf)

2010-07-26 Thread Tyler Dean Rudolph
Two parameters are required in order to fit a Resource Utilization Function to spatial attribute data using ruf.fit, 1) *spatial range* and 2) smoothness (theta). With regard to the spatial range parameter, rho, Marzluff et al. (2004) state this to be the range of spatial dependence in * metres*.

Re: [R-sig-Geo] potential BUG in BBMM

2010-07-14 Thread Tyler Dean Rudolph
t mind getting a third or fourth opinion. Tyler On 2010-07-14, at 5:33, Roger Bivand wrote: On Tue, 13 Jul 2010, Tyler Dean Rudolph wrote: I've been constructing utilization distributions for 63 animal movement trajectories using a Brownian bridge movement model with BBMM. I star

[R-sig-Geo] potential BUG in BBMM

2010-07-13 Thread Tyler Dean Rudolph
I've been constructing utilization distributions for 63 animal movement trajectories using a Brownian bridge movement model with BBMM. I started noticing after running the routine numerous times at different resolutions that certain UDs would be grossly wrong, meaning instead of returning a s

Re: [R-sig-Geo] Prevent minor discrepancy in pixel resolution using Spatstat

2010-02-18 Thread Tyler Dean Rudolph
nge)/nx. The pixel centre coordinates are then xcol <- xrange[1] + xstep/2 + xstep * (0:n). If you want pixels to be exactly 25 metres in size, either change the xrange, yrange values, or use the 'xy' argument, see as.mask Hope this helps Adrian On Thu, Feb 18, 2010 at 2:41 AM, Rog

[R-sig-Geo] Prevent minor discrepancy in pixel resolution using Spatstat

2010-02-17 Thread Tyler Dean Rudolph
When I specify eps=25 (m resolution) in a call to distmap... > library(spatstat) > temp <- data.frame(x=-670049.2, y=752814.6, X2=-669961.9, Y2=752648.2) >subwin<-owin(xrange=c(-100, 100) + sort(c(temp$x, temp$X2)), yrange=c(-100, 100) + sort(c(temp$y, temp$Y2))) >trajpsp<-psp(te

[R-sig-Geo] Merge polygons

2010-02-17 Thread Tyler Dean Rudolph
I've been attempting for many moons to develop a function which will allow me to place a buffer of adjustable radius around an animal's movement trajectory with which I may extract underlying pixel values from a raster of environmental data. I would like to be able to extract the habitat values us

Re: [R-sig-Geo] compute buffer from point shapefile to have shapefile

2010-02-17 Thread Tyler Dean Rudolph
Here is another way to compute buffered polygons around points: ## One record (point) at a time (buffer of 25m radius) > temp xy 1 -300358 748992.6 library(spatstat) discbuff<-disc(radius=25, centre=c(temp$x, temp$y)) library(sp) polybuff<-SpatialPolygons(list(Polygons(list(Polyg

Re: [R-sig-Geo] Create SpatialLinesDataFrame

2010-02-16 Thread Tyler Dean Rudolph
y use the following > writeSpatialShape(ranslines, "C:/GIS/ranslines") ...but this is different from what Michael has proposed. > writeOGR(sldf, ".", "ranlines", "ESRI Shapefile") Is one method better than the other? Tyler On Tue, Feb 16, 2010 at 4:06 A

[R-sig-Geo] Create SpatialLinesDataFrame

2010-02-15 Thread Tyler Dean Rudolph
I have searched extensively for some good examples or documentation on how to create a SpatialLinesDataFrame and for the life of me have found zilch. This does not mean there is no such thing available, it just means that wherever it is it is not readily accessible through the circuitous pathways o

[R-sig-Geo] Convert kde object into spatial object

2009-11-27 Thread Tyler Dean Rudolph
Is there a way to convert a kde object (ks package) into a spatial object (e.g. SpatialPixels, SpatialPolygons) for export into a GIS? Alternatively, is there a way to generate the 2-D spatial area underneath the 3-D utilisation distribution of a kde object? I have explored the package descripti

[R-sig-Geo] convert owin object to SpatialPolygons object (write buffered MCP to shapefile)

2009-05-20 Thread Tyler Dean Rudolph
This seems to work, at least until the polygonal owin object is created... here<-convexhull.xy(vertices(dilate.owin(convexhull.xy(mydata),0.2))) However the conversion to a Spatial Polygons object does not seem to work (using spatstat 1.15-3 and maptools 0.7-22): > as(here, "SpatialPolygons") *Err

[R-sig-Geo] convert owin object to SpatialPolygons object (write buffered MCP to shapefile)

2009-05-19 Thread Tyler Dean Rudolph
I know R is not meant to do all things a GIS would do but is there no simple way to create a buffer around a spatial object? I'd like to create a buffered minimum convex polygon around a set of points and write the buffered polygon to a shapefile. I have two columns, x and y, for the geographic l

[R-sig-Geo] saving a RasterLayer object (raster package)

2009-04-01 Thread Tyler Dean Rudolph
I feel like I'm onto something with dataType() yet regardless of how I assign my RasterLayer object I can not simply save the object as is (1 KB only, corrupted). I realize through saveAs I can convert and save it to other formats, but is there not a way of retaining the size advantages of the Ras

[R-sig-Geo] Importing subsets of an ASCII file

2009-03-31 Thread Tyler Dean Rudolph
I have yet to find a computer robust enough to import my landscape-level habitat data in one foul swoop (835 MB). I tell myself once I do succeed I can save it as an R object, at which point it will be much smaller and easier to handle, but it seems another option that may be possible is to specif

Re: [R-sig-Geo] Issues importing BIG shapefile - Limitations of R or something else?

2009-03-29 Thread Tyler Dean Rudolph
and wrote: > On Fri, 27 Mar 2009, Tyler Dean Rudolph wrote: > > I have no trouble importing a subset of a road network for my study area as >> a shapefile into R, but when I try to import the complete network (area >> equivalent to approximately 30,000 km^2), I get the following

Re: [R-sig-Geo] Generate lines using start and end coordinates

2009-03-29 Thread Tyler Dean Rudolph
There is a function that does this well called psp() in the spatstat package. [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] Issues importing BIG shapefile - Limitations of R or something else?

2009-03-29 Thread Tyler Dean Rudolph
y, window = window, marks = marks) 3: as.psp.SpatialLinesDataFrame(from) 2: asMethod(object) 1: as(roads, "psp") Why does this error occur now when it works fine for a subset of the same data? Is there a fix that could help with this problem? Tyler On Sun, Mar 29, 2009 at 11:21 AM, R

Re: [R-sig-Geo] Issues importing BIG shapefile - Limitations of R or something else?

2009-03-28 Thread Tyler Dean Rudolph
Here are the sessionInfo() and traceback() results following the failed import. It looks like I am not using the most recent version of sp so I am trying to figure out the terms in the call to update.package() and with the most recent version I will try again. The .shp file is ~30 megabytes and t

[R-sig-Geo] Issues importing BIG shapefile - Limitations of R or something else?

2009-03-27 Thread Tyler Dean Rudolph
I have no trouble importing a subset of a road network for my study area as a shapefile into R, but when I try to import the complete network (area equivalent to approximately 30,000 km^2), I get the following error message (even when I split up the two class formats into two separate commands): >

[R-sig-Geo] distmap of polylines

2009-03-27 Thread Tyler Dean Rudolph
The answer I have found is both clear and straightforward: require(maptools) IloveR<-as(as(readShapeLines(fn="mylinedata.shp"), "SpatialLines"), "psp") I was hoping someone might be able to point me in the direction of something like this but I was fortunate enough to stumble across it in one of

[R-sig-Geo] Search engine for R-sig-Geo archives??

2009-03-26 Thread Tyler Dean Rudolph
Am I missing something or is all the spatial-related R knowledge that is to be found in the R-sig-Geo forum not accessible by way of a simple search engine? If not I would hope this to be forthcoming At present I am going through the archives one month at a time and it is simply not working!

[R-sig-Geo] distmap of polylines

2009-03-26 Thread Tyler Dean Rudolph
Hi there, I have a spatial road network for which I would like to construct a "distance map" as in the distmap() function in the spatstat package. However this function only seems to readily accept .ppp, .psp, and owin objects. How can I import my data into a format that can be used to create a d

[R-sig-Geo] Generate lines in ascii format using X1Y1 and X2Y2

2009-03-19 Thread Tyler Dean Rudolph
I am trying to find the best way to turn some representation of a line based on 2 pairs of xy coordinates into ascii format in order to extract habitat information associated with used versus randomly generated animal movement paths. I have approximately 33,000 observations (trajectories) to proc

[R-sig-Geo] Extract coordinates from SpatialPolygonsDataFrame

2009-03-19 Thread Tyler Dean Rudolph
Hi there, Nestled deep within the "polygons" slot of my SpatialPolygonsDataFrame object is a list of xy coordinates I would like to extract. Using coordinates() only produces a single xy pair associated with the polygon (1st entry? Centroid?) and I cannot for the life of me manage another way, t

[R-sig-Geo] Generate lines using start and end coordinates

2009-03-19 Thread Tyler Dean Rudolph
Hi all, For every unique "i" in 1:nrow(mydata) I have two sets of spatial "x" and "y" coordinates, one set for the start of the line (c("x", "y")) and another set for the end of the line (c("X2", "Y2")). Essentially I am looking for the simplest and fastest way of creating a series of coordinates