[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-54-g682f9bc

git at osgeo.org git at osgeo.org
Sat Aug 15 12:38:05 PDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  682f9bc35358c24c91789c87413620b11150e4dd (commit)
       via  b73fc905b1ba58780cfdc750c3dbc5cd22389ea0 (commit)
      from  866293b52cac266d75368c0f88a01ab4eae63b0a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 682f9bc35358c24c91789c87413620b11150e4dd
Merge: b73fc90 866293b
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Aug 15 15:37:53 2020 -0400

    Merge branch 'master' of https://git.osgeo.org/gitea/postgis/postgis


commit b73fc905b1ba58780cfdc750c3dbc5cd22389ea0
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Aug 15 15:37:41 2020 -0400

    raster doc update closes  #4640 for PostGIS 3.1.0

diff --git a/doc/faq_raster.xml b/doc/faq_raster.xml
index c5f24c0..bcf9221 100644
--- a/doc/faq_raster.xml
+++ b/doc/faq_raster.xml
@@ -20,9 +20,9 @@
 
       <answer>
         <para>There is a full length beginner tutorial <ulink url="http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01"> Intersecting vector buffers with large raster coverage using PostGIS Raster</ulink>.
-        Jorge has a series of blog articles on PostGIS Raster that demonstrate how to load raster data as well as cross compare to same tasks in Oracle GeoRaster. Check out
+        Jorge has a series of blog articles on PostGIS Raster that demonstrate how to load raster data as well as cross compare to same tasks in Oracle GeoRaster. Check out:
             <ulink url="http://gis4free.wordpress.com/category/postgis-raster/">Jorge's PostGIS Raster / Oracle GeoRaster Series</ulink>.
-            There is a whole chapter (more than 35 pages of content) dedicated to PostGIS Raster with free code and data downloads at <ulink url="https://www.manning.com/books/postgis-in-action-second-edition">PostGIS in Action - Raster chapter</ulink>.
+            There is a whole chapter (more than 35 pages of content) dedicated to PostGIS Raster with free code and data downloads at <ulink url="https://www.manning.com/books/postgis-in-action-third-edition">PostGIS in Action - Raster chapter. Also covered in second edition.</ulink>.
         You can <ulink url="http://www.postgis.us/page_buy_book">buy PostGIS in Action</ulink> now from Manning in hard-copy (significant discounts for bulk purchases) or just the E-book format.
         You can also buy from Amazon and various other book distributors. All hard-copy books come with a free coupon to download the E-book version.
         </para>
@@ -37,29 +37,8 @@
       </question>
 
       <answer>
-        <para>Starting with PostGIS 2.0 PostGIS Raster is fully integrated, so it will be compiled when you compile PostGIS.</para>
-	<para>Instructions for installing and running under windows are available at <ulink url="http://gis4free.wordpress.com/2011/03/10/how-to-install-and-configure-postgis-raster-on-windows/">How to Install and Configure PostGIS raster on windows</ulink></para>
-        <para>
-			If you are on windows, you can compile yourself, or use the <ulink
-            url="http://postgis.net/windows_downloads">pre-compiled
-            PostGIS Raster windows binaries</ulink>.
-			If you are on Mac OSX Leopard or Snow Leopard, there are binaries available at <ulink url="http://www.kyngchaos.com/software/postgres">Kyng Chaos Mac OSX PostgreSQL/GIS binaries</ulink>.
-		</para>
-		<para>For other platforms, install PostGIS from your software repository. For more details about compiling from source, please refer to <ulink url="http://trac.osgeo.org/postgis/wiki/WKTRaster/Documentation01#a2.3-CompilingandInstallingfromSources">Installing PostGIS Raster from source</ulink></para>
-      </answer>
-    </qandaentry>
-
-	 <qandaentry>
-      <question>
-        <para>I get error could not load library "C:/Program Files/PostgreSQL/8.4/lib/rtpostgis.dll": The specified module could not be found.
-	or could not load library on Linux when trying to run rtpostgis.sql</para>
-      </question>
-
-      <answer>
-        <para>rtpostgis.so/dll is built with dependency on libgdal.dll/so. Make sure for Windows you have libgdal-1.dll in the bin folder of your PostgreSQL install.
-        For Linux libgdal has to be in your path or bin folder.  </para>
-		<para>You may also run into different errors if you don't have PostGIS installed in your database.  Make sure to install PostGIS first in your
-		database before trying to install the raster support.</para>
+        <para>PostGIS Raster is part of the PostGIS codebase and generally available with most PostGIS binary distributions.  Starting with PostGIS 3.0, PostGIS raster is now a separate extension and requires:  `CREATE EXTENSION postgis_raster;` to enable it in your database. If you are compiling your own PostGIS, you will need to compile with GDAL otherwise postgis_raster extension will not be builit.</para>
+        <para>Refer to <ulink url="http://postgis.net/install/">Download PostGIS binaries</ulink> for popular distributions of PostGIS that include raster support.</para>
       </answer>
     </qandaentry>
 
@@ -92,7 +71,8 @@
 
       <answer>
         <para>Yes</para>
-		<para>GDAL has a PostGIS raster driver, but is only compiled in if you choose to compile with PostgreSQL support. </para>
+        <para>PostGIS raster has a function <xref linkend="RT_ST_AsGDALRaster" /> that will allow you to use SQL to export to any raster format supported by your GDAL.  You can get a list of these using the <xref linkend="RT_ST_GDALDrivers" /> SQL function.</para>
+		<para>You can also use GDAL commandline tools to export PostGIS raster to other formats. GDAL has a PostGIS raster driver, but is only compiled in if you choose to compile with PostgreSQL support. </para>
 		<para>The driver currently doesn't support irregularly blocked rasters,
 		although you can store irregularly blocked rasters in PostGIS raster data type.</para>
 		<para>If you are compiling from source, you need to include in your configure
@@ -119,20 +99,19 @@
 			Below are some using a where clause</para>
 		 <programlisting>gdal_translate -of PNG -outsize 10% 10% "PG:host=localhost port=5432 dbname='mygisdb' user='postgres' password='whatever' schema='someschema' table=sometable where='filename=\'abcd.sid\''" " C:\somefile.png</programlisting>
 		 <programlisting>gdal_translate -of PNG -outsize 10% 10% "PG:host=localhost port=5432 dbname='mygisdb' user='postgres' password='whatever' schema='someschema' table=sometable where='ST_Intersects(rast, ST_SetSRID(ST_Point(-71.032,42.3793),4326) )' " C:\intersectregion.png</programlisting>
-		 <para>To see more examples and syntax refer to <ulink url="http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html#a3.2-Readingrasterdatafromthedatabase">Reading Raster Data of PostGIS Raster section</ulink></para>
+		 <para>To see more examples and syntax refer to <ulink url="https://gdal.org/drivers/raster/postgisraster.html">Reading Raster Data of PostGIS Raster section</ulink></para>
       </answer>
     </qandaentry>
 
     <qandaentry>
 	<question><para>Are their binaries of GDAL available already compiled with PostGIS Raster suppport?</para></question>
 	<answer>
-		<para>Yes. Check out the page <ulink url="http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries">GDAL Binaries</ulink> page.  Any compiled with PostgreSQL
-		support should have PostGIS Raster in them.  </para>
-		<para>PostGIS Raster is undergoing many changes.  If you want to get the latest nightly build for Windows -- then check out
+		<para>Yes. Check out the page <ulink url="https://gdal.org/download.html#binaries">GDAL Binaries</ulink> page.  Any compiled with PostgreSQL
+		support should have PostGIS Raster in them. GDAL tools is also generally included as part of <ulink url="https://qgis.org">QGIS</ulink>.</para>
+		<para>If you want to get the latest nightly build for Windows -- then check out
 		 the Tamas Szekeres  nightly builds built with Visual Studio which contain GDAL trunk, Python Bindings and MapServer executables and PostGIS Raster driver built-in.  Just
          click the SDK bat and run your commands from there.  <ulink url="www.gisinternals.com">http://www.gisinternals.com</ulink>.
 			Also available are VS project files.</para>
-			<para><ulink url="http://fwtools.maptools.org/">FWTools latest stable version for Windows is compiled with Raster support</ulink>.</para>
 	</answer>
     </qandaentry>
 
@@ -142,10 +121,10 @@
       </question>
 
       <answer>
-        <para>You can use MapServer compiled with GDAL 1.7+ and PostGIS Raster driver support to view Raster data. QGIS supports viewing of PostGIS Raster if you
+        <para>You can use <ulink url="https://mapserver.org/">MapServer</ulink> compiled with GDAL to view Raster data. QGIS supports viewing of PostGIS Raster if you
         have PostGIS raster driver installed.</para>
         <para>In theory any tool that renders data using GDAL can support PostGIS raster data or
-            support it with fairly minimal effort. Again for Windows, Tamas' binaries <ulink url="www.gisinternals.com">http://www.gisinternals.com</ulink> are a good choice if you don't want the hassle of having to setup to compile your own.</para>
+            support it with fairly minimal effort. Again for Windows, Tamas' binaries (includes Mapserver) <ulink url="www.gisinternals.com">http://www.gisinternals.com</ulink> are a good choice for windows users if you don't want the hassle of having to setup to compile your own.</para>
       </answer>
     </qandaentry>
 
@@ -156,9 +135,9 @@
 
       <answer>
         <para>First you need GDAL 1.7 or higher compiled with PostGIS raster support.
-            GDAL 1.8 or above is preferred since many issues have been fixed in 1.8 and more PostGIS raster issues fixed in trunk version.</para>
+            GDAL 3 or above is preferred since many issues have been fixed in 1.8 and more PostGIS raster issues fixed in trunk version.</para>
         <para>You can much like you can with any other raster.
-        Refer to <ulink url="http://mapserver.org/input/raster.html">MapServer Raster processing options</ulink>
+        Refer to <ulink url="https://mapserver.org/input/raster.html">MapServer Raster processing options</ulink>
         for list of various processing functions you can use with MapServer raster layers.</para>
         <para>What makes PostGIS raster data particularly interesting, is that since
 	each tile can have various standard database columns, you can segment it in your data source</para>
diff --git a/doc/html/images/rt_st_transform04.png b/doc/html/images/rt_st_transform04.png
new file mode 100644
index 0000000..ebc068d
Binary files /dev/null and b/doc/html/images/rt_st_transform04.png differ
diff --git a/doc/html/images/rt_st_transform05.png b/doc/html/images/rt_st_transform05.png
new file mode 100644
index 0000000..f464c67
Binary files /dev/null and b/doc/html/images/rt_st_transform05.png differ
diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml
index 41e714e..8d0dcd9 100644
--- a/doc/reference_raster.xml
+++ b/doc/reference_raster.xml
@@ -203,11 +203,6 @@ VALUES (1,
             <para>raster is a spatial data type used to represent raster data such as those imported from JPEGs, TIFFs, PNGs, digital elevation models.
                 Each raster has 1 or more bands each having a set of pixel values. Rasters can be georeferenced.</para>
             <note>
-              <para>
-                Requires PostGIS Raster support to be enabled in the database. See <xref linkend="create_spatial_db" /> for more details.
-              </para>
-            </note>
-            <note>
               <para>Requires PostGIS be compiled with GDAL support. Currently rasters can be implicitly converted to geometry type, but the conversion returns the
                 <xref linkend="RT_ST_ConvexHull" /> of the raster.  This auto casting may be removed in the near future so don't rely on it.</para>
             </note>
@@ -4011,20 +4006,20 @@ select st_bandisnodata(rast, 2) from dummy_rast where rid = 1; -- Expected false
 			<refsection>
 				<title>Description</title>
 
-				<para>Returns system file path to a band.  Returns null for in db raster bands.</para>
-			</refsection>
+				<para>Returns system file path to a band.  Throws an error if called with an in db band.</para>
+				</refsection>
 
-			<refsection>
+				<refsection>
 					<title>Examples</title>
 
-					<programlisting>SELECT rid, ST_BandPath(rast,1) AS file_path
-FROM dem
-LIMIT 1;</programlisting>
+					<programlisting><!-- TODO: -->
+					</programlisting>
+
 			</refsection>
 
 			<refsection>
 				<title>See Also</title>
-				<para><xref linkend="RT_ST_BandFileSize" />, <xref linkend="RT_ST_BandFileTimestamp" />, <xref linkend="RT_ST_BandMetaData" />, <xref linkend="postgis_enable_outdb_rasters" />, <xref linkend="outdb" /></para>
+				<para></para>
 			</refsection>
 		</refentry>
 
@@ -6985,23 +6980,24 @@ SELECT rid, (meta).* FROM bar
 					ST_Transform is often confused with ST_SetSRID(). ST_Transform actually changes the coordinates of a raster (and resamples the pixel values) from one spatial reference system to another, while ST_SetSRID() simply changes the SRID identifier of the raster.
 				</para>
 
+				<para>
+					Unlike the other variants, Variant 3 requires a reference raster as <varname>alignto</varname>. The transformed raster will be transformed to the spatial reference system (SRID) of the reference raster and be aligned (ST_SameAlignment = TRUE) to the reference raster.
+				</para>
+
 				<note>
 					<para>
-						If you are transforming more than one tile, such as a table of coverage rasters you should use the <code>ST_Transform(rast,alignto)</code> (Variant 3)
-						to ensure the tiles will all have same alignment (needed by many operations such as ST_Union) and minimize on gaps between tiles.
+						If you find your transformation support is not working right, you may need to set the environment variable PROJSO to the .so or .dll projection library your PostGIS is using.  This just needs to have the name of the file. So for example on windows, you would in Control Panel -> System -> Environment Variables add a system variable called <varname>PROJSO</varname> and set it to <varname>libproj.dll</varname> (if you are using proj 4.6.1).  You'll have to restart your PostgreSQL service/daemon after this change.
 					</para>
-					<para>Unlike the other variants, Variant 3 requires a reference raster as <varname>alignto</varname>. The transformed raster will be transformed to the spatial reference system (SRID) of the reference raster and be aligned (ST_SameAlignment = TRUE) to the reference raster.</para>
 				</note>
 
-				<note>
+				<warning>
 					<para>
-						If you find your transformation support is not working right, you may need to set the environment variable PROJSO to the .so or .dll projection library your PostGIS is using.  This just needs to have the name of the file. So for example on windows, you would in Control Panel -> System -> Environment Variables add a system variable called <varname>PROJSO</varname> and set it to <varname>libproj.dll</varname> (if you are using proj 4.6.1).  You'll have to restart your PostgreSQL service/daemon after this change.
+						When transforming a coverage of tiles, you almost always want to use a reference raster to insure same alignment as demonstrated in example: Variant 3.
 					</para>
-				</note>
+				</warning>
 
-				<para>Enhanced: 2.1.0 Addition of ST_Transform(rast, alignto) variant</para>
 				<para>Availability: 2.0.0  Requires GDAL 1.6.1+</para>
-
+				<para>Enhanced: 2.1.0 Addition of ST_Transform(rast, alignto) variant</para>
 			</refsection>
 
 			<refsection>
@@ -7099,6 +7095,33 @@ FROM baz
 ------+-------------+---------
  t    | f           | t
 				</programlisting>
+				<informaltable>
+				  <tgroup cols="2">
+					<tbody>
+					  <row>
+						<entry><para><informalfigure>
+							<mediaobject>
+							  <imageobject>
+								<imagedata fileref="images/rt_st_transform04.png" />
+							  </imageobject>
+							  <caption><para>not_aligned</para></caption>
+							</mediaobject>
+						  </informalfigure>
+						  </para></entry>
+
+						<entry><para><informalfigure>
+							<mediaobject>
+							  <imageobject>
+								<imagedata fileref="images/rt_st_transform05.png" />
+							  </imageobject>
+							  <caption><para>aligned</para></caption>
+							</mediaobject>
+						  </informalfigure>
+						</para></entry>
+					  </row>
+						</tbody>
+						</tgroup>
+					</informaltable>
 			</refsection>
 
 			<refsection>
@@ -7554,7 +7577,7 @@ rid | exclude_nodata | include_nodata
 				<funcsynopsis>
 					<funcprototype>
 						<funcdef>bigint <function>ST_CountAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 						<paramdef><type>double precision </type> <parameter>sample_percent</parameter></paramdef>
@@ -7562,14 +7585,14 @@ rid | exclude_nodata | include_nodata
 
 					<funcprototype>
 						<funcdef>bigint <function>ST_CountAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 					</funcprototype>
 
 					<funcprototype>
 						<funcdef>bigint <function>ST_CountAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 					</funcprototype>
 
@@ -8130,7 +8153,7 @@ FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band,true,0.25) As stats
 				<funcsynopsis>
 					<funcprototype>
 						<funcdef>summarystats <function>ST_SummaryStatsAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 						<paramdef><type>double precision </type> <parameter>sample_percent</parameter></paramdef>
@@ -8138,14 +8161,14 @@ FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band,true,0.25) As stats
 
 					<funcprototype>
 						<funcdef>summarystats <function>ST_SummaryStatsAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 						<paramdef><type>double precision </type> <parameter>sample_percent</parameter></paramdef>
 					</funcprototype>
 
 					<funcprototype>
 						<funcdef>summarystats <function>ST_SummaryStatsAgg</function></funcdef>
