[postgis-devel] Spatial granularity & memory error

David Haynes II dahaynes at umn.edu
Wed Oct 8 07:08:56 PDT 2014


Hello,

I have a question about this memory error that I keep running up against.
Trying to determine if there are ways around it. This project uses large
world extent rasters were the spatial resolution of the datasets range from
30M to 10Km. The following query completes easily for any raster with a
resolution of 1K or larger. However, I notice that once I use the raster
(globcover) with a resolution of 300M I get this memory error.  "Dimensions
requested exceed the maximum (65535 x 65535)"

http://lists.osgeo.org/pipermail//postgis-users/2012-November/035744.html

Reading from this ticket, I found can get the around the error by removing
the union function. Is there a systematic way of determining when I will
hit this limit. Also this spatial intersection is frequently used in our
project as we are taking the geographic boundaries of all 50 US states.


select bound.gid, bound.label,
ST_Union(ST_Clip(r.rast,bound.geog::geometry)) as rast
from gis_scratch.us_1960_2010_hflad_geo1a_us bound
inner join gis_rasters.globcover_2009 r on ST_Intersects(r.rast,
bound.geog::geometry)
group by bound.gid, bound.label


-- 
David Haynes, Ph.D.
Research Associate Terra Populous
Minnesota Population Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20141008/51759a63/attachment.html>


More information about the postgis-devel mailing list