Folks:
Robert has a version of this email concerning the implementation in
raster, but I'm wondering if there's something going on with rgdal or
proj? Can anyone think of a reason why reprojecting a file of North
America with the following projection info:
"+proj=lcc +lat_1=50 +lat_2=50 +lat_0=5
Folks:
I have two sets of spatialpoints data, one that is in lat long which
longitude ranging from -180 to 180, and another that ranges from 0 to 360.
What are the appropriate proj settings for these two different datasets
such that one can be properly reprojected to the other? I have:
"++proj=
r-sig-geo'ers:
Quick question: is there an easy way to have a flag to tell if a
dataset is NOT supported, e.g. when GDALinfo(fname) is in error? I'd
like something like "GDALinfo(fname)" to return "FALSE" if its an
unsupported dataset type. Thanks!
--j
_
r-sig-geo'ers and Robert:
If I want to pull out the values of a raster into a dataframe,
ignoring "masked" values, what is the quickest way to do this? I can
use getValues() and "post-process" the output, but is there a way to
skip every loading these masked values into a memory in the first
plac
r-sig-geo'ers:
Next in my barrage of questions -- what would be a memory-safe way of
dealing with netCDF files via raster()? I understand that raster
loads the entire netCDF band/file into memory when using raster():
u_wind_rasters=stack(u_wind_file,zvar='uwnd')
or
v_wind_raster=raster(v_wind_
I've got a file and a mask (1s for "good data", NAs for "bad"), and I
want to extract the cell values AND geographic coordinates of these
cells into a data frame or vector that correspond to the locations
where the mask is 1 -- what is the best practice for doing this? I
can loop through each row/
I'm thinking I'm missing something obvious -- if I want to make a new
raster stack which is a subset of another raster stack, how do I go
about doing this? Neither of these worked:
data_sub=stack(data_stack,bands=c(10,20))
data_sub=stack(data_stack,index=c(10,20))
data_stack is a rasterStack of
R-sig-geo'ers:
Given two rasters of differing resolutions, extents, and cell sizes,
what is the most efficient way to do some level of raster algebra on
the files, e.g.:
raster1=raster(file1)
raster2=raster(file2)
I would like to add raster1 + raster2 and have the output be the
extent, cell size
ss6 "enable" rgdal to access GRASS rasters, or is it
>>> its own standalone program? How does the base gdal package work with
>>> grass rasters?
>>>
>>> --j
>>>
>>> On Mon, Mar 1, 2010 at 2:35 PM, Sarah Goslee wrote:
>>>>
Sarah
>
> On Mon, Mar 1, 2010 at 5:17 PM, Jonathan Greenberg
> wrote:
>> Folks: when trying to import or GDALinfo a grass raster, where,
>> exactly, should I be pointing to in the grass directory? I tried
>> pointing to the file with the same name as the raster I want t
Folks: when trying to import or GDALinfo a grass raster, where,
exactly, should I be pointing to in the grass directory? I tried
pointing to the file with the same name as the raster I want to work
with in the fcell, cellhd, and cell directories
(grass/location/mapset), but none of these are worki
Rsiggeo'ers:
Given a vector file containing polygons and a raster file of the
same projection, I would like to create raster "zones" based on the
polygons -- e.g. I would like to rasterize the vector polygon at the
resolution of the raster. I'm not seeing any obvious way to do this --
any
Michael:
Typically Lidar files come "tiled", e.g. you get a set of point
clouds pre-subsetted to, say, 1km x 1km window. These subsetted data
are usually a LOT easier to write some batch scripts to deal with than
trying to analyze the entire database at once. Have you seen if the
source
R-sig-geo'ers:
I'm pushing forward with recoding starspan as a set of R functions
so we can get the program back on track after a long hiatus with the
development of a C version (I don't know C and don't have time to learn
it, and we lost our master programmer who did know C), and I'm tryin
I'm trying to hunt down a function that will take a polygon (derived
from a shapefile) and "rasterize" it at a given pixel resolution -- any
hints?
--j
--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davi
hen adding 1 to each element to get 661 1's. Why not use:
rep(1, length(uniqueids)) "
--> Learn something new every day! Wasn't familiar with the rep()
function, so I got my vector of 1s the only way I currently knew how!
Marc Schwartz wrote:
On Jul 11, 2009, at 8:42 PM,
e writeBin statements to realize tiled processing).
--j
Roger Bivand wrote:
On Thu, 9 Jul 2009, Jonathan Greenberg wrote:
I'm writing a function to mimic ENVI/IDL's "ENVI_SETUP_HEAD" using
rgdal, and I was wondering how I set the interleave (BIP vs BSQ vs BIL)?
You
R-sig-geo'ers:
I am using the following code to create an ENVI header:
driver="ENVI"
d.drv <- new("GDALDriver", driver)
tds.out <- new("GDALTransientDataset", driver = d.drv, rows =
dims[2],cols = dims[1], bands = bands, type = type)
gt <- c(offset[1] - 0.5 * cellsize[1], cellsize[1
I'm writing a function to mimic ENVI/IDL's "ENVI_SETUP_HEAD" using
rgdal, and I was wondering how I set the interleave (BIP vs BSQ vs
BIL)? The subsection of my code that I assume this belongs in is below:
driver="ENVI"
d.drv <- new("GDALDriver", driver)
tds.out <- new("GDALTransientD
It seems that a raster-based approach would make more sense, rather than
the hugely computationally inefficient approach you are suggesting --
how about using a least cost path or euclidean distance approach? Both
are available in many GIS packages (ArcMap, GRASS GIS, etc...)
--j
x wong wrot
R-sig-geo'ers -- do we have a wiki/script repository? If not, can we
start a r-sig-geo wiki subpage on one of the main R wiki sites
(http://wiki.r-project.org/rwiki/doku.php)? It would be nice to have a
centralized location to paste help and/or scripts that we develop.
--j
--
Jonathan A. G
:
> rsaga.get.usage(lib="grid_gridding", 3)
SAGA CMD 2.0.3
library path: C:/Progra~1/saga_vc/modules
library name: grid_gridding
module name : Shapes to Grid
...
But before SAGA, you need to reproject the polygons first (if
necessary).
see also some examples from:
http://spati
4/2009 10:07 PM
To: Jonathan Greenberg
Cc: r-sig-geo@stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Vector to raster?
Jonathan Greenberg schreef:
> How do I take a polygon in some OGR supported vector layer (say, a
> shapefile), and rasterize it given a pixel size and projection/datum?
>
How do I take a polygon in some OGR supported vector layer (say, a
shapefile), and rasterize it given a pixel size and projection/datum?
--j
--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shield
Sorry for the cross-posting. I was wondering if anyone has a unix
(preferably) or windows program that can spider a directory, recursively
searching for raster and vector data, and create bounding box polygons
for each raster/vector it finds, with attributes indicating the
path-to-file. Thank
ght away; for some reason.
If you omit
GDAL.close(d.drv)
It will work.
Robert
On Wed, Feb 11, 2009 at 7:32 AM, Jonathan Greenberg
wrote:
A few months back I was getting some help with adapting R for doing tiled
processing of remote sensing data, and I made some serious headway, but
there is
A few months back I was getting some help with adapting R for doing
tiled processing of remote sensing data, and I made some serious
headway, but there is a lingering problem I keep scratching my head at.
First off, a quick recap of the base algorithm:
1) Let i = input raster, f() some functi
Question:
If I have a polygon shapefile, and I want to rasterize each polygon
given a certain grid cell resolution, is there a way to do this
completely within R? I'm considering porting our vector<->raster bridge
"starspan" (http://starspan.casil.ucdavis.edu/doku/doku.php) to R code,
but
On Fri, 23 Jan 2009 8:59:02 +1100 Jonathan Greenberg wrote:
I was hoping I could get some info on how to coerce the type of object
readGDAL produces, assuming its a multiband object, into an R matrix (I
just want the raster values in the matrix)? Thanks!
--j
I was hoping I could get some info on how to coerce the type of object
readGDAL produces, assuming its a multiband object, into an R matrix (I
just want the raster values in the matrix)? Thanks!
--j
--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote
R-geographers...
I'm trying to solve a problem to implement a line-by-line tiled
processing using RGDAL (read 1 line of an image, process the one line,
write one line of the image to a binary file). Everything except for
the final step I'm able to do using a combination of RGDAL and r-base
c
(currently)
depends on Windows, uses SAGA's grid calculator. SAGA is able to process
large grids efficiently. E.g.:
# first convert the ASCII grid to a SAGA grid (.sgrd):
rsaga.esri.to.sgrd("ingrid")
rsaga.grid.calculus("ingrid", "outgrid", formula = "a+1000&
I've recently got back into using R to perform spatial analyses, and I'm
trying to figure out how to perform "true" tiled processing, e.g.
controlled reading of subsets of an input file, performing a function on
this subset, and writing the output, subset by subset, to an output file
and, final
Our primary developer for starspan (I designed the program, but did none of
the coding) has since moved on to bigger and better things, but I would
LOVE to get some help getting starspan cleaned up so it can be a GRASS
add-on. If anyone is interested, please send me an email about it --
ultimately
ving it would lead to a segfault, but I still
> would have thought you'd need it to avoid it trying to find a binary
> package for the Mac (at least, that's my experience on my G5).
>
> On 10 Sep 2006, at 0:40, Jonathan Greenberg wrote:
>
>> I'm getting this erro
I'm getting this error while trying to install spgrass6 on a dual G5/2ghz w
4gb ram, and macos x 10.4.7:
> rS <- "http://r-spatial.sourceforge.net/R";
> install.packages("spgrass6", repos=rS, dependencies=TRUE)
*** caught segfault ***
address 0x5f4d4550, cause 'memory not mapped'
Traceback:
1:
I am going through some similar problems getting rgdal running on macos x:
sudo ./usr/local/bin/R64 CMD INSTALL
--configure-args='--with-proj-include=/usr/local/include
--with-proj-lib=/usr/local/lib' rgdal
...
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for
I was wondering if I could get some brief feedback on exactly what are the
capabilities of the sp and spgrass6 -- say I'd like to use R to calculate
and NDVI image (I know GRASS's mapcalc can do this fine, but I'm thinking of
some more complicated analyses that aren't easily performed in R and I
fi
38 matches
Mail list logo