[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] ST_Clip
From: Pierre Racine <Pierre.Racine () sbf ! ulaval ! ca>
Date: 2012-07-26 18:06:26
Message-ID: 87A96661E65C5541AB4D20721C2DD7F8CFBC9180A7 () EXCH-MBX-A ! ulaval ! ca
[Download RAW message or body]
Now what if you symbolize the value of the raster properly (1 = white and -1 = black) to display the shape of the buffer?
> -----Original Message-----
> From: postgis-users-bounces@postgis.refractions.net [mailto:postgis-users-
> bounces@postgis.refractions.net] On Behalf Of Paolo Cavallini
> Sent: Thursday, July 26, 2012 2:04 PM
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] ST_Clip
>
> Il 26/07/2012 19:54, Paolo Cavallini ha scritto:
> > Il 26/07/2012 19:39, Pierre Racine ha scritto:
> >> What happen if do a query like this:
> >>
> >> SELECT (gv).geom, (gv).val
> >> FROM (SELECT
> ST_PixelAsPolygons(ST_AsRaster(ST_Buffer(ST_Centroid(ST_Envelope(rast)),
> 0.5000), rast, ST_BandPixelType(rast, 1), 1, -1)) gv
> >> FROM hdr
> >> WHERE rid = 4
> >> ) foo
> >>
> >> and display the resulting geometries labelled with the values?
> >>
> >> This is the first step of the clipping: creating a rasterized version of the buffer
> geometry aligned on the raster.
> If I redo the query with the same buffer size as my previous one, I
> obtain a grid that encloses exactly the buffer; the raster is smaller.
> See attached.
> Thanks.
>
> --
> Paolo Cavallini - Faunalia
> www.faunalia.eu
> Full contact details at www.faunalia.eu/pc
> Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic