[postgis-users] Problem with raster/polygon intersection

David Quinn daithiquinn at gmail.com
Sat Feb 4 16:50:36 PST 2012


Hello List,

I'm trying to intersect a raster with a polygon and running into an error
message that I don't understand.

    SELECT
          ST_SummaryStats(r.rast) as stats
     FROM
          new_york_r as r
     WHERE
          ST_Intersects(r.rast, 'SRID=900913;POLYGON((-8239995.68240392
4974479.31918724,-8230242.31759608 4974479.31918724,-8230242.31759608
4979684.68081276,-8239995.68240392 4979684.68081276,-8239995.68240392
4974479.31918724))')

The error message is:

"ERROR:  function st_intersects(raster, unknown) is not unique
LINE 6:   ST_Intersects(r.rast, 'SRID=900913;POLYGON((-8239995.68240...
          ^
HINT:  Could not choose a best candidate function. You might need to add
explicit type casts."

I am able to run a very similar query with ST_Intersects(r.rast, geom),
where geom is from another table, and it runs fine. ST_Intersects(geom,
'SRID=900913;POLYGON((-823999.....)') also runs without a problem when geom
is a vector.

Is there a step that I am missing here to run this intersection on a raster?

I'm using PostGIS 2.0.0 SVN / Postgresql 9.1 on Windows 7.

Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120204/578c1f41/attachment.html>


More information about the postgis-users mailing list