search for: writegdal

Displaying 11 results from an estimated 11 matches for "writegdal".

2008 Nov 05
1
Using RGDAL to "copy" header information...
...') outcon <- file(outfile, "wb") infile_info=GDALinfo(infile) nl=infile_info[[1]] ns=infile_info[[2]] for (row in 1:nl) { templine <- readGDAL(infile,region.dim=c(1,ns),offset=c(row-1,0)) writeBin(templine[[1]], outcon,size=4) } close(outcon) # Below doesn't work # writeGDAL(templine,outfile_base,drivername='EHdr',type="Float32") ### The issue is this: I need to be able to effectively copy the geographic/header information from the input file (the last line almost works, but as you can see it sets the line #s to 1, not "ns"), and parse...
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
2011 Sep 01
1
save grid
Hi   I have a problem for saving grid file in R. I want to save a grid file as "tif".   I write this: writeGDAL(predict.grid, 'predict.tif')   after running, I don't recieve any error. But when I want to open the 'file.tif', it doesn't open. for example in paint program: I recieve this: Paint cannot read this file. This is not valid bitmap file, or its format is not currently suppor...
2012 Dec 26
1
Change class of elements in list
...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 in the list. This also works for a single object in package "rgdal": writeGDAL(b, "sp1.TIFF") Many thanks, Robin [[alternative HTML version deleted]]
2012 Feb 24
1
Producing KML files
...at the following web page: http://spatial-analyst.net/wiki/index.php?title=Export_maps_to_GE The lines that I can run are: data(meuse.grid) coordinates(meuse.grid) <- ~x+y gridded(meuse.grid) <- TRUE proj4string(meuse.grid) = CRS("+init=epsg:28992") # raster to polygon conversion; writeGDAL(meuse.grid["soil"], "meuse_soil.sdat", "SAGA", mvFlag=-99999) rsaga.geoprocessor(lib="shapes_grid", module=6, param=list(GRID="meuse_soil.sgrd", POLYGONS="meuse_soil.shp", CLASS_ALL=1)) and it crashes there with the...
2007 Sep 06
1
write geotiff with projection - RGDAL package
....grid <- read.csv(x, header=TRUE) gridded(data.grid) = ~East.m.+North.m. proj4string(data.grid) = CRS("+proj=tmerc +lat_0=0.00000000000 +lon_0=-81.00000000000 +k=0.99960000 +x_0=500000.000000 +y_0=0.0000000 +ellps=GRS80 +units=m") tr <- "e:\\JELA_veg\\test_gtiff\\test.tif" writeGDAL(data.grid["class.pca"], tr) mg3 <- readGDAL(tr) proj4string(mg3) [1] " +proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs" I will really appreciate if anybody can point me in the right dirrection. Thanks, Monica ______________________________________________________...
2009 Mar 08
0
image2GRID
...the attribute that i would like to convert to image. This part work, i get an image drawn... out <- image2Grid(im) # here I get this message : Error in image2Grid(im) : image must have components x, y, and z writeGDAL(out, "out.tif") Thanks for the help, m -- View this message in context: http://www.nabble.com/image2GRID-tp22398563p22398563.html Sent from the R help mailing list archive at Nabble.com.
2010 Mar 22
2
importing .bil files
Dear list Has anyone got a recipie at hand to import .bil files into R? From what I understand the .bil files I got contain layered matricies which I would lke to make available in R as an array or list. GIS people seem to be familiar with the .bil format but I am not using any GIS software and would prefer to deal with the data in R. I use the latest version of R on Mac OSX 10.5.8.
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as.raster(0:1, nrow=3, ncol=5) testImage [,1] [,2] [,3] [,4] [,5] [1,]
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as.raster(0:1, nrow=3, ncol=5) testImage [,1] [,2] [,3] [,4] [,5] [1,]
2012 May 08
2
PPM to BMP converter
Dear all, Several days ago, I posted How to write a bmp file pixel by pixel. Instead of bmp, I succeeded in writing a PPM file by using the pixmap package. Thanks for the hint generously provided by Uwe Ligges. Now I have a new question. How to convert a PPM file to BMP file in R? I know I can do this in photoshop or by some other softwares, but I think if I Can do this in R, that