]> granicus.if.org Git - postgis/commitdiff
wrap php code in cdata tags
authorRegina Obe <lr@pcorp.us>
Mon, 26 Dec 2011 20:20:32 +0000 (20:20 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 26 Dec 2011 20:20:32 +0000 (20:20 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8584 b70326c6-7e19-0410-871a-916f4a2858ee

doc/using_raster_dataman.xml

index ead4d554d9841acf5cf54ba1312365260b27ce57..d4c6faef0cb9ed59f5429d9834a6ad4c4ef7bb53 100644 (file)
@@ -507,6 +507,7 @@ Available GDAL raster formats:
                                a particular wgs 84 bounding box and then unions with <xref linkend="RT_ST_Union" /> the intersecting tiles together returning all bands, transforms to user specified projection using <xref linkend="RT_ST_Transform" />,
                                and then outputs the results as a png using <xref linkend="RT_ST_AsPNG" />.</p>
                        <programlisting>
+<![CDATA[
 <?php
 $conn_str ='dbname=mydb host=localhost port=5432 user=myuser password=mypwd';
 $dbconn = pg_connect($conn_str);
@@ -516,7 +517,7 @@ if (!empty( $_REQUEST['srid'] ) && is_numeric( $_REQUEST['srid']) ){
                $input_srid = intval($_REQUEST['srid']);
 }
 else { $input_srid = 26986; }
-
+/** The set bytea_output may be needed for PostgreSQL 9.0+, but not for 8.4 **/
 $sql = "set bytea_output='escape';
 SELECT ST_AsPNG(ST_Transform(
                        ST_AddBand(ST_Union(rast,1), ARRAY[ST_Union(rast,2),ST_Union(rast,3)])
@@ -529,7 +530,7 @@ $row = pg_fetch_row($result);
 pg_free_result($result);
 if ($row === false) return;
 echo pg_unescape_bytea($row[0]);
-?></programlisting>
+?>]]></programlisting>
                </sect2>
    </sect1>
 </chapter>