Hi,

 

I created a retangular raster representing number of lightnings in a square.
So I have this matrix raster created using ST_MapAlgebraFct and
ST_MakeEmptyRaster. 

This raster is not a tiled raster (tb_densitysurface), and when I Clip this
raster using a polygon, the query below, the performance is not good.

Maybe because the raster is not tiled. So how do I tile this raster ? And I
want the result to be a raster (not gval) to be exported as a file, and then
colored using GDAL.

It worked with a different query only using ST_Clip (this returns a rast
column and is very fast), but the edges aren“t smooth as using
ST_Insersection. I am using Postgis 2.5.

 

SELECT

    (gval).val

    (gval).geom

FROM (

    SELECT ST_Intersection(

        ST_Clip(rast,ST_Envelope(area_country)),

        1,

       area_country

    ) As gval

    FROM country, tb_densitysurface WHERE ST_Intersects(rast, area_country)
and country.gid = 19

) As foo

 

 

Regards,

 

Liglio

 

_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to