[R-sig-Geo] raster interpolation within shape file

netra npt_eng at hotmail.com
Thu Oct 31 14:59:15 CET 2013


Hello,
I am doing a raster interpolation using the gstat and raster packages. My
raster area is very big but within raster area I have a river and this is
the smallest extent of raster that covers the river. I want to interpolate
only inside river not in the whole raster area. Is there any ways that I
could limit the analysis by using mask shape file or something?

Thanks for your help


code snippet

		#read raster
rst <- raster("contor_to_dem_5m.asc")

#define model
		mg <- gstat(id = "z", formula = z~1, locations = ~x+y, data=xyz, 
		                    nmax=7, set=list(idp = .2)) #
		
#interpolate raster
		#this is time consuming :( 
		z <- interpolate(rst, mg)
		

Netra




--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/raster-interpolation-within-shape-file-tp7585003.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list