PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ usage()

static void usage ( )
static

Definition at line 24 of file shp2pgsql-cli.c.

25{
26 printf(_( "RELEASE: %s (%s)\n" ), POSTGIS_LIB_VERSION, xstr(POSTGIS_REVISION));
27 printf(_( "USAGE: shp2pgsql [<options>] <shapefile> [[<schema>.]<table>]\n"
28 "OPTIONS:\n" ));
29 printf(_( " -s [<from>:]<srid> Set the SRID field. Defaults to %d.\n"
30 " Optionally reprojects from given SRID.\n"),
32 printf(_( " (-d|a|c|p) These are mutually exclusive options:\n"
33 " -d Drops the table, then recreates it and populates\n"
34 " it with current shape file data.\n"
35 " -a Appends shape file into current table, must be\n"
36 " exactly the same table schema.\n"
37 " -c Creates a new table and populates it, this is the\n"
38 " default if you do not specify any options.\n"
39 " -p Prepare mode, only creates the table.\n" ));
40 printf(_( " -g <geocolumn> Specify the name of the geometry/geography column\n"
41 " (mostly useful in append mode).\n" ));
42 printf(_( " -D Use postgresql dump format (defaults to SQL insert statements).\n" ));
43 printf(_( " -e Execute each statement individually, do not use a transaction.\n"
44 " Not compatible with -D.\n" ));
45 printf(_( " -G Use geography type (requires lon/lat data or -s to reproject).\n" ));
46 printf(_( " -k Keep postgresql identifiers case.\n" ));
47 printf(_( " -i Use int4 type for all integer dbf fields.\n" ));
48 printf(_( " -I Create a spatial index on the geocolumn.\n" ));
49 printf(_(" -m <filename> Specify a file containing a set of mappings of (long) column\n"
50 " names to 10 character DBF column names. The content of the file is one or\n"
51 " more lines of two names separated by white space and no trailing or\n"
52 " leading space. For example:\n"
53 " COLUMNNAME DBFFIELD1\n"
54 " AVERYLONGCOLUMNNAME DBFFIELD2\n" ));
55 printf(_( " -S Generate simple geometries instead of MULTI geometries.\n" ));
56 printf(_( " -t <dimensionality> Force geometry to be one of '2D', '3DZ', '3DM', or '4D'\n" ));
57
58 printf(_( " -w Output WKT instead of WKB. Note that this can result in\n"
59 " coordinate drift.\n" ));
60 printf(_( " -W <encoding> Specify the character encoding of Shape's\n"
61 " attribute column. (default: \"UTF-8\")\n" ));
62 printf(_( " -N <policy> NULL geometries handling policy (insert*,skip,abort).\n" ));
63 printf(_( " -n Only import DBF file.\n" ));
64 printf(_( " -T <tablespace> Specify the tablespace for the new table.\n"
65 " Note that indexes will still use the default tablespace unless the\n"
66 " -X flag is also used.\n"));
67 printf(_( " -X <tablespace> Specify the tablespace for the table's indexes.\n"
68 " This applies to the primary key, and the spatial index if\n"
69 " the -I flag is used.\n" ));
70 printf(_( " -? Display this help screen.\n" ));
71 printf( "\n" );
72 printf(_( " An argument of `--' disables further option processing.\n" ));
73 printf(_( " (useful for unusual file names starting with '-')\n" ));
74}
#define SRID_UNKNOWN
Unknown SRID value.
Definition liblwgeom.h:229
#define xstr(s)
#define _(String)
Definition shpcommon.h:24
#define POSTGIS_LIB_VERSION
Definition sqldefines.h:13

References _, POSTGIS_LIB_VERSION, SRID_UNKNOWN, and xstr.

Referenced by main().

Here is the caller graph for this function: