[R-sig-Geo] anisotropy modeling

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Jul 19 09:58:43 CEST 2011


The description says:

  The automatic fitting is done through fit.variogram.

estimateAnisotropy {intamap} does fit anistropy coefficients.



On 07/18/2011 08:27 PM, shweta jp wrote:
> Is the same true for autofitVariogram {automap} ?
> 
> Shweta
> 
> On Wed, Jul 13, 2011 at 1:13 PM, Edzer Pebesma <
> edzer.pebesma at uni-muenster.de> wrote:
> 
>> help(fit.variogram) has the following description:
>>
>>     Fit ranges and/or sills from a simple or nested variogram model to
>>     a sample variogram
>>
>> I suspected it would completely ignore anisotropy settings. However,
>> this seems not to be the case:
>>
>>> library(gstat)
>> Loading required package: sp
>> Loading required package: spacetime
>> Loading required package: zoo
>> Loading required package: xts
>>> loadMeuse()
>>> v0 = variogram(zinc~1,meuse, alpha = 0, tol.hor = 45)
>>> v90 = variogram(zinc~1,meuse, alpha = 90, tol.hor = 45)
>>> v = variogram(zinc~1,meuse)
>>> fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,1)))
>>  model  psill    range
>> 1   Exp 166238 323.6674
>>> fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,.1)))
>>  model  psill    range ang1 anis1
>> 1   Exp 166238 3236.674   90   0.1
>>> fit.variogram(v0, vgm(1, "Exp", 300, anis=c(90,.1)))
>>  model    psill    range ang1 anis1
>> 1   Exp 146068.7 2772.751   90   0.1
>>> fit.variogram(v90, vgm(1, "Exp", 300, anis=c(90,.1)))
>>  model    psill    range ang1 anis1
>> 1   Exp 200767.2 4027.282   90   0.1
>>>
>>
>>
>> On 07/13/2011 11:34 AM, Matevž Pavlič wrote:
>>> Hi,
>>>
>>> thanks for the reply. Can you explain this a little bit more :
>>> " it assumes the variogram to fit to is in the major (correlation)
>> direction (or averaged over all directions)."
>>>
>>> I don't know exactly ehat it means....
>>> m
>>>
>>> -----Original Message-----
>>> From: r-sig-geo-bounces at r-project.org [mailto:
>> r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma
>>> Sent: Wednesday, July 13, 2011 10:10 AM
>>> To: r-sig-geo at r-project.org
>>> Subject: Re: [R-sig-Geo] anisotropy modeling
>>>
>>>
>>>
>>> On 07/12/2011 10:52 PM, Matevž Pavlič wrote:
>>>> Hi all,
>>>>
>>>>
>>>>
>>>> i 'm am not entirely sure I understand anisotropy kriging in R.
>>>>
>>>> I have a data set in which is (at least i think so) anisotropy is
>> clearly visible. So I made directional variograms....
>>>>
>>>> So as i understand, the only thing that is different from >normal<
>> kriging is the  >anis< property in which you define the diffrenece of
>> ranges? Is that coreect?
>>>
>>> Yes. Please note that fit.variogram ignores anything about anisotropy, it
>> assumes the variogram to fit to is in the major (correlation) direction (or
>> averaged over all directions).
>>>
>>>>
>>>> Bellow is the code i use :
>>>>
>>>>
>>>>
>>>> a<-5000/7000
>>>>
>>>> print(plot(variogram(Z ~ 1, DF, map = TRUE, cutoff = 15000, width =
>>>> 100), main = "Variogram map, podlaga",col.regions =
>>>> terrain.colors(64)))
>>>>
>>>> v1.a<-variogram(Z~1, DF, alpha=c(45, 135))
>>>>
>>>> (vmf.a <- fit.variogram(v1.a, vgm(2900, "Pen", 5500, 300, anis =
>>>> c(135, a))))
>>>>
>>>> print(plot(v1.a, pl = F, pch = 20, col = "blue"))
>>>>
>>>> print(plot(v1.a, plot.numbers = F, pch = 20, col = "darkblue", model =
>>>> vmf.a))
>>>>
>>>>
>>>>
>>>> podlaga.aniso<-krige(Z~1, DF[-zerodist(DF)[,1],], grd, vmf.a )
>>>>
>>>> print(spplot(podlaga.aniso, zcol="var1.pred",
>>>> col.regions=terrain.colors(64), contour=T, pretty=T, cuts=15,
>>>> key.space="right"))
>>>>
>>>> print(spplot(podlaga.aniso,  zcol="var1.var",
>>>> col.regions=terrain.colors(64), contour=T, pretty=T, cuts=15,
>>>> key.space="right"))
>>>>
>>>> writeGDAL(podlaga.aniso, "podlaga_aniso.tif")
>>>>
>>>>
>>>>
>>>> thanks for info,
>>>>
>>>>
>>>>
>>>> m
>>>>
>>>>
>>>>      [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> R-sig-Geo at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>> --
>>> Edzer Pebesma
>>> Institute for Geoinformatics (ifgi), University of Münster Weseler Straße
>> 253, 48151 Münster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763
>> http://ifgi.uni-muenster.de
>>> http://www.52north.org/geostatistics      e.pebesma at wwu.de
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>> --
>> Edzer Pebesma
>> Institute for Geoinformatics (ifgi), University of Münster
>> Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
>> 8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
>> http://www.52north.org/geostatistics      e.pebesma at wwu.de
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list