.\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 .TH "SHPADD" "1" "December 2023" "" "shplib" .SH "NAME" \fBshpadd\fR \- append a shape to an ESRI shapefile .SH "SYNOPSIS" \fBshpadd\fR \fIshp_file\fR [[\fIx\fR \fIy\fR] [+]]* .SH "DESCRIPTION" Appends a shape to the shapefile determined from \fIshp_file\fR\. The geometric data of the new shape consists of lists of \fIX/Y\fR points on the command line grouped into \fIparts\fR, with points in different parts separated by a plus (\fB+\fR) sign\. If no points or parts are given then a shape of type NullShape is appended to the shapefile, and otherwise the type of the new shape is determined by the shapefile's header\. See \fBshpdump\fR(1) for a description of shape types and how geometric data for parts are interpreted for a specific type\. No geometric restrictions set by the shapefile specification are enforced by \fBshpadd\fR(1)\. .P Shapefiles actually consist of two files with the same basename and extensions \fB\.shp\fR and \fB\.shx\fR (or \fB\.SHP\fR and \fB\.SHX\fR) containing the shape data and shape index respectively\. The files to open are determined by first stripping any filename extension from file and attempting to open the files \fIshp_file\fR\fB\.shp\fR or \fIshp_file\fR\fB\.SHP\fR, and \fIshp_file\fR\fB\.shx\fR or \fIshp_file\fR\fB\.SHX\fR for the respective data and index files\. .SH "OPTIONS" .TP \fIshp_file\fR the name of an existing shapefile\. .TP \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR \|\.\|\.\|\. \fIxn\fR \fIyn\fR the set of x,y coordinates that describes the shape that you wish to add\. Note that you must specify the correct number of parameters for a given type of shapefile\. e\.g\.: for point shapefiles you have to pass 1 pair of XY coordinates and for a polygon shapefile you should pass at least 4 pairs of XY coordinates (where the first and the last point must have the same coordinates)\. .SH "EXAMPLE" \fBshpadd\fR \fItestpolygon\fR 100000 7000000 250000 6500000 200000 6000000 100000 7000000 .P assuming that \fItestpolygon\fR is a polygon shapefile, this command line will insert a new shape (a triangle) into testpolygon with the following XY coordinates: .IP "" 4 .nf vertice 0: 100000 7000000 (this will also be the vertice where the shape starts and ends) vertice 1: 250000 6500000 vertice 2: 200000 6000000 vertice 3: 100000 7000000 .fi .IP "" 0 .SH "EXIT STATUS" .TP \fB0\fR Successful program execution\. .TP \fB1\fR Missing \fIshp_file\fR argument, the shapefile can't be opened, or the program ran out of memory\. .SH "DIAGNOSTICS" The following diagnostics may be issued on stdout: .P Unable to open:\fIshp_file\fR .P Out of memory .SH "AUTHOR" \fBshpadd\fR is part of shapelib, maintained by Frank Warmerdam\. This guide was created by Eduardo Patoo Kanegae and converted to manpage by Johan Van de Wauw\. .SH "BUGS" Coordinate values that can't be be parsed by \fBsscanf\fR(3) get undefined values\. There's no way to give measure or \fIZ\fR data to vertices in a shape, but those are always set to zero if the shapefile's shape type requires those values\. \fBMultiPatch\fR shape types aren't supported\. .SH "SEE ALSO" \fBdbfadd\fR(1), \fBdbfcat\fR(1), \fBdbfcreate\fR(1), \fBdbfdump\fR(1), \fBdbfinfo\fR(1), \fBshpcat\fR(1), \fBshpcentrd\fR(1), \fBshpcreate\fR(1), \fBshpdump\fR(1), \fBshpdxf\fR(1), \fBshpfix\fR(1), \fBshpinfo\fR(1), \fBshpproj\fR(1), \fBshprewind\fR(1), \fBshptest\fR(1)