[R-sig-Geo] polygonValues (raster): Very slow

Agustin Lobo alobolistas at gmail.com
Thu Jul 1 07:02:53 CEST 2010


Pierre,

This looks great also, thanks. It's going to take a while, though, as
I'm working
on linux and will have to compile WKT and probably PostGis also (don't
know if the
later comes included with the binary distro of qgis).
Why don't you talk to the ubuntugis people for a regular ubuntu
package? You could use
the unstable branch if needed:
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
This would make things so much easier for people using ubuntu and WKT would be
tested by many more users.

I'll let you know how this works.

Agus



2010/6/30 Pierre Racine <Pierre.Racine at sbf.ulaval.ca>:
> Agustin,
>
> PostGIS WKT Raster was made to do exactly this kind of operation on large datasets. Give it a try!
>
> http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01
>
> Pierre
>
>>-----Original Message-----
>>From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of
>>Agustin Lobo
>>Sent: 30 juin 2010 10:13
>>To: r-sig-geo
>>Cc: agustin.lobo at ija.csic.es
>>Subject: [R-sig-Geo] polygonValues (raster): Very slow
>>
>>Hi!
>>I'm trying:
>>
>>> eugrd025EFDC <- readOGR(dsn="eugrd025EFDC",layer="eugrd025EFDC")
>>v <- polygonValues(p=eugrd025EFDC, Br, weights=TRUE)
>>
>>where
>>
>>> str(eugrd025EFDC,max.level=2)
>>Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
>>  ..@ data       :'data.frame':        18000 obs. of  5 variables:
>>  ..@ polygons   :List of 18000
>>  .. .. [list output truncated]
>>  ..@ plotOrder  : int [1:18000] 17901 17900 17902 17903 17899 17898
>>17904 17897 17905 17906 ...
>>  ..@ bbox       : num [1:2, 1:2] 2484331 1314148 6575852 4328780
>>  .. ..- attr(*, "dimnames")=List of 2
>>  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
>>
>>> summary(Br)
>>Cells:  13967442
>>NAs  :  0
>>
>>
>>Min.       0.00
>>1st Qu.    0.00
>>Median     0.00
>>Mean      48.82
>>3rd Qu.    0.00
>>Max.    4999.00
>>
>>so quite large objects.
>>
>>The problem is that  polygonValues() has been running (and not
>>completed the task) for
>>more than 2 h on a intel core i7 machine with 16 Gb RAM (Dell
>>Precision M6500), so a pretty powerful machine.
>>Is there any way I could speed up this process?
>>Also, is there anything I could do in order to take better advantage
>>of the 8 processing threads?
>>Currently, I see only 1 cpu working for R processes and the rest
>>remain pretty inactive
>>
>>Thanks
>>
>>Agus
>>
>>_______________________________________________
>>R-sig-Geo mailing list
>>R-sig-Geo at stat.math.ethz.ch
>>https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list