I have a Question , I have in my R-Project the interpolation with Intamap
used to visual the Air Quality Data from my PostGIS Database but I have not
found haw to Generate a GeoTIFF ?

Can I have a Help ?

This is my R-File:

## load some libraries first:
library(gstat)
library(RODBC)
library(rgdal)
library(grid)
library(intamap)
## load data
channel <- odbcConnect("postgis", "postgres", "postgres")
table = sqlQuery(channel, "SELECT max(stat.gid) as oid,max(stat.the_geom) as
the_geom,max(stat.station_latitude_d) as lat,max(stat.station_longitude_d)
as lon,max(stick.wert) as wert FROM luft_messstationen_meta as
stat,stickstoffdioxid as stick WHERE stat.gid=stick.station_id AND
date='2010-11-20' group by stat.gid order by oid;")
## gstat does not like missing data, subset original data:
e <- na.omit(table)
## convert simple data frame into a spatial data frame object:
coordinates(e) <- ~ lon+lat
e$value=e$wert
x.range <- range(e@coords[,1])
y.range <- range(e@coords[,2])
## now expand to a grid with 500 meter spacing:
grd <- expand.grid(x=seq(from=x.range[1], to=x.range[2], by=0.05),
y=seq(from=y.range[1], to=y.range[2], by=0.05))

## convert to SpatialPixel class
coordinates(grd) <- ~ x+y
gridded(grd) <- TRUE

output = interpolate(observations = e,
predictionLocations = grd,
outputWhat = list(mean=T, variance=T, excprob = 7),
maximumTime = 30,
methodName = "automatic",
optList = list() )
plot(output)
#how generate a GeoTIFF ?

Thanks

Tarek




-- 
Tarek Benamara

	[[alternative HTML version deleted]]

