mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 09:32:46 +00:00
ST_SetValue
git-svn-id: http://svn.osgeo.org/postgis/trunk@5754 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
88f836eed2
commit
3503b149fb
|
@ -1490,7 +1490,7 @@ WHERE rid = 2;
|
|||
</sect1>
|
||||
|
||||
<sect1 id="Raster_Pixel_Accessors">
|
||||
<title>Raster Pixel Accessors</title>
|
||||
<title>Raster Pixel Accessors and Settors</title>
|
||||
|
||||
<refentry id="RT_ST_PixelAsPolygon">
|
||||
<refnamediv>
|
||||
|
@ -1748,6 +1748,81 @@ WHERE
|
|||
<xref linkend="ST_Intersects" /></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
|
||||
<refentry id="RT_ST_SetValue">
|
||||
<refnamediv>
|
||||
<refname>ST_SetValue</refname>
|
||||
<refpurpose>Sets the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>double precision <function>ST_SetValue</function></funcdef>
|
||||
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
|
||||
<paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
|
||||
<paramdef><type>double precision </type> <parameter>newvalue</parameter></paramdef>
|
||||
</funcprototype>
|
||||
<funcprototype>
|
||||
<funcdef>double precision <function>ST_SEtValue</function></funcdef>
|
||||
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>bandnum</parameter></paramdef>
|
||||
<paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
|
||||
<paramdef><type>double precision </type> <parameter>newvalue</parameter></paramdef>
|
||||
</funcprototype>
|
||||
<funcprototype>
|
||||
<funcdef>double precision <function>ST_SetValue</function></funcdef>
|
||||
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>
|
||||
<paramdef><type>double precision </type> <parameter>newvalue</parameter></paramdef>
|
||||
</funcprototype>
|
||||
<funcprototype>
|
||||
<funcdef>double precision <function>ST_SetValue</function></funcdef>
|
||||
<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>bandnum</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef>
|
||||
<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>
|
||||
<paramdef><type>double precision </type> <parameter>newvalue</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection>
|
||||
<title>Description</title>
|
||||
<para>Sets the specified pixel value to new value for the designed band given the row column location or a goemetric point location.
|
||||
If no band is specified, then band 1 is assumed.
|
||||
</para>
|
||||
<note><para>Setting by geometry currently only works for points.</para></note>
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>Examples</title>
|
||||
|
||||
<programlisting>
|
||||
-- Geometry example
|
||||
SELECT (foo.geomval).val, ST_AsText(ST_Union((foo.geomval).geom))
|
||||
FROM (SELECT ST_DumpAsPolygons(
|
||||
ST_SetValue(rast,1,
|
||||
ST_Point(3427927.75, 5793243.95),
|
||||
50)
|
||||
) As geomval
|
||||
FROM dummy_rast
|
||||
where rid = 2) As foo
|
||||
WHERE (foo.geomval).val < 250
|
||||
GROUP BY (foo.geomval).val;
|
||||
|
||||
val | st_astext
|
||||
-----+-------------------------------------------------------------------
|
||||
50 | POLYGON((3427927.75 5793244,3427927.75 5793243.95,3427927.8 579324 ...
|
||||
249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 57932 ...
|
||||
</programlisting>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<title>See Also</title>
|
||||
<para><xref linkend="RT_ST_Value" />, <xref linkend="RT_ST_DumpAsPolygons" /></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="Raster_Editors">
|
||||
|
|
Loading…
Reference in a new issue