[R-sig-Geo] Use estimateAnisotropy by intamap package
Yong Li
yong.li at unimelb.edu.au
Sun Apr 18 12:53:56 CEST 2010
Dear All,
I tried to inspect the geometric anisotropy by using the function of estimateAnisotropy with parameter "formulaString" in intamap, but never worked.
Any help will be highly appreciated.
Cheers,
Yong
-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch 代表 r-sig-geo-request at stat.math.ethz.ch
Sent: 2010-4-18 (星期日) 20:00
To: r-sig-geo at stat.math.ethz.ch
Subject: R-sig-Geo Digest, Vol 80, Issue 18
Send R-sig-Geo mailing list submissions to
r-sig-geo at stat.math.ethz.ch
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
r-sig-geo-request at stat.math.ethz.ch
You can reach the person managing the list at
r-sig-geo-owner at stat.math.ethz.ch
When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."
Today's Topics:
1. Variogram models in gstat (Sidney Bernal)
2. Re: Variogram models in gstat (Edzer Pebesma)
3. Re: sp, area and SpatialPolygons (Roger Bivand)
4. Re: Help needed with spplot (Thomas Adams)
5. Re: sp, area and SpatialPolygons (Patrick Giraudoux)
----------------------------------------------------------------------
Message: 1
Date: Sat, 17 Apr 2010 10:37:15 -0500
From: Sidney Bernal <sidney86_115 at hotmail.com>
To: <r-sig-geo at stat.math.ethz.ch>, Sidney Bernal
<sidney86_115 at hotmail.com>
Subject: [R-sig-Geo] Variogram models in gstat
Message-ID: <SNT117-W61894D6D8AA733D868DD48A70D0 at phx.gbl>
Content-Type: text/plain
Good Morning
Today I make a geostatistics course, so I'm using R 2.10.1 and I am writing to ask the please of the mathematical formulas of the 19 models of covariogram variogram programmed in the gstat package.
short long
1 Nug Nug (nugget)
2 Exp Exp (exponential)
3 Sph Sph (spherical)
4 Gau Gau (gaussian)
5 Exc Exclass (Exponential class)
6 Mat Mat (Matern)
7 Ste Mat (Matern, M. Stein's parameterization)
8 Cir Cir (circular)
9 Lin Lin (linear)
10 Bes Bes (bessel)
11 Pen Pen (pentaspherical)
12 Per Per (periodic)
13 Hol Hol (hole)
14 Log Log (logarithmic)
15 Pow Pow (power)
16 Spl Spl (spline)
17 Leg Leg (Legendre)
18 Err Err (Measurement error)
19 Int Int (Intercept)
Awaiting your prompt response.
Sidney Bernal
sidney86_115 at hotmail.com
Sidney Bernal
_________________________________________________________________
e=wlmailtagline
[[alternative HTML version deleted]]
------------------------------
Message: 2
Date: Sat, 17 Apr 2010 18:47:43 +0200
From: Edzer Pebesma <edzer.pebesma at uni-muenster.de>
To: Sidney Bernal <sidney86_115 at hotmail.com>
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Variogram models in gstat
Message-ID: <4BC9E62F.1090607 at uni-muenster.de>
Content-Type: text/plain; charset=ISO-8859-1
Most of them can be found on page 38 of http://www.gstat.org/gstat.pdf
The Mat / Ste models are e.g. described in M. Stein, "Interpolation of
Spatial Data: Some Theory for Kriging", Springer.
Let me know if there are further descriptions missing.
--
Edzer
Sidney Bernal wrote:
>
>
> Good Morning
>
> Today I make a geostatistics course, so I'm using R 2.10.1 and I am writing to ask the please of the mathematical formulas of the 19 models of covariogram variogram programmed in the gstat package.
>
> short long
> 1 Nug Nug (nugget)
> 2 Exp Exp (exponential)
> 3 Sph Sph (spherical)
> 4 Gau Gau (gaussian)
> 5 Exc Exclass (Exponential class)
> 6 Mat Mat (Matern)
> 7 Ste Mat (Matern, M. Stein's parameterization)
> 8 Cir Cir (circular)
> 9 Lin Lin (linear)
> 10 Bes Bes (bessel)
> 11 Pen Pen (pentaspherical)
> 12 Per Per (periodic)
> 13 Hol Hol (hole)
> 14 Log Log (logarithmic)
> 15 Pow Pow (power)
> 16 Spl Spl (spline)
> 17 Leg Leg (Legendre)
> 18 Err Err (Measurement error)
> 19 Int Int (Intercept)
>
> Awaiting your prompt response.
>
> Sidney Bernal
> sidney86_115 at hotmail.com
>
>
>
> Sidney Bernal
>
>
> _________________________________________________________________
>
>
> e=wlmailtagline
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> 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
------------------------------
Message: 3
Date: Sat, 17 Apr 2010 21:26:35 +0200 (CEST)
From: Roger Bivand <Roger.Bivand at nhh.no>
To: Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr>
Cc: Edzer Pebesma <e.pebesma at gmail.com>, r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] sp, area and SpatialPolygons
Message-ID: <alpine.LRH.2.00.1004172120140.18699 at reclus.nhh.no>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Sat, 17 Apr 2010, Patrick Giraudoux wrote:
>
> I did not find a function in sp to extract area from SpatialPolygons objects.
> Thus I was thinking about writing some function to do the job similar to the
> functions written in order to extract lengths from SpatialLines objects (see
> ?SpatialLines). I have incidentally discovered a strange thing. Let us define
> a list of 3 polygons:
>
> polylist <- list(structure(c(180016, 180034, 180452, 180588, 180615,
> 180533,
> 180225, 180016, 332182, 331756, 331774, 332074, 332418, 332518,
> 332319, 332182), .Dim = c(8L, 2L)), structure(c(179907, 180325,
> 180397, 180152, 179781, 179672, 179735, 179907, 331611, 331611,
> 331266, 330931, 330967, 331266, 331466, 331611), .Dim = c(8L,
> 2L)), structure(c(179499, 179971, 180343, 180161, 179753, 179418,
> 179499, 330577, 330768, 330468, 330096, 330078, 330369, 330577
> ), .Dim = c(7L, 2L)))
>
> And make a simple SpatialPolygons object with them:
>
> SP<-SpatialPolygons(list(Polygons(list(Polygon(polylist[[1]])),ID="P1"),Polygons(list(Polygon(polylist[[2]])),ID="P2"),Polygons(list(Polygon(polylist[[3]])),ID="P3")),pO=as.integer(c(1,2,3)))
> It looks like if the area of Polygons #1 was not computed:
Patrick,
There is a bug, not not a simple one. The ring direction of your first
Polygon object signals that it is a hole, but in Polygons(), singleton
holes are made into islands, and the largest hole in an all-hole list of
Polygon objects is also made into an island. The bug was that the hole
vector used for assigning the area had not been updated, so the area slot
in the Polygons object was assigned 0 (because it was still treated as a
hole). Had you said hole=FALSE for P1, it would have been OK. The updating
is now in place.
Thanks,
Roger
>
> SP at polygons[[1]]@area
> [1] 0
>
> Whilst the area of the Polygons are:
>
> SP at polygons[[1]]@Polygons[[1]]@area
> [1] 322111
>
> However, no trouble with the next Polygons:
>> SP at polygons[[2]]@area
> [1] 384740
>> SP at polygons[[2]]@Polygons[[1]]@area
> [1] 384740
>> SP at polygons[[3]]@area
> [1] 423937
>> SP at polygons[[3]]@Polygons[[1]]@area
> [1] 423937
>
> Did I do something wrong, miss something or is there a bug in the
> SpatialPolygons function ?
>
> Patrick
>
>
>
>
>
>
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
------------------------------
Message: 4
Date: Sat, 17 Apr 2010 17:05:03 -0400
From: Thomas Adams <Thomas.Adams at noaa.gov>
To: dylan.beaudette at gmail.com
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Help needed with spplot
Message-ID: <4BCA227F.1020802 at noaa.gov>
Content-Type: text/plain; charset=windows-1252; format=flowed
Dylan,
Thank you for the suggestion and it did help. But, I think another
problem is the way spplot handles drawing off-screen. This does not seem
to be handled well. Ultimately, I was able to find a generalized
shapefile of the CONUS (48) states; this draws tolerably well. I
conducted a few little experiments?
I think the moral of the story is to restrict the vector map to the area
one is interested in and not to be sloppy. I'm still trying to grasp the
subtleties of v.generalize?
Thanks again,
Tom
Dylan Beaudette wrote:
> On Tuesday 13 April 2010, Thomas Adams wrote:
>
>> All:
>>
>> I'm using GRASS 6.4 with R 2.9.2 and sp/spgrass6. When plotting a vector
>> file, read in from GRASS, using spplot, the drawing takes many minutes
>> to complete. Apart from the fact that the vector file is probably more
>> detailed than I need, I know time is spent drawing off-screen. I tried
>> specifying xlim & ylim, but, of course, this just zooms into the area
>> I'm mapping, and does not solve my underlying problem.
>>
>> I also tried using pruneMap(), but this did not seem to make any
>> difference in the length of time before my R prompt returned. By
>> contrast, GRASS re-draws very fast, within a few seconds instead of ~5
>> minutes. I want to use spplot to draw an array of maps (21), so 1+ hours
>> will not work for what I am doing.
>>
>> Any thoughts how I might speed-up the process?
>>
>> Regards,
>> Tom
>>
>
> Hi Tom,
>
> What kind of vector data are you plotting? Probably not points. If you are
> working with very detailed lines or polygons, I would suggest simplifying
> them in GRASS first. In GRASS 6.4, v.clean is the module of choice. If you
> can get GRASS 6.5, then v.generalize will work even better. Note that you
> need to work on boundaries with v.generalize, and too much "pruning" will
> result in broken topology.
>
> I recently used an incantation like this:
> v.generalize in=ca_counties out=ca_counties_simple type=boundary
> method=douglas_reduction threshold=1000
>
> ... to reduce the number of vertices in a map of CA counties, so that I could
> plot it with spplot().
>
> Cheers,
> Dylan
>
>
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177
EMAIL: thomas.adams at noaa.gov
VOICE: 937-383-0528
FAX: 937-383-0033
------------------------------
Message: 5
Date: Sun, 18 Apr 2010 08:41:47 +0200
From: Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr>
To: Roger.Bivand at nhh.no
Cc: Edzer Pebesma <e.pebesma at gmail.com>, r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] sp, area and SpatialPolygons
Message-ID: <4BCAA9AB.6010006 at univ-fcomte.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Except this inexpected 'bug' discovery point the fact that I draw the
hole inadvertently ! I wanted to draw standards polygons but did the
first counterclockwise (so a hole...)... Chaos added to chaos = bug fix.
Let us call that the French wine method... hips !
Anyway, thanks a lot Roger,
Cheers,
Patrick
Roger Bivand a ?crit :
> On Sat, 17 Apr 2010, Patrick Giraudoux wrote:
>
>>
>> I did not find a function in sp to extract area from SpatialPolygons
>> objects. Thus I was thinking about writing some function to do the
>> job similar to the functions written in order to extract lengths from
>> SpatialLines objects (see ?SpatialLines). I have incidentally
>> discovered a strange thing. Let us define a list of 3 polygons:
>>
>> polylist <- list(structure(c(180016, 180034, 180452, 180588, 180615,
>> 180533,
>> 180225, 180016, 332182, 331756, 331774, 332074, 332418, 332518,
>> 332319, 332182), .Dim = c(8L, 2L)), structure(c(179907, 180325,
>> 180397, 180152, 179781, 179672, 179735, 179907, 331611, 331611,
>> 331266, 330931, 330967, 331266, 331466, 331611), .Dim = c(8L,
>> 2L)), structure(c(179499, 179971, 180343, 180161, 179753, 179418,
>> 179499, 330577, 330768, 330468, 330096, 330078, 330369, 330577
>> ), .Dim = c(7L, 2L)))
>>
>> And make a simple SpatialPolygons object with them:
>>
>> SP<-SpatialPolygons(list(Polygons(list(Polygon(polylist[[1]])),ID="P1"),Polygons(list(Polygon(polylist[[2]])),ID="P2"),Polygons(list(Polygon(polylist[[3]])),ID="P3")),pO=as.integer(c(1,2,3)))
>>
>> It looks like if the area of Polygons #1 was not computed:
>
> Patrick,
>
> There is a bug, not not a simple one. The ring direction of your first
> Polygon object signals that it is a hole, but in Polygons(), singleton
> holes are made into islands, and the largest hole in an all-hole list
> of Polygon objects is also made into an island. The bug was that the
> hole vector used for assigning the area had not been updated, so the
> area slot in the Polygons object was assigned 0 (because it was still
> treated as a hole). Had you said hole=FALSE for P1, it would have been
> OK. The updating is now in place.
>
> Thanks,
>
> Roger
>
>>
>> SP at polygons[[1]]@area
>> [1] 0
>>
>> Whilst the area of the Polygons are:
>>
>> SP at polygons[[1]]@Polygons[[1]]@area
>> [1] 322111
>>
>> However, no trouble with the next Polygons:
>>> SP at polygons[[2]]@area
>> [1] 384740
>>> SP at polygons[[2]]@Polygons[[1]]@area
>> [1] 384740
>>> SP at polygons[[3]]@area
>> [1] 423937
>>> SP at polygons[[3]]@Polygons[[1]]@area
>> [1] 423937
>>
>> Did I do something wrong, miss something or is there a bug in the
>> SpatialPolygons function ?
>>
>> Patrick
>>
>>
>>
>>
>>
>>
>>
>>
>
------------------------------
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
End of R-sig-Geo Digest, Vol 80, Issue 18
*****************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 9934 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100418/1fdf8c93/attachment.bin>
More information about the R-sig-Geo
mailing list