Loading raster and vector layers into PostGIS using FEXPORT

To load vector and raster layers into a PostGIS database built on PostgreSQL, you must configure the FEXPORT parameters in a specific way. The following table describes this configuration.

Parameter Description
FILI Specify the name of the file containing the layer(s) to be loaded.
FILO For raster layers, specify the connection information and the table name that will be used when the image channel or channels are loaded into the database as a record of the pci_raster table. The format of this string should be:

PG://username:password@server:portnumber/pci_raster?d=databasename&w=layer_name=rastername

For vector layers, specify the connection information and table name that will be used when the vector layer is loaded into the database as a table. The format of this string should be:

PG://username:password@server:portnumber/tablename?d=databasename&s=geometryfieldname

Note:
  • PG stands for PostgreSQL. This is required to indicate the database schema.
  • If there is a default port number, this part of the string can be ignored.
  • For rasters, if you do not enter a a pci_raster table name, it will be added automatically.
  • For vectors, if you do not enter a geometry field name, "geometry" will be used by default.
  • For rasters, the string can be simplified as follows:

    PG://username:password@server/?d=databasename

  • For vectors, the string can be simplified as follows:

    PG://username:password@server/tablename?d=databasename

DBIW Leave blank. The entire layer will be processed by default.
DBIC For rasters, specify the channel number(s). Leave blank for vector layers (not applicable).
DBIB Not applicable. Leave blank.
DBVS For vector layers, specify the layer number. Leave blank for raster layers (not applicable).
DBLUT Not applicable. Leave blank.
DBPCT Not applicable. Leave blank.
FTYPE Use "PG" for the PostGIS format.
FOPTIONS Not applicable. Leave blank.

Examples

The following EASI example demonstrates how to configure FEXPORT to load raster layers into PostGIS.

EASI>FILI=”C:\v103\demo\irvine.pix”                          
EASI>FILO=”PG://user:pass@myserver:5286/pci_raster?d=mydatabasename”                                    
EASI>DBIW=                                                                                                                 
EASI>DBIC=2                                                                                                                  
EASI>DBIB=                                                                                                                     
EASI>DBVS=                                                                                                             
EASI>DBLUT=                                                                                                       
EASI>DBPCT=                                                                                             
EASI>FTYPE=”PG”                                                                                            
EASI>FOPTIONS=   
EASI>r FEXPORT

The following EASI example demonstrates how to configure FEXPORT to load vector layers into PostGIS:

EASI>FILI=”C:\v103\demo\irvine.pix”                          
EASI>FILO=”PG://user:pass@myserver:5286/mytablename?d=mydatabase”                   
EASI>DBIW=                                                                                                                 
EASI>DBIC=                                                                                                                  
EASI>DBIB=                                                                                                                     
EASI>DBVS=25                                                                                                                
EASI>DBLUT=                                                                                                       
EASI>DBPCT=                                                                                             
EASI>FTYPE=”PG”                                                                                            
EASI>FOPTIONS=   
EASI>r FEXPORT

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.