[postgis-users] ST_Buffer + grid problem

Ed Linde edolinde at gmail.com
Fri Mar 23 08:17:10 PDT 2012


Yes, I noticed the huge difference as well when projecting to another
coordinate system. So you reckon I don't need to do that and just follow
your last mail on
how to make an empty raster and use map algebra?

On Fri, Mar 23, 2012 at 4:11 PM, Pierre Racine
<Pierre.Racine at sbf.ulaval.ca>wrote:

> > Is this ok? Once I have made the raster, I can then transform it back to
> srid 4326
> > before doing PixelAsPolygons right?
>
> You definitely have to be able to view your grid and your data. So you can
> quickly make sure both extents are ok.
>
> This seems to be very big comparing with what I got the other day
> (1020x24798). You will end up with way too many polygons (361932 x 423152 =
> 153152249664)... Even if you cut by two to remove the ones that fall in the
> water. You will have to do everything in raster space (the ST_MapAlgebraFct
> technique) and that would be too slow.
>
> I think the best approach in this case would go like this:
>
> 1) Tile your grid (smaller the better)
>
> 2) Write a function burning a rasterization of each road in the right tile
> using ST_MapAlgebra(rast, ST_AsRaster(roadgeom)) taking the actual value of
> the tile into account
>
> That might work fast enough.
>
> Pierre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120323/58aee4b3/attachment.html>


More information about the postgis-users mailing list