<div dir="ltr">reclass would allow me to change the values of the pixel.<br><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">"ST_SelectByValue" is supposed to </span>like a map algebra or in ArcGIS Terms select by attribute.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 1:38 PM, Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca" target="_blank">Pierre.Racine@sbf.ulaval.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try ST_Reclass().<br>
<div class=""><br>
> -----Original Message-----<br>
> From: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>
> <a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] On Behalf Of David Haynes<br>
> Sent: Friday, May 30, 2014 10:49 AM<br>
> To: <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> Subject: [postgis-users] ST_SelectByValue<br>
><br>
> Hello,<br>
><br>
> I am fairly new to using rasters in postgis, but I am wondering if there is a<br>
> faster way to extract values from categorical rasters (e.g. landcover types)<br>
> than using map algebra. In the PostGIS in Action book, pg 404 has a<br>
> function called ST_SelectByValue(raster|geometry, 'expression') which<br>
> seems to incorporate map algebra, however I can't seem to tell if this<br>
> function is finished and available in postgis as I get an unknown function<br>
> error.<br>
><br>
> My version is this.<br>
> "PostgreSQL 9.3.2 on x86_64-unknown-linux-gnu, compiled by gcc<br>
> (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit POSTGIS="2.1.1 r12113"<br>
> GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009"<br>
> GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8" LIBJSON="UN<br>
> (...)"<br>
><br>
><br>
> And I found a webpage<br>
> <a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03" target="_blank">http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03</a><br>
><br>
> search for "ST_SelectByValue" at the bottom, indicating that it was finished.<br>
><br>
><br>
> AAccomplished Objectives<br>
</div>> <<a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03#A" target="_blank">http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03#A</a><br>
> ccomplishedObjectives><br>
<div class="">><br>
><br>
> ST_ValueCount(raster, value) -> integer - done see below<br>
><br>
> ST_ValuePercent(raster, value) -> double precision - done see below<br>
><br>
> ST_Resample(raster, method, originx, originy, pixelsizex, pixelsizey) -> raster<br>
> - done see below<br>
><br>
> ST_SelectByValue(raster, 'expression') -> same type as first argument<br>
><br>
> ST_Clip(raster|geometry,geometry) -> same type as first argument<br>
<br>
</div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>