[R-sig-Geo] reading an ESRI grid into R

2020-02-10 Thread Julie Lee-Yaw via R-sig-Geo
Hi I'm using the raster package to load a DEM from here: http://www.cec.org/tools-and-resources/map-files/elevation-2007 The data appear to be stored as an ESRI grid (adf) and I have no experience with this format. >From what I can tell this format is similar to a shp file with different files >

[R-sig-Geo] Question about correcting for spatial autocorrelation

2018-06-21 Thread Julie Lee-Yaw via R-sig-Geo
Hi  I've posted this to the mixed models forum as well but thought people here might know: I want to use the the correlation setting with corSpher in nlme to account for potential spatial autocorrelation in my data. My data include observations from across the globe with locations in latitude an

[R-sig-Geo] Odd behavior with rasterToPolygons function in Raster package

2018-04-20 Thread Julie Lee-Yaw via R-sig-Geo
Hello, I've got a raster with values 1 and NA. I'm attempting to convert to a polygon using the rasterToPolygons function with dissolve=TRUE. The raster is in an equal area projection (+proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs ) When I us

[R-sig-Geo] question about rgeos "gDistance" parameters

2017-11-10 Thread Julie Lee-Yaw via R-sig-Geo
Can someone better explain what the byid parameter does in the gDistance command? The help for the command states: "Logical vector determining if the function should be applied across ids (TRUE) or the entire object (FALSE) for spgeom1 and spgeom2" If spgeom1 is a spatial points objects and spge

[R-sig-Geo] determining scale of autocorrelation in a raster

2015-03-17 Thread Julie Lee-Yaw
Hi I am attempting to explore the scale of spatial autocorrelation in a raster (eventually across a stack of 10 but for now a single layer) and consequently in a potential sample of points across the landscape (ie. if we wanted to know what sampling design in terms of distance would minimize aut

[R-sig-Geo] "rasterize" shape file return empty raster

2014-07-18 Thread Julie Lee-Yaw
Hi I have a shape file (initially produced by intersecting two other shapefiles using the PBSmapping functions) and I would like to turn it into a raster based on a raster layer. This has worked for me previously: r<-rasterize(myShape, myRaster, mask=TRUE) However, my end result is a "blank"

[R-sig-Geo] Help mosiacing rasters OR replacing NA values in one raster based on cell coordinates

2014-07-05 Thread Julie Lee-Yaw
acing NA values in one    raster       based on cell coordinates (Julie Lee-Yaw)   2. Re: line color in plot(SpatialPolygonsDataFrame) [was: maps       showing post-Soviet states?] (Spencer Graves)   3. spatial.tools 1.4.8 now on CRAN (Jonathan Greenberg)   4. Create SpatialPolygonsDat

[R-sig-Geo] Help mosiacing rasters OR replacing NA values in one raster based on cell coordinates

2014-07-02 Thread Julie Lee-Yaw
Hi Sorry for the complicated example, but I'm really stuck: I am trying to merge two rasters/datasets: one for the continental USA and one for Mexico. The dataset for Mexico was initially derived from a larger raster of North America that was at the same extent, resolution etc. as the US raste

[R-sig-Geo] How to buffer a polygon by area

2014-05-28 Thread Julie Lee-Yaw
Hello, Can anyone tell me how to buffer a polygon by area?  I have a simple (no-holes and only one feature) polygon shapefile in an equal area projection and I need to buffer it to extend the boundaries so that the resulting polygon is 10% bigger by area. I know how to buffer by a fixed distance

Re: [R-sig-Geo] Managing temporary files created when using the Raster package

2014-03-30 Thread Julie Lee-Yaw
Hi Jonathan, Thanks for this suggestion. It took me awhile to find all the places where temporary rasters were being generated. After finding them, I used filename in all commands that were generating the files, pointing them all to a temporary directory and calling them all "temp_" something.

[R-sig-Geo] Managing temporary files created when using the Raster package

2014-03-23 Thread Julie Lee-Yaw
Hi  I am doing a lot of raster calculations repeatedly (in a loop of sorts). As might be expected, this process is generating a lot of temporary files and filing up my hard drive before my script finishes. The first step in my script is to stack a set of very large rasters. This stack is then t

Re: [R-sig-Geo] resampling MODIS-based raster to PRISM raster to obtain same extent

2014-01-21 Thread Julie Lee-Yaw
e MRT does not allow you to set an > origin. If that is true, then it is an inadequate tool for changing > the projection of raster data and I would use GDAL instead. On linux > you can have rgdal with HDF5 support, but not on windows. But on > windows you can use command line GDAL (from

Re: [R-sig-Geo] resampling MODIS-based raster to PRISM raster to obtain same extent

2014-01-16 Thread Julie Lee-Yaw
d not use it. You can use GDAL instead. On Linux this can be done with rgdal; on windows you can use FWTools instead, or perhaps the new gdalUtils package? Robert On Mon, Jan 13, 2014 at 3:39 PM, Julie Lee-Yaw wrote: > Hi > > Using a combination of the scripts provided here (by Babak N

Re: [R-sig-Geo] resampling MODIS-based raster to PRISM raster to obtain same extent

2014-01-14 Thread Julie Lee-Yaw
. The data must be projected to the same map projection; then you can do your resampling Regards, Tom On Tue, Jan 14, 2014 at 7:39 AM, Julie Lee-Yaw wrote: Hi  > >Using a combination of the scripts provided here (by Babak N.):  >http://r-gis.net/?q=ModisDownload and the MODIS reproject

[R-sig-Geo] resampling MODIS-based raster to PRISM raster to obtain same extent

2014-01-13 Thread Julie Lee-Yaw
Hi  Using a combination of the scripts provided here (by Babak N.):  http://r-gis.net/?q=ModisDownload and the MODIS reproject tool, I've finally managed to download NDVI data for North America and project it to the same geographic coordinate system as PRISM precip. data (e.g. http://www.prism.

Re: [R-sig-Geo] Help with getting and processing MODIS data

2014-01-13 Thread Julie Lee-Yaw
Hi Babak, I have added the parameters you mentioned but I still haven't been able to get it to work. I then tried to move the R source code and LP.Rdata to the same directory as the MRT jar file. Still no luck. I get the following error messages (the first part I think is from the MRT applicat

[R-sig-Geo] Help with getting and processing MODIS data

2014-01-09 Thread Julie Lee-Yaw
Hi all  I am fairly new to GIS and R and am trying to download, reproject, mosaic and save MODIS NDVI and EVI data as a geotiff. I need tiles from across North America, so a lot of data and would prefer to find an automatic solution. I've come across modisDownload but can't seem to get it to w

[R-sig-Geo] editing/"moving" coordinates of shape file

2014-01-05 Thread Julie Lee-Yaw
Hi I have two shapefiles that I am reading in to R via maptools (readShapePoly): for example, shape 1 is a map of the lower 48 US states and shape 2 is a polygon that represents a very crude buffer region around the Mississippi River. I ultimately want to create two new shapefiles representi

[R-sig-Geo] dismo package: using biasfile when calling maxent

2013-03-13 Thread Julie Lee-Yaw
Hi All, Does anyone know how to incorporate a biasfile into a maxent run set up from the R package dismo? Or is it even possible to run dismo's maxent command with a bias file? Here's what I've tried: mybias<-raster(file.choose()) # load bias grid of same extent and resolution as raster laye

[R-sig-Geo] create point density raster OR other ways to thin point data

2013-02-24 Thread Julie Lee-Yaw
Hi I have a set of sampling locations with a strong bias towards one area within my study region (e.g. many more points in the south than in the north). I want to "thin" sites in this high density region by randomly discarding sites until the density of sampling is similar to other areas of my

[R-sig-Geo] need help using maxent k-fold cross validation option in dismo

2012-12-01 Thread Julie Lee-Yaw
Hi, I am running maxent through dismo. I'm using "replicates=5" as an argument which, if I understand correctly, is one way of doing k-fold cross validation with k=5. example: me<-maxent(rasters,localities, args=c("-J","-P", "replicates=5","writebackgroundpredictions"), path="/Users/self/Desk