[postgis-devel] ST_Intersection(raster, geom).val returning integer while expecting float

Tom van Tilburg tom.van.tilburg at gmail.com
Sun Dec 4 11:15:01 PST 2011


Very clarifying answer.
Thanks a lot bborie.

Tom

On 4-12-2011 20:04, Bborie Park wrote:
> .
>
> You're not missing anything.  The question is "Does this function
> operate in vector or raster space?".  ST_SummaryStats (and most other
> functions) operate in raster space.  The current ST_Intersection
> function operates in vector space where the raster is converted in
> geometries and then processed.  I need to write the raster space
> version of ST_Intersection within this month though.
>
> In the end, there will be two types of raster functions, some that run
> in vector space and some that run in raster space.  A good case in
> point is ST_Intersects.  Any ST_Intersects function that looks like
>
> ST_Intersects(raster, geometry)
>
> has the internal operation done in raster space while any function
> that looks like
>
> ST_Intersects(geometry, raster)
>
> has the internal operation done in vector space.  The order in which
> the raster and geometry is passed into the function determines the
> space that the function works in.
>
> We decided to have functions that operate in both spaces because there
> are situations where the answer you get can differ.  The standard case
> I use is a corner of a triangular polygon touching a raster.
>
> http://trac.osgeo.org/postgis/attachment/wiki/WKTRaster/SpecificationWorking03/st_intersects_triangle.png
>
> As you can see, when the intersects test is done in vector space, the
> raster converted to a geometry and the geometry intersects BUT if the
> geometry is converted to raster, there is no intersection.
>
> -bborie
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list