similar to: converting raster image

Displaying 20 results from an estimated 120 matches similar to: "converting raster image"

2012 May 16
2
replacing with NA
Dear R users, I was wondering how I can replace the values of a vector with the values from in another vector in the same row For example, how can I replace the value of x below with NA when the value of Z in the same row is NA? x <-1:20 z<- c(11, 15, 17, 2, 18, 6, 7, NA, 12, 10,21, 25, 27, 12, 28, 16,17, NA, 12, 10) Many thanks Mintewab ________________________________________ Fr?n:
2011 Dec 07
2
curve fitted ... how to retreive data
Dear R users, I have now managed to fit the curve using the thin plate spline as follows: library(mgcv) b <- gam(y~s(x1,x2,k=100),data =dat) vis.gam(b) What I want now is to get the fitted data for y and copy it so that I use it for further analysis. Many thanks in advance mintewab
2011 Dec 12
3
shorter way of coding
Dear R users, I am using the code below to generate a fitted value of b. I have about 300 different values for for y (y1, y2, ...y300) which means I will have to write the code below 300 times to generate the 300 different fitted values for y. Is there a short way of doing that ? Many thanks in advance Mintewab library(mgcv) dat <- read.table("e:/minti's
2011 Dec 03
1
problems using the thin plate spline method
Dear R users, I am a beginner in R trying to apply the thin plate spline method to my climate data. I used the example in R to do so, and the lines seem to run fine ( I am not getting errors) but I am not getting any output in the form of graph or anything. I got a warning message saying that 'surface extends beyond box'. Any help is much appreciated. thanks minti
2010 Oct 19
2
Tif image to 8bit colour matrix.
Dear listers, I have a collection of tif images that I would like to convert, in R, to a matrix containing the values of the 8bit colour. Ideally, I would like a matrix for each of the colour channels (red, blue and green). I have 'googled' and searched the help list but have yet to find a solution and hope that someone can point me in the right direction. I currently use
2007 Sep 20
2
Superimposing vector polygons over raster grid in a plot
Hello: I would like to superimpose vector polygons (state outlines) from a Shape file on top of a satellite image, imported into a SpatialGridDataFrame from GEOTIFF via gdal_translate and readGDAL. When I plot polygon and point shape files in R, into SpatialPointDataFrame and SpatialPolygonDataFrame, the two feature sets line up geographically, so it seems logical that a SpatialGridDataFrame
2008 Dec 10
2
exporting rast from R to GRASS
Hi, everybody! i created a imagem by kriging using geoR package. I imported points from GRASS("zn", after converted to geodata "zn_geo"), the border "zn_border" and a raster mask. Then i interpolated the points by kriging and created a raster image. Now, i need export this image back to GRASS to use it in the module r.mapcalc. I can't do it. I tried use
2009 Jul 15
1
Read PNG file and display with more than 256 colors RGDAL
Hello list I am trying to use a Googlemaps tile (png file, 640 X 640 px tile) as a background to a plot and have been using the rgdal library to read in the PNG file (modified from code in the RGoogleMaps package). This works OK. My problem is is that the SGDF2PCT function in rgdal seems to be limited to 256 colors and this is introducing (I think) some degradation to the image which appears on
2007 Mar 03
1
R software to place points on Yahoo maps
Is there any R software that create an image from Yahoo maps together with points of known UTM coordinates (or lat/long marked? Note that my region of interest is not covered in sufficient detail by Google maps. It actually does not have to be Yahoo maps as long as it has sufficient coverage of my region but that's the one I have found with coverage of my region. The scale I am interested in
2007 Sep 05
1
geotiff or tiff files with world files
Hi, I have a matrix of data which i can vizualize as an image - for example. I would like to save this image as a geotiff file or at a tiff file with a world file which holds the projection of my data (ultimately the data represent a map of some sort). I know i can save the data as an ESRI grid, but i am not interested in that. I wonder if anybody knows about any code which will help me do
2012 Dec 26
1
Change class of elements in list
Dear R users, I have a list of objects of type "im" > mylist$sp1 $sp2 $sp3 and I want to convert them to a list of objects of class "SpatialGridDataFrame" This works for a single object of class "im": a <- mylist$sp1 b <- as(a, "SpatialGridDataFrame") Then I want to write each element in the new list as a TIFF file, with the name of the elements
2010 Oct 01
1
colored rasterImage()
Hello, I have been exploring the possibility to transition some code that currently uses image() to use the new rasterImage(). To date, I haven't been able to specify a color look-up strategy that works. For example... nx <- 100 ny <- 100 m <- matrix(data = rep(seq(0,1, length = nx), ny), ncol = nx, nrow = ny, byrow = TRUE) plot(1:nx, 1:ny, type = "n") my.color
2011 May 13
0
Tps error
Hi, I am trying to use the Tps procedure to visualize 3 variables in XYZ space, but keep getting the error messages below: Warning messages: 1: In Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV, Krig.fgcv, : GCV search gives a minimum at the endpoints of the grid search 2: In Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV.one, Krig.fgcv.one, : GCV search gives a minimum at the endpoints
2013 Apr 26
1
How to export graph value in R
Dear exports,I have created a hypsometric curve (area-elevation curve) for my watershed by using simple command hypsometric(X,main="Hypsometric Curve", xlab="Relative Area above Elevation, (a/A)", ylab="Relative Elevation, (h/H)", col="blue")It plots the hypsometric curve in "RGraphics window", My question is how can I export values which is used
2006 Oct 10
1
How to assign a rank to a range of values..
>From the following: basin.map <- readAsciiGrid("c:/temp/area.asc", colname="area") I have a SpatialGridDataFrame which has the x and y cordinate of a cell, and the drainage area of that cell. There are many cells with a low drainage area (in my case, 33000 with an area of 37.16) and one cell with the highest drainage area (again, in my case, a drainage area of of
2011 Nov 24
1
readGDAL or raster for reading bit map files
Dear all, I have asked yesterday of how I can read a simple bitmap file in R cran. I was suggest to use either readGDAL or raster for loading my bitmap a. I have done it with readGDAL like     store<-readGDAL(fname='lena256.bmp')     and it works,... but it converts my matrix-like notion of a bitmap to a large vector b. Raster also returns a class that I can not understand. So 1,
2010 Jul 20
2
data from SpatialGridDataFrame
Dear All, I have a raster map of the class 'SpatialPointsDataFrame' and coordinates of the class 'SpatialPoints'. I would like to retrieve the values that are contained in the raster map at the specific locations given by the coordinates. Can anyone help me out? Kind regards, Katrin Fleischer
2012 Sep 05
1
analysis of bitmaps
I'm interested in using R to perform some statistical analysis of bitmaps. When I search, I see a lot of information about outputting bitmaps, but I'm not finding much about loading a bitmap into a data frame so that it can be analyzed. Would someone have a quick pointer to help me out? [[alternative HTML version deleted]]
2013 Jan 27
1
lapply and SpatialGridDataFrame error
Hi all, I have a set of 54 files that I need to convert from ASCII grid format to .shp files to .bnd files for BayesX. I have the following R code to operate on those files: library(maptools) library(Grid2Polygons) library(BayesX) library(BayesXsrc) library(R2BayesX) readfunct <- function(x) { u <- readAsciiGrid(x) } modfilesmore <- paste0("MaxFloodDepth_", 1:54,
2006 Sep 07
2
merging tables by columns AND rows
Hi everyone! I have 100 tables of the form: XCOORD,YCOORD,OBSERVATION 27.47500,42.52641,177 27.48788,42.52641,177 27.50075,42.52641,179 27.51362,42.52641,178 27.52650,42.52641,180 27.53937,42.52641,178 27.55225,42.52641,181 27.56512,42.52641,177 27.57800,42.52641,181 27.59087,42.52641,181 27.60375,42.52641,180 27.61662,42.52641,181 ..., ..., ... with approximately 1000000 observations for each.