EnglishFrenchSpanish

OnWorks favicon

raster2pgsql - Online in the Cloud

Run raster2pgsql in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command raster2pgsql that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


raster2pgsql - loads GDAL supported raster formats into a PostGIS raster table

DESCRIPTION


raster2pgsql is a raster loader executable that loads GDAL supported raster formats into
sql suitable for loading into a PostGIS raster table. It is capable of loading folders of
raster files as well as creating overviews of rasters.

Since the raster2pgsql is compiled as part of PostGIS most often (unless you compile your
own GDAL library), the raster types supported by the executable will be the same as those
compiled in the GDAL dependency library. To get a list of raster types your particular
raster2pgsql supports use the -G switch. These should be the same as those provided by
your PostGIS install documented here ST_GDALDrivers if you are using the same gdal library
for both.

SYNOPTIS


raster2pgsql [<options>] <raster>[ <raster>[ ...]] [[<schema>.]<table>]

Multiple rasters can also be specified using wildcards (*,?).

OPTIONS


-s <srid> Set the raster's SRID. Defaults to 0. If SRID not

provided or is 0, raster's metadata will be checked to determine an appropriate
SRID.

-b <band> Index (1-based) of band to extract from raster. For more

than one band index, separate with comma (,). Ranges can be defined by separating
with dash (-). If unspecified, all bands of raster will be extracted.

-t <tile size> Cut raster into tiles to be inserted one per

table row. <tile size> is expressed as WIDTHxHEIGHT. <tile size> can also be
"auto" to allow the loader to compute an appropriate tile size using the first
raster and applied to all rasters.

-P Pad right-most and bottom-most tiles to guarantee that all tiles

have the same width and height.

-R Register the raster as an out-of-db (filesystem) raster. Provided raster should
have absolute path to the file

(-d|a|c|p) These are mutually exclusive options:

-d Drops the table, then recreates it and populates it with current raster data.

-a Appends raster into current table, must be exactly the same table schema.

-c Creates a new table and populates it, this is the default if you do not specify any
options.

-p Prepare mode, only creates the table.

-f <column> Specify the name of the raster column

-F Add a column with the filename of the raster.

-n <column> Specify the name of the filename column. Implies -F.

-l <overview factor> Create overview of the raster. For more than

one factor, separate with comma(,). Overview table name follows the pattern
o_<overview factor>_<table>. Created overview is stored in the database and is not
affected by -R.

-q Wrap PostgreSQL identifiers in quotes.

-I Create a GIST spatial index on the raster column. The ANALYZE command will
automatically be issued for the created index.

-M Run VACUUM ANALYZE on the table of the raster column. Most useful when appending
raster to existing table with -a.

-C Set the standard set of constraints on the raster column after the rasters are
loaded. Some constraints may fail if one or more rasters violate the constraint.

-x Disable setting the max extent constraint. Only applied if -C flag is also used.

-r Set the constraints (spatially unique and coverage tile) for regular blocking. Only
applied if -C flag is also used.

-T <tablespace> Specify the tablespace for the new table.

Note that indices (including the primary key) will still use the default tablespace
unless the -X flag is also used.

-X <tablespace> Specify the tablespace for the table's new index.

This applies to the primary key and the spatial index if the -I flag is used.

-N <nodata> NODATA value to use on bands without a NODATA value.

-k Skip NODATA value checks for each raster band.

-E <endian> Control endianness of generated binary output of

raster. Use 0 for XDR and 1 for NDR (default). Only NDR is supported at this time.

-V <version> Specify version of output WKB format. Default

is 0. Only 0 is supported at this time.

-e Execute each statement individually, do not use a transaction.

-Y Use COPY statements instead of INSERT statements.

-G Print the supported GDAL raster formats.

-? Display the help screen.

raster2pgsql RELEASE: 2.1.2 GDAL_VERSION=110April32014 RASTER2PGSQL(1)

Use raster2pgsql online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 2
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 3
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • 4
    Apache OpenOffice Extensions
    Apache OpenOffice Extensions
    The official catalog of Apache
    OpenOffice extensions. You'll find
    extensions ranging from dictionaries to
    tools to import PDF files and to connect
    with ext...
    Download Apache OpenOffice Extensions
  • 5
    MantisBT
    MantisBT
    Mantis is an easily deployable, web
    based bugtracker to aid product bug
    tracking. It requires PHP, MySQL and a
    web server. Checkout our demo and hosted
    offerin...
    Download MantisBT
  • 6
    LAN Messenger
    LAN Messenger
    LAN Messenger is a p2p chat application
    for intranet communication and does not
    require a server. A variety of handy
    features are supported including
    notificat...
    Download LAN Messenger
  • More »

Linux commands

Ad