[SCM] PostGIS branch master updated. 3.6.0rc2-629-g7a62d652e

git at osgeo.org git at osgeo.org
Fri Jun 19 14:33:20 PDT 2026


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  7a62d652e3a3ed1402e633a198f8871464c27c35 (commit)
      from  3abf37d25803fe25c564dd16b7d426f22f8ad18e (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 7a62d652e3a3ed1402e633a198f8871464c27c35
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Sat Jun 20 01:24:51 2026 +0400

    doc: add raster2pgsql man page
    
    Install the raster2pgsql(1) manual page and align its examples with the raster loader workflows documented in the main manual.
    
    Closes #2386
    
    Closes https://github.com/postgis/postgis/pull/979

diff --git a/NEWS b/NEWS
index 6523cb57e..a8b25af45 100644
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,7 @@ To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed
           deprecated-function cleanup (Darafei Praliaskouski)
  - GH-899, [raster] Honor PostgreSQL interrupts in long-running GDAL
           progress callbacks (Darafei Praliaskouski)
+ - #2386, Add missing raster2pgsql man page (Darafei Praliaskouski)
  - #5975, Initialize skipped union-find cluster ids deterministically
           (Darafei Praliaskouski)
  - GH-885, [topology] Avoid GMP overflow in ring orientation for very large
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 1c792eb0d..b7f684108 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -564,7 +564,7 @@ endif
 comments-uninstall:
 	$(MAKE) -f Makefile.comments uninstall
 
-man-install: man/shp2pgsql.1 man/pgsql2shp.1 man/pgtopo_export.1 man/pgtopo_import.1 man/postgis.1 man/postgis_restore.1
+man-install: man/shp2pgsql.1 man/pgsql2shp.1 man/raster2pgsql.1 man/pgtopo_export.1 man/pgtopo_import.1 man/postgis.1 man/postgis_restore.1
 	mkdir -p $(DESTDIR)$(mandir)/man1
 	for f in $^; do \
 		$(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/`basename $$f`; \
@@ -573,6 +573,7 @@ man-install: man/shp2pgsql.1 man/pgsql2shp.1 man/pgtopo_export.1 man/pgtopo_impo
 man-uninstall:
 	rm -f $(DESTDIR)$(mandir)/man1/shp2pgsql.1
 	rm -f $(DESTDIR)$(mandir)/man1/pgsql2shp.1
+	rm -f $(DESTDIR)$(mandir)/man1/raster2pgsql.1
 	rm -f $(DESTDIR)$(mandir)/man1/pgtopo_export.1
 	rm -f $(DESTDIR)$(mandir)/man1/pgtopo_import.1
 	rm -f $(DESTDIR)$(mandir)/man1/postgis.1
diff --git a/doc/man/raster2pgsql.1 b/doc/man/raster2pgsql.1
new file mode 100644
index 000000000..f33b9c504
--- /dev/null
+++ b/doc/man/raster2pgsql.1
@@ -0,0 +1,171 @@
+.TH "raster2pgsql" "1" "" "" "PostGIS"
+.SH "NAME"
+.LP
+raster2pgsql - raster to postgis loader
+
+.SH "SYNTAX"
+.LP
+raster2pgsql [\fIoptions\fR] \fIraster\fR [\fIraster\fR ...] [[\fIschema\fR\fB.\fR]\fItable\fR]
+
+.SH "DESCRIPTION"
+.LP
+The raster2pgsql data loader converts raster files supported by GDAL into SQL
+suitable for insertion into a PostGIS raster table. Multiple raster files may
+be passed on the command line, and shell wildcards can be used to select input
+files.
+
+.SH "OPTIONS"
+.LP
+The commandline options are:
+.TP
+\fB\-s\fR [<\fIFROM_SRID\fR>:]<\fISRID\fR>
+Set the SRID field. If FROM_SRID is given, the input raster is treated as that
+source SRID before being transformed to SRID. If no SRID is provided, or if SRID
+is 0, raster metadata is used when possible.
+.TP
+\fB\-b\fR <\fIband\fR>
+Index, starting from 1, of the band to extract from the raster. Separate
+multiple band indexes with commas. Ranges can be written with a dash. If this
+option is omitted, all bands are extracted.
+.TP
+\fB\-t\fR <\fItile_size\fR>
+Cut each raster into tiles inserted one per table row. The tile size is written
+as WIDTHxHEIGHT. Use "auto" to let the loader choose a tile size from the first
+raster and apply it to all rasters.
+.TP
+\fB\-P\fR
+Pad right-most and bottom-most tiles so all tiles have the same width and
+height.
+.TP
+\fB\-R\fR
+Register the raster as an out-of-db filesystem raster. Input raster paths must
+be absolute.
+.TP
+\fB\-d\fR
+Drop the table, recreate it, and populate it with the raster data.
+.TP
+\fB\-a\fR
+Append raster data into the existing table. The target table must have the same
+schema.
+.TP
+\fB\-c\fR
+Create a new table and populate it. This is the default mode.
+.TP
+\fB\-p\fR
+Prepare mode. Only emit SQL to create the table.
+.TP
+\fB\-f\fR <\fIcolumn\fR>
+Specify the name of the raster column.
+.TP
+\fB\-F\fR
+Add a column containing the source raster filename.
+.TP
+\fB\-n\fR <\fIcolumn\fR>
+Specify the filename column name. This implies \-F.
+.TP
+\fB\-l\fR <\fIoverview_factor\fR>
+Create overview tables for the raster. Separate multiple factors with commas.
+Overview table names follow the pattern o_<overview factor>_<table>. Created
+overviews are stored in the database and are not affected by \-R.
+.TP
+\fB\-q\fR
+Wrap PostgreSQL identifiers in quotes.
+.TP
+\fB\-I\fR
+Create a GiST spatial index on the raster column.
+.TP
+\fB\-M\fR
+Run VACUUM ANALYZE on the raster table. This is most useful when appending to an
+existing table with \-a.
+.TP
+\fB\-C\fR
+Set the standard raster constraints after the rasters are loaded. Some
+constraints may fail if one or more input rasters violate the constraint.
+.TP
+\fB\-x\fR
+Disable setting the max extent constraint. Only applies with \-C.
+.TP
+\fB\-r\fR
+Set spatially unique and coverage tile constraints for regular blocking. Only
+applies with \-C.
+.TP
+\fB\-T\fR <\fItablespace\fR>
+Specify the tablespace for the new table.
+.TP
+\fB\-X\fR <\fItablespace\fR>
+Specify the tablespace for the new table's indexes. This applies to the primary
+key and the spatial index when \-I is used.
+.TP
+\fB\-N\fR <\fInodata\fR>
+NODATA value to use on bands without a NODATA value.
+.TP
+\fB\-k\fR
+Keep empty tiles by skipping NODATA value checks for each raster band.
+.TP
+\fB\-E\fR <\fIendian\fR>
+Control endianness of generated binary raster output. Use 0 for XDR and 1 for
+NDR. Only NDR is currently supported.
+.TP
+\fB\-V\fR <\fIversion\fR>
+Specify the output WKB format version. Only version 0 is currently supported.
+.TP
+\fB\-e\fR
+Execute each statement individually instead of wrapping the load in a
+transaction.
+.TP
+\fB\-Y\fR [<\fImax_rows_per_copy\fR>]
+Use COPY statements instead of INSERT statements. If no row limit is provided,
+50 rows are written per COPY.
+.TP
+\fB\-G\fR
+Print the supported GDAL raster formats.
+.TP
+\fB\-?\fR
+Display version and usage information.
+
+.SH "EXAMPLES"
+.LP
+Load one projected population raster using COPY statements, automatic tiling,
+and post-load VACUUM ANALYZE:
+
+# \fBpsql \-c "drop table if exists ghs_globe_population_raster;"\fR
+.br
+# \fBraster2pgsql \-M \-Y \-s 54009 data/mid/ghs/GHS_POP.tif \-t auto ghs_globe_population_raster | psql \-q\fR
+
+.LP
+Create an empty raster table first, then append many rasters in parallel. This
+pattern is useful when loading large raster collections:
+
+# \fBpsql \-c "drop table if exists hrsl_population_raster;"\fR
+.br
+# \fBraster2pgsql \-p \-Y \-s 4326 data/in/hrsl/*.tif \-t auto hrsl_population_raster | psql \-q\fR
+.br
+# \fBfind data/in/hrsl \-name "*.tif" \-type f | parallel --eta 'GDAL_CACHEMAX=10000 GDAL_NUM_THREADS=4 raster2pgsql \-a \-Y \-s 4326 {} \-t auto hrsl_population_raster | psql \-q'\fR
+.br
+# \fBpsql \-c "create index hrsl_population_raster_rast_idx on hrsl_population_raster using gist (ST_ConvexHull(rast));"\fR
+.br
+# \fBpsql \-c "vacuum analyze hrsl_population_raster;"\fR
+
+.LP
+Create and append a tiled raster set from pre-cut tiles. The first tile creates
+the table definition; the remaining tiles append into it:
+
+# \fBls data/mid/night_lights/*.tif | head \-1 | parallel 'raster2pgsql \-p \-Y \-s 4326 {} \-t auto night_lights_raster | psql \-q'\fR
+.br
+# \fBls data/mid/night_lights/*.tif | parallel --eta 'GDAL_CACHEMAX=10000 GDAL_NUM_THREADS=4 raster2pgsql \-a \-Y \-s 4326 {} \-t auto night_lights_raster | psql \-q'\fR
+
+.LP
+List the raster formats supported by the GDAL library used by raster2pgsql:
+
+# \fBraster2pgsql \-G\fR
+
+.SH "AUTHORS"
+.LP
+Originally written by WKTRaster/PostGIS Raster contributors.
+Improved and maintained by the PostGIS project.
+
+.SH "SEE ALSO"
+.LP
+shp2pgsql(1), pgsql2shp(1)
+
+More information is available at http://postgis.net

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

Summary of changes:
 NEWS                   |   1 +
 doc/Makefile.in        |   3 +-
 doc/man/raster2pgsql.1 | 171 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 doc/man/raster2pgsql.1


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list