[postgis-devel] Which intersection is faster?

Bborie Park dustymugs at gmail.com
Sat Mar 23 10:30:08 PDT 2013


I'd suggest using the variant that runs in raster space.  If I
remember correctly, some changes have been made to this in 2.1.

-bborie

On Sat, Mar 23, 2013 at 10:20 AM, Jorge Arévalo
<jorgearevalo at libregis.org> wrote:
> Hello,
>
> I don't know if this is a naive question, but in ST_Intersects description (http://postgis.net/docs/manual-2.0/RT_ST_Intersects.html) I read:
>
> "Depending on the order that the raster and geometry is passed to ST_Intersects(), the test will operate in either raster-space or geometry-space. If ST_Intersects(raster, ....), the test is in raster-space (the geometry is converted to a raster). If ST_Intersects(geometry, ...), the test is in geometry-space (the raster is converted to a set of pixel polygons)."
>
> My question: in equal conditions, which version should be faster?
>
> ST_Intersects(raster, vector) --> in raster space
> ST_Intersects(vector, raster) --> in vector space
>
> Many thanks in advance,
>
> --
> Jorge Arevalo
> Freelance developer
>
> http://www.krop.com/jorgearevalo
> http://about.me/jorgeas80
>
> Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list