[R-sig-Geo] How to do Zonal Statistics after Kriging in R given Shapefile of Polygon
edzer.pebesma at uni-muenster.de
Fri Sep 13 10:29:00 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
In the script, you set the wrong CRS to the long/lat points. Set the
right CRS, then spTransform to the new one. Check that they match
after reprojection by plotting with axes, eg.
points(muni.sp, col = 'red')
Second, when you work in projected coordinates having large numbers,
using 1 as an initial value for a variogram range fit will not work;
choose sth else, e.g. 100000 or so.
On 09/13/2013 06:12 AM, James Matthew Miraflor wrote:
> Hi Jesse, Edzer, and R-SIG-GEO!
> I was able to make Kriging work, following the suggestions of Jesse
> and Edzer. However, the results don't turn out to be right - the
> Kriging and IDW done on a grid is not the same (in fact, it seems
> to be a mirror image) of the block kriging using a separate map.
> The grid kriging is in fact closer to the small area estimates
> (which is the actual sample).
> You may take a look at the images here:
> The R Code is here:
> The R Data is here:
> Would you know why block Kriging and block IDW have such a weird
> results? Thank you for your time and patience.
> On Fri, Sep 13, 2013 at 12:26 AM, James Matthew Miraflor <
> james.miraflor at gmail.com> wrote:
>> Thanks Jesse and Edzer! It finally worked.
>> On Thu, Sep 12, 2013 at 11:44 PM, Jesse Berman
>> <berman.jesse at gmail.com>wrote:
>>> robin<-"+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
>>> +datum=WGS84 +units=m +no_defs" muni.sp2<-spTransform(muni.sp,
>>> CRS(robin)) brgy_poly2<-spTransform(brgy_poly, CRS(robin))
>> -- *
>> * *James Matthew B. Miraflor* MS Computer Science College of
>> Engineering University of the Philippines
>> http://politicsforbreakfast.blogspot.com ________
>> "No problem can withstand the assault of sustained thinking." -
>> Voltaire ________
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the R-sig-Geo