-						<paramdef><type>raster set</type> <parameter>rast</parameter></paramdef>
+						<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
 						<paramdef><type>integer </type> <parameter>nband</parameter></paramdef>
 						<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></paramdef>
 					</funcprototype>
@@ -9816,8 +9839,8 @@ FROM apple;
 							<funcdef>raster <function>ST_Intersection</function></funcdef>
 							<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef>
 							<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef>
-							<paramdef choice="opt"><type>text </type> <parameter>returnband='BOTH'</parameter></paramdef>
-							<paramdef choice="opt"><type>double precision[] </type> <parameter>nodataval=NULL</parameter></paramdef>
+							<paramdef choice="opt"><type>text </type> <parameter>returnband</parameter></paramdef>
+							<paramdef choice="opt"><type>double precision[] </type> <parameter>nodataval</parameter></paramdef>
 					  </funcprototype>
 
 					  <funcprototype>
@@ -9835,8 +9858,8 @@ FROM apple;
 							<paramdef><type>integer </type> <parameter>band1</parameter></paramdef>
 							<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef>
 							<paramdef><type>integer </type> <parameter>band2</parameter></paramdef>
-							<paramdef choice="opt"><type>text </type> <parameter>returnband='BOTH'</parameter></paramdef>
-							<paramdef choice="opt"><type>double precision[] </type> <parameter>nodataval=NULL</parameter></paramdef>
+							<paramdef choice="opt"><type>text </type> <parameter>returnband</parameter></paramdef>
+							<paramdef choice="opt"><type>double precision[] </type> <parameter>nodataval</parameter></paramdef>
 					  </funcprototype>
 
 					</funcsynopsis>

-----------------------------------------------------------------------

Summary of changes:
 doc/faq_raster.xml                    |  49 ++++++--------------
 doc/html/images/rt_st_transform04.png | Bin 0 -> 13888 bytes
 doc/html/images/rt_st_transform05.png | Bin 0 -> 7482 bytes
 doc/reference_raster.xml              |  83 ++++++++++++++++++++++------------
 4 files changed, 67 insertions(+), 65 deletions(-)
 create mode 100644 doc/html/images/rt_st_transform04.png
 create mode 100644 doc/html/images/rt_st_transform05.png


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list