The unloadshp utility

The unloadshp utility copies spatial features and associated attributes from a table in the HCL Informix® database into an ESRI shapefile.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-unloadshp--+- -o--+-| Init Mode |---+-+---------------------><
              |      '-| Append Mode |-' |   
              '- -V----------------------'   

Init mode

|--init-- -l--tablename--,--colname-- -f--filename-------------->

>-- -D--database--+-------------+------------------------------->
                  '- -s--server-'   

>--+------------------------------+--+-----------------+-------->
   '- -u--username-- -p--password-'  '- -t--shape_type-'   

>--+-------------------+--+----------------------+--------------|
   '- -w--where_clause-'  '- -log--+-----------+-'   
                                   '-directory-'     

Append mode

|--append-- -l--tablename--,--colname-- -f--filename------------>

>-- -D--database--+-------------+------------------------------->
                  '- -s--server-'   

>--+------------------------------+--+-------------------+------>
   '- -u--username-- -p--password-'  '- -w--where_clause-'   

>--+----------------------+-------------------------------------|
   '- -log--+-----------+-'   
            '-directory-'     

Operation modes

You use the -o flag to set the operation mode for the unloadshp command. Set the -o flag to one of the following options:
append
Spatial features are appended to the existing ESRI shapefile specified by the -f option.
init
Spatial features are unloaded into a newly created ESRI shapefile.

Command-line switches

You can use the unloadshp command flags to specify the following options.
-D
The database name
-f
The path and name of the shapefile
-l
The table and geometry column from which to extract data

The table and column must exist, and the executing user must either own the table or have access to it.

-log (optional)
Specifies whether to write information about the status of data loading to a log file

The log file has the same name as the shapefile you are loading into with the extension .log.

If you do not specify a directory, the log file is created in the same directory as the shapefile you are loading.

-p (optional)
The HCL Informix password

If you specify the -p option, you must also specify the -u option.

-s (optional)
The HCL Informix server

Defaults to the value of the INFORMIXSERVER environment variable.

-t (optional)
An integer indicating the type of shape to extract and write to the ESRI shapefile
The possible values are:
1
Point
2
PolyLine
5
Polygon
8
Multipoint
9
PointZ
10
PolyLineZ
11
PointZM
13
PolyLineZM
15
PolygonZM
18
MultiPointZM
19
PolygonZ
20
MultiPointZ
21
PointM
23
PolyLineM
25
PolygonM
28
MultiPointM

If you do not specify the -t option, the type defaults to the type of the first shape retrieved from the database table.

-u (optional)
The HCL Informix user name

If you specify the -u option, you must also specify the -p option.

-V
Prints version information for this utility
-w (optional)
(optional) The SQL WHERE clause to qualify the data extracted from the table

Enclose the WHERE clause in double quotation marks and enclose any string literals within the clause in single quotation marks. Omit the keyword WHERE.


Copyright© 2018 HCL Technologies Limited