[shapelib] 07/13: Merge man pages from 0001-Add-manpages.patch with man pages from Johan.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Aug 11 00:25:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository shapelib.

commit 0820636fb652894557b08d26f91d8f4c5fd5ae22
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Aug 10 21:24:06 2015 +0200

    Merge man pages from 0001-Add-manpages.patch with man pages from Johan.
---
 debian/changelog                       |   1 +
 debian/man/dbfadd.md                   |  35 +-
 debian/man/dbfcreate.md                |  45 +-
 debian/man/dbfdump.md                  |  66 ++-
 debian/man/shpadd.md                   |  32 +-
 debian/man/shpcreate.md                |  43 +-
 debian/man/shpdump.md                  | 157 +++++-
 debian/man/shprewind.md                |  40 +-
 debian/man/shptest.md                  |  73 +++
 debian/patches/0001-Add-manpages.patch | 975 ---------------------------------
 debian/patches/series                  |   1 -
 11 files changed, 435 insertions(+), 1033 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1977682..d26bd94 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ shapelib (1.3.0-5) UNRELEASED; urgency=medium
   * Add upstream metadata.
   * Update watch file with sepwatch changes. 
   * Add common version mangling in watch file.
+  * Merge man pages from 0001-Add-manpages.patch with man pages from Johan.
 
  -- Bas Couwenberg <sebastic at debian.org>  Wed, 15 Oct 2014 20:32:38 +0200
 
diff --git a/debian/man/dbfadd.md b/debian/man/dbfadd.md
index f4518e3..34de19e 100644
--- a/debian/man/dbfadd.md
+++ b/debian/man/dbfadd.md
@@ -1,9 +1,12 @@
-dbfadd(1) -- adds a record into an existing .dbf file
-=====================================================
+dbfadd(1) -- add a row to an xBase DBF file
+===========================================
 
 ##SYNOPSIS
 
-`dbfadd` xbase_file field_values
+`dbfadd` _xbase_file_ _field_values..._
+
+##DESCRIPTION
+Adds a row to the DBF file named by _xbase_file_ with column values given by the _field_values_ options that follow.  A NULL value is denoted by an empty argument.
 
 ##OPTIONS
   *  *xbase_file*: the name of an existing xBase file 
@@ -14,5 +17,29 @@ dbfadd(1) -- adds a record into an existing .dbf file
 
  Assuming that testbase.dbf has 3 fields( NAME, AREA and VALUE), this command line will insert a new record into testbase.dbf with the value "REGION1" for NAME, '25.656' for AREA and '150.22' for VALUE field. 
 
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+ * 1:
+ Missing _xbase_file_ or _field_values_ arguments.
+ * 2:
+ Failed to open _xbase_file_ for reading and appending.
+ * 3:
+ Too few values in _field_values..._
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+DBFOpen(_xbase_file_,"rb+") failed.
+
+Got _count1_ fields, but require _count2_
+
 ##AUTHOR
-`dbfcreate` 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.
+`dbfcreate` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##BUGS
+Field values that are too large to fit in a field are silently truncated from the right. Numeric field values that can't be parsed by `atof`(3) get undefined values.
+
+##SEE ALSO
+`dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpadd`(1), `shpcreate`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/man/dbfcreate.md b/debian/man/dbfcreate.md
index 4f720c8..a671eff 100644
--- a/debian/man/dbfcreate.md
+++ b/debian/man/dbfcreate.md
@@ -1,18 +1,49 @@
-dbfcreate(1) -- creates a new and empty .dbf file
-=================================================
+dbfcreate(1) -- Create an empty xBase DBF file
+==============================================
 
 ##SYNOPSIS
 
-`dbfcreate` xbase_file [[-s field_name width],[-n field_name width decimals],...]
+`dbfcreate` _xbase_file_ [[-s _field_name_ _width_] | [-n _field_name_ _width_ _decimals_],...]
+
+##DESCRIPTION
+Creates an empty DBF file called _xbase_file_ with columns described by all the `-s` and `-n` options that follow.
 
 ##OPTIONS
-  *  xbase_file: the name of xBase file to be created. Doesn't need the extension.
-  *  -s field_name width: creates a string field with name field_name and size width.
-  *  -n field_name width decimals: creates a numeric field with name field_name, width of width and with decimals places sized by decimals.
+  *  _xbase_file_: the name of xBase file to be created. Doesn't need the extension.
+  *  `-s` _field_name_ _width_: creates a string field with name _field_name_ and size _width_.
+  *  `-n` _field_name_ _width_ _decimals_: creates a numeric field with name _field_name_, width of _width_ and with _decimals_ places sized by decimals.
 
 ##EXAMPLE
 `dbfcreate` testbase -s NAME 20, -n AREA 9 3, -n VALUE 9 2
 
  this will create a file named testbase.dbf with 3 fields: NAME ( string (20)), AREA ( float (9,3)) and VALUE ( float (9,2)) 
+
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+ * 1:
+ Missing _xbase_file_ argument.
+ * 2:
+ Failed to create the file _xbase_file_ for writing.
+ * 3:
+ Missing _field_name_, _width_, or _decimals_ argument for a `-s` or `-n` option.
+ * 4:
+ Failed to add a column given by a `-s` or `-n` option.
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+DBFCreate(_xbase_file_) failed.
+
+DBFAddField(_field_name_,FTString,_width_,0) failed.
+
+DBFAddField(_field_name_,FTDouble,_width_,_decimals_) failed.
+
+Argument incomplete, or unrecognised: _arg_
+
 ##AUTHOR
-`dbfcreate` 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.
+`dbfcreate` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##SEE ALSO
+`dbfadd`(1), `dbfdump`(1), `dbf_dump`(1), `shpadd`(1), `shpcreate`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/man/dbfdump.md b/debian/man/dbfdump.md
index ccf7d68..d7d3a0b 100644
--- a/debian/man/dbfdump.md
+++ b/debian/man/dbfdump.md
@@ -3,25 +3,77 @@ dbfdump(1) -- dumps the content of a xBase file to the terminal
 
 ##SYNOPSIS
 
-`dbfdump` [<-h>] [-r] [-m] xbase_file 
+`dbfdump` [-h] [-r] [-m] _xbase_file_ 
+
+##DESCRIPTION
+Dumps the contents of _xbase_file_ to standard output. The first line contains the field names appearing in _xbase_file_, and each of the following lines contains the field values of a record. Field names and values are padded by spaces to their field widths. Empty fields are printed as the string "(NULL)".
 
 ##OPTIONS
-    -h: output header info( field descriptions).
-    -r: output raw field info, numeric values not reformatted.
-    -m: output one line per field.
-    xbase_file: the name of an existing xBase file.
+ * `-h`:
+ output header info (field descriptions).
+ 
+   Prints the column field definitions before other output. Each field definition consists of a line of the form
+
+   Field: _index_, Type=_type_, Title=`_name_', Width=_width_, Decimals=_precision_
+
+   where _index_ is the zero offset column number of the field; the _type_ indicates the datatype of the field value and is either "Integer", "Real" or "String"; _name_ is the field's name; _width_ is the number of bytes reserved for the field's value; and _precision_ is the number of decimal places of precision for "Real" type fields, and is zero for "Integer" and "String" type fields.
+
+ * `-r`:
+ output raw field info, numeric values not reformatted.
+
+   Prints the exact bytes occurring in _xbase_file_ for field values and suppresses printing "(NULL)" for empty values.
+
+ * `-m`:
+ output one line per field.
+
+   Prints each record in multiline format separated by empty lines. The first line of a record gives the number of the record in the form
+
+   Records: _record_index_
+
+   where _record_index_ is the zero offset number of the record in the file, and then each field of the record appears on its own line in the format
+
+   _name_: _value_
 
+ * _xbase_file_:
+ the name of an existing xBase file.
 
 ##EXAMPLE
 
 `dbfdump` -h testbase.dbf
 
-assuming that testbase.dbf has 1 record( inserted by other example using `dbfadd`), this command line will produce the following output:
+assuming that testbase.dbf has 1 record (inserted by other example using `dbfadd`), this command line will produce the following output:
 
 	Field 0: Type=String, Title='NAME', Width=20, Decimals=0
 	Field 1: Type=Double, Title='AREA', Width=9, Decimals=3
 	Field 2: Type=Double, Title='VALUE', Width=9, Decimals=2
 	NAME AREA VALUE REGION1 25.656 150.22 
+
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+
+ * 1:
+ Missing _xbase_file_ argument.
+
+ * 2:
+ Failed to open _xbase_file_.
+
+ * 3:
+ There are no fields in _xbase_file_.
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+DBFOpen(_xbase_file_,"r") failed.
+
+There are no fields in this table!
  
 ##AUTHOR
-`dbfdump` 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.
+`dbfdump` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##BUGS
+Unless the `-r` option is given, values in numeric fields that overflow the `int` or `double` types of the `C` language are printed as plus or minus a huge number. For integer fields the huge value is `HUGE_VALL` from <stdlib.h> and for real fields it is `HUGE_VALF`.
+
+##SEE ALSO
+`dbf_dump`(1), `dbfcreate`(1), `dbfadd`(1), `shpadd`(1), `shpcreate`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/man/shpadd.md b/debian/man/shpadd.md
index 75372f0..1f95c77 100644
--- a/debian/man/shpadd.md
+++ b/debian/man/shpadd.md
@@ -1,9 +1,15 @@
-shpadd(1) -- adds a shape into an existing shapefile 
-===============================================================
+shpadd(1) -- append a shape to an ESRI shapefile
+================================================
 
 ##SYNOPSIS
 
-`shpadd` <shp_file> <[[x y] [+]]*>  
+`shpadd` _shp_file_ [[_x_ _y_] [+]]*
+
+##DESCRIPTION
+Appends a shape to the shapefile determined from _shp_file_.  The geometric data of the new shape consists of lists of _X/Y_ points on the command line grouped into _parts_, with points in different parts separated by a plus (`+`) 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 `shpdump`(1) for a description of shape types and how geometric data for par [...]
+
+Shapefiles actually consist of two files with the same basename and extensions `.shp` and `.shx` (or `.SHP` and `.SHX`) 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 _shp_file_`.shp` or _shp_file_`.SHP`, and _shp_file_`.shx` or _shp_file_`.SHX` for the respective data and index files.
+
 
 ##OPTIONS
 
@@ -23,6 +29,26 @@ assuming that testpolygon is a polygon shapefile, this command line will insert
 	vertice 2: 200000 6000000
 	vertice 3: 100000 7000000
 
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+
+ * 1:
+ Missing _shp_file_ argument, the shapefile can't be opened, or the program ran out of memory.
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+Unable to open:_shp_file_
+
+Out of memory
 
 ##AUTHOR
 `shpadd` 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.
+
+##BUGS
+Coordinate values that can't be be parsed by `sscanf`(3) get undefined values.  There's no way to give measure or _Z_ data to vertices in a shape, but those are always set to zero if the shapefile's shape type requires those values.  `MultiPatch` shape types aren't supported.
+
+##SEE ALSO
+`dbfadd`(1), `dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpcreate`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/man/shpcreate.md b/debian/man/shpcreate.md
index 0a841c3..b6f7e9f 100644
--- a/debian/man/shpcreate.md
+++ b/debian/man/shpcreate.md
@@ -1,14 +1,19 @@
-shpcreate(1) -- creates a new and empty shapefile 
-===============================================================
+shpcreate(1) -- create an empty ESRI shapefile
+==============================================
 
 ##SYNOPSIS
 
-`shpcreate` shp_file [point|arc|polygon|multipoint] 
+`shpcreate` _shp_file_ [`point`|`arc`|`polygon`|`multipoint`] 
 
-##OPTIONS
-    shp_file: the name of the shapefile to be created. Doesn't need the extension
-    point|arc|polygon|multipoint: the type of shapefile that you wish to create. Must specify a valid option.
+##DESCRIPTION
+Creates an empty shapefile supporting shapes of the given type.  Shapefiles actually consist of two files with the same basename and extensions `.shp` and `.shx` (or `.SHP` and `.SHX`) containing the shape data and shape index respectively.  The files to create are determined by first stripping any filename extension from _shp_file_ and attempting to create the files _shp_file_`.shp` or _shp_file_`.SHP`, and _shp_file_`.shx` or _shp_file_`.SHX` for the respective data and index files.  T [...]
 
+##OPTIONS
+ * _shp_file_:
+ the name of the shapefile to be created. Doesn't need the extension
+ 
+ * `point`|`arc`|`polygon`|`multipoint`:
+ the type of shapefile that you wish to create. Must specify a valid option.
 
 ##EXAMPLE
 
@@ -16,6 +21,30 @@ shpcreate(1) -- creates a new and empty shapefile
 
 
 this will create a polygon shapefile named testpolygon (in fact testpolygon.shp and testpolygon.shx will be created). 
+
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+
+ * 1:
+ Missing _shp_file_ or _shapetype_ argument.
+
+ * 2:
+ Unknown shapetype.
+
+ * 3:
+ Unable to create the shapefile.
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+Shape Type `_shapetype_' not recognised.
+
+Unable to create:_shp_file_
  
 ##AUTHOR
-`dbfdump` 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.
+`dbfdump` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##SEE ALSO
+`dbfadd`(1), `dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpadd`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/man/shpdump.md b/debian/man/shpdump.md
index ce1127f..6ac3066 100644
--- a/debian/man/shpdump.md
+++ b/debian/man/shpdump.md
@@ -1,37 +1,154 @@
-shpdump(1) -- dumps and or validates the content of a shapefile 
-===============================================================
+shpdump(1) -- dumps as text and/or validates the content of an ESRI shapefile
+=============================================================================
 
 ##SYNOPSIS
 
-`shpdump` [-<validate>] shp_file  
+`shpdump` [-<validate>] _shp_file_
+
+##DESCRIPTION
+Prints the contents of the shapefile _shp_file_ to standard output in textual format.  Shapefiles actually consist of two files with the same basename and extensions `.shp` and `.shx` (or `.SHP` and `.SHX`) containing the shape data and shape index respectively.  The files to open are determined by first stripping any filename extension from _shp_file_ and attempting to open the files _shp_file_`.shp` or _shp_file_`.SHP`, and _shp_file_`.shx` or _shp_file_`.SHX` for the respective data a [...]
+
+Output consists of a header giving number and type of shapes in the file and the bounds for the minimum and maximum _X_, _Y_, _Z_, and _M_ values appearing in the shapes.  The header is followed by the geometric data for each shape in the file.  All shapes in the file should be of the same type, except that `NullShape` typed shapes may be intermixed with any other type.  The header has the form
+
+    Shapefile Type: type # of Shapes: count
+
+    File Bounds: (minX,minY,minZ,minM)
+             to  (maxX,maxY,maxZ,maxM)
+
+See section `SHAPE TYPES` below for the list of possible shape types.
+
+Next for each shape in the file a header giving it's _shape_index_, it's type _type_, number of vertices _nVertices_, number of parts _nParts_, and bounding box is given, followed by the vertex data of each part.
+
+    Shape:  shape_index (type) nVertices=nVertices, nParts=nParts
+      Bounds: (minX,minY,minZ,minM)
+          to  (maxX,maxY,maxZ,maxM)
+
+      vertices of the first part
+
+    + vertices of the second part...
+
+    + vertices of the last part
+
+The _shape_index_ of a shape is the number of the shape starting from zero in the shape file.  Each vertex has the form
+
+    (X,Y,Z,M)
+
+If there are multiple parts then the type of the part is appended appended to first vertex of each part, and the first vertex of the second and following parts is preceded by a plus (`+`) sign.  The part type is `Ring` for all shape types except `MultiPatch` where it is the type of a surface patch.  See below for the description of possible part types.
+
+##SHAPE TYPES
+Each type of shape except `MultiPatch` typed shapes comes in three flavours: The normal unsuffixed type, where points lie in _X/Y_-space; a type with suffix _M_ where points lie in _X/Y_-space and additionally have a _measure_ value in _M_-space; and finally a type with suffix _Z_ where points lie in _X/Y/Z_-space and also have a measure value in _M_-space.
+
+ * `NullShape`:
+ A shape without data.  Shapes of this type may be intermixed with other shapes and are sometimes used to represented deleted or missing geometric data for a shape.
+
+ * `Point` or `PointZ` or `PointM`:
+ A single point.
+
+ * `Arc` or `ArcZ` or `ArcM`:
+ Piecewise linear paths.  Shapes of this type may consist of multiple parts which may or may not intersect and/or connect.  Arcs are called `PolyLines` in the shapefile specification.
+
+ * `Polygon` or `PolygonZ` or `PolygonM`:
+ Polygon shapes consist of one or more parts, called _rings_, that each define a closed path.  Rings must contain at least four vertices with the first and last vertices being equal, and must not self-intersect.  For shapes of type `Polygon`, the rings define a polygon with optional holes by giving the vertices of inner rings a counterclockwise orientation and the vertices of outer rings a clockwise orientation.  Intersection and orientation is always computed in _X/Y_-space and never in [...]
+
+ * `MultiPoint` or `MultiPointZ` or `MultiPointM`:
+ A set of points.
+
+ * `MultiPatch`:
+ A `MultiPatch` represents one or more surfaces in `X/Y/Z`-space, and consists of a number of parts called it's _surface_ _patches_.  Each surface patch describes a either a surface or a hole in another surface,  depending  on the type of the patch.  Patches may share a common boundary but may not otherwise intersect.  The type of a patch may be one of
+
+    `TriangleStrip`:
+    A set of connected triangles.  The first three points define the first triangle and every following point defines a new triangle using the new point and the two previous points.
+
+    `TriangleFan`:
+    A  set of connected triangles.  The first three points define the first triangle and every following point defines a new triangle using the previous point, the current point, and the first point, thus forming a fan of triangles around the first point.
+
+    `OuterRing`:
+    The outer ring of a sequence of rings defining a polygon with holes.  All following parts of type `InnerRing` are taken to be the holes of the polygon.  The sequence of rings ends with the first non-`InnerRing` typed part or the part of the shape, whichever comes first.
+
+    `InnerRing`:
+    An inner ring in a sequence of rings defining a polygon with holes.  This type of part may only follow an `OuterRing` or other `InnerRing` typed parts.
+
+    `FirstRing`:
+    The first in a sequence of rings defining a polygon of unspecified type.  The following parts of type `Ring` defines the other rings in the polygon.  This type of part is used when the innerness or outerness of a polygon isn't known or applicable.  The sequence of rings defining the polygon ends with the first non-`Ring` typed part or the last part of the shape, whichever comes first.
+
+    `Ring`:
+    A ring in a sequence of rings defining a polygon of unspecified type.  It may only follow a `FirstRing` or other `Ring` typed parts.
+
+    `UknownPartType`:
+    This type is returned for parts whose type isn't recognised.
+
+ * `UnknownShapeType`:
+ This type is returned for shapes whose type isn't recognised.
+
 
 ##OPTIONS
 
--<validate>:
+ * -<validate>:
+ count the number of objects that have invalid ring ordenings
+
+   Performs validation on the orientation of inner and outer rings in `Polygon`, `PolygonZ`, and `PolygonM` objects.  According to the shapefile specification outer rings should be given a clockwise orientation, and inner rings that define holes a counterclockwise orientation.  If some rings of a shape are oriented the wrong way around then the following message is output after dumping that shape:
 
-    count the number of objects that have invalid ring ordenings
-shp_file:
+   _count_ rings wound in the wrong direction.
 
-    the name of an existing shapefile.
+   In addition the total number of shapes with problem rings is output after the last shape has been dumped:
 
+   _count_ object has invalid ring orderings.
+
+ * _shp_file_:
+ the name of an existing shapefile.
+
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+
+ * 1:
+ No shapefile _shp_file_ was given or it couldn't be opened.
 
 ##EXAMPLE
-`shpdump` testpolygon
+    $ shpdump shapefile.shp
+
+    Shapefile Type: Arc   # of Shapes: 3
+
+    File Bounds: ( 3531586.750, 7253086.100,0,0)
+             to  ( 3536417.463, 7778375.875,0,0)
 
-assuming that testpolygon is an existing shapefile previously created, this command line will output the following result:
+    Shape:0 (Arc)  nVertices=2, nParts=1
+      Bounds:( 3536397.797, 7253086.100, 0, 0)
+          to ( 3536417.463, 7253163.597, 0, 0)
+         ( 3536397.797, 7253163.597, 0, 0) Ring
+         ( 3536417.463, 7253086.100, 0, 0)
 
-Shapefile Type: Polygon   # of Shapes: 1
+    Shape:1 (Arc)  nVertices=3, nParts=1
+      Bounds:( 3458966.390, 7373335.808, 0, 0)
+          to ( 3459141.856, 7373474.681, 0, 0)
+         ( 3458966.390, 7373474.681, 0, 0) Ring
+         ( 3458979.042, 7373466.273, 0, 0)
+         ( 3459141.856, 7373335.808, 0, 0)
 
-File Bounds: (  100000.000, 6000000.000,0,0)
-         to  (  250000.000, 7000000.000,0,0)
+    Shape:2 (Arc)  nVertices=7, nParts=1
+      Bounds:( 3531586.750, 7777880.500, 0, 0)
+          to ( 3532930.206, 7778375.875, 0, 0)
+         ( 3531586.750, 7777880.500, 0, 0) Ring
+         ( 3532228.265, 7778072.455, 0, 0)
+         ( 3532310.897, 7778119.445, 0, 0)
+         ( 3532367.866, 7778144.877, 0, 0)
+         ( 3532440.559, 7778168.920, 0, 0)
+         ( 3532506.504, 7778190.785, 0, 0)
+         ( 3532930.206, 7778375.875, 0, 0)
 
-Shape:0 (Polygon)  nVertices=4, nParts=1
-  Bounds:(  100000.000, 6000000.000, 0, 0)
-      to (  250000.000, 7000000.000, 0, 0)
-     (  100000.000, 7000000.000, 0, 0) Ring
-     (  250000.000, 6500000.000, 0, 0)
-     (  200000.000, 6000000.000, 0, 0)
-     (  100000.000, 7000000.000, 0, 0)
+    $
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+Unable to open:_shp_file_
 
 ##AUTHOR
-`shpdump` 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.
+`shpdump` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##BUGS
+The `-validate` option supports only one outer ring in a polygonal shape and assumes that the first ring in a shape is the outer ring.  It doesn't support polygons inside `MultiPatch` shapes.  The _X_ and _Y_ coordinates of a point are printed to three decimal places only.
+
+##SEE ALSO
+`dbfadd`(1), `dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpadd`(1), `shpcreate`(1), `shprewind`(1)
+
diff --git a/debian/man/shprewind.md b/debian/man/shprewind.md
index 4c50a5e..d3670ce 100644
--- a/debian/man/shprewind.md
+++ b/debian/man/shprewind.md
@@ -1,29 +1,51 @@
-shprewind(1) -- validates and resets the winding order of rings 
+shprewind(1) -- validates and resets the winding order of rings
 ===============================================================
 
 ##SYNOPSIS
 
-`shprewind` in_shp_file out_shp_file  
+`shprewind` _in_shp_file_ _out_shp_file_
 
 ##DESCRIPTION
+Validates and resets the winding order of rings in polygon geometries to match the ordering required by shapefile specification. This is usefull for shapefiles having troubles when checked with a 'shpdump -validate'.
 
- Validates and resets the winding order of rings in polygon geometries to match the ordering required by shapefile specification. This is usefull for shapefiles having troubles when checked with a 'shpdump -validate'. 
+Makes a copy of the shapefile _in_shp_file_ to _out_shp_file_ and fixes the orientation of points in the rings of `Polygon`, `PolygonZ`, and `PolygonM` typed shapes to conform to the shapefile specification.  According to the specification, the vertices of outer rings should be oriented clockwise on the _X/Y_ plane, and those of inner rings counterclockwise.
+
+Shapefiles actually consist of two files with the same basename and extensions .shp and .shx (or .SHP and .SHX) containing the shape data and shape index respectively.  The files to open are determined by first stripping any filename extension from _in_shp_file_ and attempting to open the files _in_shp_file_`.shp` or _in_shp_file_`.SHP`, and _in_shp_file_`.shx` or _in_shp_file_`.SHX` for the respective data and index files.  The files to create from _out_shp_file_ are determined by strip [...]
 
 ##OPTIONS
 
-in_shp_file: 
-    the name of an existing shapefile.
+ * _in_shp_file_: 
+ the name of an existing shapefile.
+
+ * _out_shp_file_:
+ the name of the new fixed shapefile that will be created.
+
+##EXIT STATUS
+ * 0:
+ Successful program execution.
+
+ * 1:
+ Missing _in_shp_file_ or _out_shp_file_ arguments, failed to open shapefile _in_shp_file_ or create shapefile _out_shp_file_.
 
-out_shp_file: 
-    the name of the new fixed shapefile that will be created.
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+Unable to open:_in_shp_file_
+
+Unable to create:_out_shp_file_
+
+_count_ objects rewound.
 
 ##EXAMPLE
 
 `shprewind` badshapefile newshapefile 
 
 ##AUTHOR
-`shprewind` 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.
+`shprewind` 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. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja at cc.helsinki.fi).
+
+##BUGS
+The implementation assumes that there is at most one outer ring in each shape, that it is the first ring in a shape, and all other rings in a shape are inner rings.  Polygons inside `MultiPatch` shape types aren't rewound.
 
 ##SEE ALSO
+`dbfadd`(1), `dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpadd`(1), `shpcreate`(1), `shpdump`(1), `shpfix`(1)
 
-shpfix(1), shpdump(1)
diff --git a/debian/man/shptest.md b/debian/man/shptest.md
new file mode 100644
index 0000000..43c47fe
--- /dev/null
+++ b/debian/man/shptest.md
@@ -0,0 +1,73 @@
+shptest(1) -- create some shapefiles for testing
+================================================
+
+##SYNOPSIS
+
+`shptest` _num_
+
+##DESCRIPTION
+Writes out a shapefile consisting of files test<num>.shp and test<num>.shx in the current directory.  The _num_ argument specifies the type of shapes in the shapefile to create and takes values from:
+
+ * `0`:
+ `NullShape`
+
+ * `1`:
+ `Point`
+
+ * `2`:
+ `PointZ`
+
+ * `3`:
+ `PointM`
+
+ * `4`:
+ `MultiPoint`
+
+ * `5`:
+ `MultiPointZ`
+
+ * `6`:
+ `MultiPointM`
+
+ * `7`:
+ `Arc`
+
+ * `8`:
+ `ArcZ`
+
+ * `9`:
+ `ArcM`
+
+ * `10`:
+ `Polygon`
+
+ * `11`:
+ `PolygonZ`
+
+ * `12`:
+ `PolygonM`
+
+ * `13`:
+ `MultiPatch`
+
+##EXIT STATUS
+ * `0`:
+ Successful program execution.
+
+ * `1`:
+ Missing argument.
+
+ * `10`:
+ Test `_num_' not recognised.
+
+##DIAGNOSTICS
+The following diagnostics may be issued on stdout:
+
+Test `_num_' not recognised.
+
+##AUTHORS
+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the shapelib shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote this man page.
+
+##SEE ALSO
+`dbfadd`(1), `dbfcreate`(1), `dbfdump`(1), `dbf_dump`(1), `shpcreate`(1), `shpdump`(1), `shprewind`(1)
+
diff --git a/debian/patches/0001-Add-manpages.patch b/debian/patches/0001-Add-manpages.patch
deleted file mode 100644
index 0fa85ee..0000000
--- a/debian/patches/0001-Add-manpages.patch
+++ /dev/null
@@ -1,975 +0,0 @@
-From: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
-Date: Fri, 8 Apr 2005 10:51:19 +0200
-Subject: [PATCH] Add manpages
-
-Debian-bug: http://bugs.debian.org/148037
----
- man/Makefile    |   16 +++
- man/dbfadd.1    |   61 +++++++++++
- man/dbfcreate.1 |   88 +++++++++++++++
- man/dbfdump.1   |  111 +++++++++++++++++++
- man/shpadd.1    |   85 +++++++++++++++
- man/shpcreate.1 |   68 ++++++++++++
- man/shpdump.1   |  316 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- man/shprewind.1 |   88 +++++++++++++++
- man/shptest.1   |   89 ++++++++++++++++
- 9 files changed, 922 insertions(+), 0 deletions(-)
- create mode 100644 man/Makefile
- create mode 100644 man/dbfadd.1
- create mode 100644 man/dbfcreate.1
- create mode 100644 man/dbfdump.1
- create mode 100644 man/shpadd.1
- create mode 100644 man/shpcreate.1
- create mode 100644 man/shpdump.1
- create mode 100644 man/shprewind.1
- create mode 100644 man/shptest.1
-
---- /dev/null
-+++ b/man/Makefile
-@@ -0,0 +1,16 @@
-+SOURCES=dbfdump.1 dbfcreate.1 dbfadd.1 shpdump.1 shpadd.1 shpcreate.1 shprewind.1 shptest.1
-+TARGETS=$(addsuffix .cat, $(SOURCES)) $(addsuffix .ps, $(SOURCES)) $(addsuffix .html, $(SOURCES))
-+
-+%.1.cat: %.1
-+	groff -man -Tascii $^ >$@
-+
-+%.1.ps: %.1
-+	groff -man -Tps $^ >$@
-+
-+%.1.html: %.1
-+	man2html $^ >$@
-+
-+all:	$(TARGETS)
-+
-+clean:
-+	$(RM) *.1.cat *.1.ps *.1.html *~ 
---- /dev/null
-+++ b/man/dbfadd.1
-@@ -0,0 +1,61 @@
-+.\" Process this file with
-+.\" groff -man -Tascii dbfadd.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+dbfadd \- add a row to an xBase DBF file
-+.SH SYNOPSIS
-+.B dbfadd
-+.I filename fieldvalues...
-+.SH DESCRIPTION
-+Adds a row to the DBF file named by
-+.I filename
-+with column values given by the
-+.I fieldvalues
-+options that follow.  A
-+.B NULL
-+value is denoted by an empty argument.
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I filename
-+or 
-+.I fieldvalues
-+arguments.
-+.TP
-+.B 2
-+Failed to open
-+.I filename
-+for reading and appending.
-+.TP
-+.B 3
-+Too few values in
-+.I fieldvalues...
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI DBFOpen( filename ",""rb+"") failed."
-+.TP
-+.RI Got\  count1 " fields, but require " count2 
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.
-+Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote this man page.
-+.SH BUGS
-+Field values that are too large to fit in a field are silently
-+truncated from the right. Numeric field values that can't be parsed by
-+.BR atof (3)
-+get undefined values.
-+.SH "SEE ALSO"
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpadd (1),
-+.BR shpcreate (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/dbfcreate.1
-@@ -0,0 +1,88 @@
-+.\" Process this file with
-+.\" groff -man -Tascii dbfcreate.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+dbfcreate \- Create an empty xBase DBF file
-+.SH SYNOPSIS
-+.B dbfcreate
-+.IR "filename" "[[\-s " "fieldname width" "] | [\-n " "fieldname width decimals" ]] ...
-+.SH DESCRIPTION
-+Creates an empty DBF file called
-+.I filename
-+with columns described by all the
-+.B \-s
-+and
-+.B \-n
-+options that follow.
-+.SH OPTIONS
-+.TP
-+.BI "\-s " "fieldname width"
-+adds a column named
-+.I fieldname
-+taking textual values of at most
-+.I width
-+characters.
-+.TP
-+.BI \-n\  fieldname\ width\ decimals
-+adds a column named
-+.I fieldname
-+taking numeric values of at most
-+.I width
-+digits and precision of at most
-+.I decimals
-+decimal places.  The number of digits of precision should be included in
-+.IR width .
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I filename
-+argument.
-+.TP
-+.B 2
-+Failed to create the file
-+.I filename
-+for writing.
-+.TP
-+.B 3
-+Missing 
-+.IR fieldname , width ", or " decimals
-+argument for a
-+.B \-s
-+or
-+.B \-n
-+option.
-+.TP
-+.B 4
-+Failed to add a column given by a
-+.B \-s
-+or
-+.B \-n
-+option.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI DBFCreate( filename ") failed."
-+.TP
-+.RI DBFAddField( fieldname ",FTString," width ",0) failed."
-+.TP
-+.RI DBFAddField( fieldname ",FTDouble," width "," decimals ") failed."
-+.TP
-+.RI "Argument incomplete, or unrecognised: " arg
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.
-+Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote this man page.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpadd (1),
-+.BR shpcreate (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/dbfdump.1
-@@ -0,0 +1,111 @@
-+.\" Process this file with
-+.\" groff -man -Tascii dbfdump.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+dbfdump \- dump xBase DBF files as text
-+.SH SYNOPSIS
-+.B dbfdump [\-h] [\-m] [\-r]
-+.I file
-+.SH DESCRIPTION
-+Dumps the contents of
-+.I file
-+to standard output.  The first line contains the field names appearing
-+in
-+.I file,
-+and each of the following lines contains the field values of a
-+record.  Field names and values are padded by spaces to their field
-+widths.  Empty fields are printed as the string "(NULL)".
-+.SH OPTIONS
-+.TP
-+.B \-h
-+Prints the column field definitions before other output.  Each field
-+definition consists of a line of the form
-+
-+.RI "Field: " index ", Type=" type ", Title=`" "name" "', Width=" "width" ", Decimals=" precision
-+
-+where
-+.I index
-+is the zero offset column number of the field; the
-+.I type
-+indicates the datatype of the field value and is either "Integer",
-+"Real" or "String"; 
-+.I name
-+is the field's name;
-+.I width
-+is the number of bytes reserved for the field's value; and
-+.I precision
-+is the number of decimal places of precision for "Real" type
-+fields, and is zero for "Integer" and "String" type fields.
-+.TP
-+.B \-m
-+Prints each record in multiline format separated by empty lines.
-+The first line of a record gives the number of the record in the form
-+
-+Records:
-+.I record_index
-+
-+where
-+.I record_index
-+is the zero offset number of the record in the file, and
-+then each field of the record appears on its own line in the format
-+
-+.IR name :
-+.I value
-+
-+.TP
-+.B \-r
-+Prints the exact bytes occurring in
-+.I file
-+for field values and suppresses printing "(NULL)" for
-+empty values.
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I file
-+argument.
-+.TP
-+.B 2
-+Failed to open
-+.I file.
-+.TP
-+.B 3
-+There are no fields in
-+.I file.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI DBFOpen( file ",""r"") failed."
-+.TP
-+There are no fields in this table!
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH BUGS
-+Unless the
-+.B \-r
-+option is given, values in numeric fields that overflow the
-+.B int
-+or 
-+.B double
-+types of the 
-+.B C
-+language are printed as plus or minus a huge number.  For integer
-+fields the huge value is
-+.B HUGE_VALL
-+from <stdlib.h> and for real fields it is
-+.BR HUGE_VALF .
-+.SH "SEE ALSO"
-+.BR dbf_dump (1),
-+.BR dbfcreate (1),
-+.BR dbfadd (1),
-+.BR shpadd (1),
-+.BR shpcreate (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/shpadd.1
-@@ -0,0 +1,85 @@
-+.\" Process this file with
-+.\" groff -man -Tascii shpadd.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+shpadd \- append a shape to an ESRI shapefile
-+.SH SYNOPSIS
-+.B shpadd
-+.I file
-+.RI "[[" "x y" "] [+]]*"
-+.SH DESCRIPTION
-+Appends a shape to the shapefile determined from
-+.IR file .
-+The geometric data of the new shape consists of lists of 
-+.I X/Y 
-+points on the command line grouped into 
-+.IR parts ,
-+with points in different parts separated by a plus
-+.RB ( + )
-+sign.  If no points or parts are given then a shape of type
-+.B NullShape
-+is appended to the shapefile, and otherwise the type of the new shape
-+is determined by the shapefile's header.  See
-+.BR shpdump (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
-+.BR shpadd (1).
-+
-+Shapefiles actually consist of two files with the same basename and
-+extensions
-+.BR .shp \ and\  .shx " (or " .SHP \ and\  .SHX ") "
-+containing the shape data and shape index respectively.  The files
-+to open are determined by first stripping any filename extension
-+from
-+.I file 
-+and attempting to open the files
-+.IB file .shp
-+or 
-+.IB file .SHP,
-+and
-+.IB file .shx
-+or
-+.IB file .SHX
-+for the respective data and index files.
-+
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I file
-+argument, the shapefile can't be opened, or the program
-+ran out of memory.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI "Unable to open:" file
-+.TP
-+.RI "Out of memory"
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH BUGS
-+Coordinate values that can't be
-+be parsed by 
-+.BR sscanf (3)
-+get undefined values.  There's no way to give measure or
-+.I Z
-+data to vertices in a shape, but those are always set to zero
-+if the shapefile's shape type requires those values.
-+.B MultiPatch
-+shape types aren't supported.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpcreate (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/shpcreate.1
-@@ -0,0 +1,68 @@
-+.\" Process this file with
-+.\" groff -man -Tascii shpcreate.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+shpcreate \- create an empty ESRI shapefile
-+.SH SYNOPSIS
-+.B shpcreate
-+.I file shapetype
-+.SH DESCRIPTION
-+Creates an empty shapefile supporting shapes of the given type
-+.IR shapetype .
-+Shapefiles actually consist of two files with the same basename and
-+extensions
-+.BR .shp \ and\  .shx " (or " .SHP \ and\  .SHX ") "
-+containing the shape data and shape index respectively.  The files
-+to create are determined by first stripping any filename extension
-+from
-+.I file 
-+and attempting to create the files
-+.IB file .shp
-+or 
-+.IB file .SHP,
-+and
-+.IB file .shx
-+or
-+.IB file .SHX
-+for the respective data and index files.  The supported values for the
-+.I shapetype
-+argument are:
-+.BR point ", " arc ", " polygon ", and " multipoint .
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I file
-+or 
-+.I shapetype
-+argument.
-+.TP
-+.B 2
-+Unknown 
-+.IR shapetype .
-+.TP
-+.B 3
-+Unable to create the shapefile.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI "Shape Type `" shapetype "' not recognised."
-+.TP
-+.RI "Unable to create:" file
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpadd (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/shpdump.1
-@@ -0,0 +1,316 @@
-+.\" Process this file with
-+.\" groff -man -Tascii shpdump.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+shpdump \- dump an ESRI shapefile as text
-+.SH SYNOPSIS
-+.B shpdump [\-validate]
-+.I file
-+.SH DESCRIPTION
-+Prints the contents of the shapefile
-+.I file
-+to standard output in textual format.  Shapefiles actually consist
-+of two files with the same basename and extensions
-+.BR .shp \ and\  .shx " (or " .SHP \ and\  .SHX ") "
-+containing the shape data and shape index respectively.  The files
-+to open are determined by first stripping any filename extension
-+from
-+.I file 
-+and attempting to open the files
-+.IB file .shp
-+or 
-+.IB file .SHP,
-+and
-+.IB file .shx
-+or
-+.IB file .SHX
-+for the respective data and index files.
-+
-+Output consists of a header giving number and type of shapes in the
-+file and the bounds for the minimum and maximum
-+.IR X ,\  Y ,\  Z ", and " M  
-+values appearing in the shapes.  The header is followed by the
-+geometric data for each shape in the file.  All shapes in the file
-+should be of the same type, except that
-+.B NullShape
-+typed shapes may be intermixed with any other type.  The header has
-+the form
-+.RS
-+
-+Shapefile Type:
-+.I type
-+# of Shapes:
-+.I count
-+
-+File Bounds:
-+.RI ( minX , minY , minZ , minM )
-+         to\  
-+.RI ( maxX , maxY , maxZ , maxM )
-+
-+.RE
-+See section
-+.B SHAPE TYPES
-+below for the list of possible shape types.
-+
-+Next for each shape in the file a header giving 
-+it's
-+.IR shape_index ,
-+it's type
-+.IR type ,
-+number of vertices
-+.IR nVertices ,
-+number of parts
-+.IR nParts ,
-+and bounding box is given, followed by the vertex data of each part.
-+.RS
-+
-+Shape:\ 
-+.IR shape_index \ ( type )\ nVertices= nVertices ,\ nParts= nParts
-+  Bounds:
-+.RI ( minX , minY , minZ , minM )
-+      to\  
-+.RI ( maxX , maxY , maxZ , maxM )
-+
-+.RI "  " "vertices of the first part"
-+
-+.RI "+ " "vertices of the second part..."
-+
-+.RI "+ " "vertices of the last part"
-+
-+.RE
-+The
-+.I shape_index
-+of a shape is the number of the shape starting from zero in the shape
-+file.  Each vertex has the form
-+.RS
-+
-+.RI ( X , Y , Z , M )
-+
-+.RE
-+If there are multiple parts then the type of the part is appended
-+appended to first vertex of each part, and the first vertex of the
-+second and following parts is preceded by a plus
-+.RB ( + )
-+sign.  The part type is
-+.B Ring
-+for all shape types except
-+.B MultiPatch
-+where it is the type of a surface patch.  See below for the description
-+of possible part types.
-+.SH SHAPE TYPES
-+Each type of shape except
-+.B MultiPatch
-+typed shapes comes in three flavours: The normal unsuffixed type, where
-+points lie in
-+.IR X/Y -space;
-+a type with suffix
-+.B M
-+where points lie in 
-+.IR X/Y -space
-+and additionally have a
-+.I measure
-+value in
-+.IR M -space;
-+and finally a type with suffix
-+.B Z
-+where points lie in
-+.IR X/Y/Z -space
-+and also have a measure value in
-+.IR M -space.
-+.\"
-+.TP
-+.B NullShape
-+A shape without data.  Shapes of this type may be intermixed with
-+other shapes and are sometimes used to represented deleted or missing
-+geometric data for a shape.
-+.\"
-+.TP
-+.B Point " or " PointZ " or " PointM
-+A single point.
-+.\"
-+.TP
-+.BR Arc " or " ArcZ " or " ArcM
-+Piecewise linear paths.  Shapes of this type may consist of multiple
-+parts which may or may not intersect and/or connect.  Arcs are called
-+.BR PolyLine s
-+in the shapefile specification.
-+.\"
-+.TP
-+.BR Polygon " or " PolygonZ " or " PolygonM
-+Polygon shapes consist of one or more parts, called 
-+.IR rings ,
-+that each define a closed path.  Rings must contain at least four
-+vertices with the first and last vertices being equal, and must not
-+self-intersect.  For shapes of type
-+.BR Polygon ,
-+the rings define a polygon with optional holes by giving the vertices
-+of inner rings a counterclockwise orientation and the vertices of
-+outer rings a clockwise orientation.  Intersection and orientation
-+is always computed in
-+.IR X/Y -space
-+and never in
-+.IR X/Y/M -space.
-+.\"
-+.TP
-+.BR MultiPoint " or " MultiPointZ " or " MultiPointM
-+A set of points.
-+.\"
-+.TP
-+.BR MultiPatch
-+A
-+.B MultiPatch
-+represents one or more surfaces in
-+.IR X/Y/Z -space,
-+and consists of a number of parts called it's
-+.IR "surface patches" .
-+Each surface patch describes a either a surface or a hole in another
-+surface, depending on the type of the patch.  Patches may share a
-+common boundary but may not otherwise intersect.  The type of a patch
-+may be one of
-+.RS
-+.TP
-+.B TriangleStrip
-+A set of connected triangles.  The first three points
-+define the first triangle and every following point defines
-+a new triangle using the new point and the two previous points.
-+.TP
-+.B TriangleFan
-+A set of connected triangles.  The first three points define the first
-+triangle and every following point defines a new triangle using the
-+previous point, the current point, and the first point, thus forming a
-+fan of triangles around the first point.
-+.TP
-+.B OuterRing
-+The outer ring of a sequence of rings defining a polygon with holes.
-+All following parts of type
-+.B InnerRing
-+are taken to be the holes of the polygon.  The sequence of rings
-+ends with the first
-+.RB non- InnerRing
-+typed part or the part of the shape, whichever comes first.
-+.TP
-+.B InnerRing
-+An inner ring in a sequence of rings defining a polygon with holes.
-+This type of part may only follow an
-+.B OuterRing
-+or other
-+.B InnerRing
-+typed parts.
-+.TP
-+.B FirstRing
-+The first in a sequence of rings defining a polygon of
-+unspecified type.  The following parts of type
-+.B Ring
-+defines the other rings in the polygon.  This type of part is used when
-+the innerness or outerness of a polygon isn't known or applicable.  The sequence of rings
-+defining the polygon ends with the first
-+.BR non- Ring
-+typed part or the last part of the shape, whichever comes first.
-+.TP
-+.B Ring
-+A ring in a sequence of rings defining a polygon of unspecified type.
-+It may only follow a
-+.B FirstRing
-+or other
-+.B Ring
-+typed parts.
-+.TP
-+.B UknownPartType
-+This type is returned for parts whose type isn't recognised.
-+.RE
-+.\"
-+.TP
-+.B UnknownShapeType
-+This type is returned for shapes whose type isn't recognised.
-+.SH OPTIONS
-+.TP
-+.B \-validate
-+Performs validation on the orientation of inner and outer rings in
-+.BR Polygon ", " PolygonZ ", and " PolygonM
-+objects.  According to the shapefile specification outer rings should
-+be given a clockwise orientation, and inner rings that define holes a
-+counterclockwise orientation.  If some rings of a shape are oriented
-+the wrong way around then the following message is output after
-+dumping that shape:
-+
-+.IR  count " rings wound in the wrong direction."
-+
-+In addition the total number of shapes with problem rings is output
-+after the last shape has been dumped:
-+
-+.IR count " object has invalid ring orderings."
-+
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+No shapefile
-+.I file
-+was given or it couldn't be opened.
-+.SH EXAMPLE
-+.PP
-+.RS
-+$ shpdump shapefile.shp
-+
-+Shapefile Type: Arc   # of Shapes: 3
-+
-+File Bounds: ( 3531586.750, 7253086.100,0,0)
-+         to  ( 3536417.463, 7778375.875,0,0)
-+
-+Shape:0 (Arc)  nVertices=2, nParts=1
-+  Bounds:( 3536397.797, 7253086.100, 0, 0)
-+      to ( 3536417.463, 7253163.597, 0, 0)
-+     ( 3536397.797, 7253163.597, 0, 0) Ring 
-+     ( 3536417.463, 7253086.100, 0, 0)  
-+
-+Shape:1 (Arc)  nVertices=3, nParts=1
-+  Bounds:( 3458966.390, 7373335.808, 0, 0)
-+      to ( 3459141.856, 7373474.681, 0, 0)
-+     ( 3458966.390, 7373474.681, 0, 0) Ring 
-+     ( 3458979.042, 7373466.273, 0, 0)  
-+     ( 3459141.856, 7373335.808, 0, 0)  
-+
-+Shape:2 (Arc)  nVertices=7, nParts=1
-+  Bounds:( 3531586.750, 7777880.500, 0, 0)
-+      to ( 3532930.206, 7778375.875, 0, 0)
-+     ( 3531586.750, 7777880.500, 0, 0) Ring 
-+     ( 3532228.265, 7778072.455, 0, 0)  
-+     ( 3532310.897, 7778119.445, 0, 0)  
-+     ( 3532367.866, 7778144.877, 0, 0)  
-+     ( 3532440.559, 7778168.920, 0, 0)  
-+     ( 3532506.504, 7778190.785, 0, 0)  
-+     ( 3532930.206, 7778375.875, 0, 0)
-+
-+$ 
-+.RE
-+.PP
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI "Unable to open:" file
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH BUGS
-+The
-+.B \-validate
-+option supports only one outer ring in a polygonal shape
-+and assumes that the first ring in a shape is the outer ring.  It doesn't support
-+polygons inside
-+.B MultiPatch
-+shapes.  The
-+.IR X " and " Y 
-+coordinates of a point are printed to three decimal places only.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpadd (1),
-+.BR shpcreate (1),
-+.BR shprewind (1)
---- /dev/null
-+++ b/man/shprewind.1
-@@ -0,0 +1,88 @@
-+.\" Process this file with
-+.\" groff -man -Tascii shprewind.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+shprewind \- fix polygon ring orientations in ESRI shapefiles
-+.SH SYNOPSIS
-+.B shprewind
-+.I infile outfile
-+.SH DESCRIPTION
-+Makes a copy of the shapefile
-+.I infile
-+to 
-+.I outfile
-+and fixes the orientation of points in the rings of
-+.BR Polygon ", " PolygonZ ", and " PolygonM
-+typed shapes to conform to the shapefile specification.  According to the
-+specification, the vertices of outer rings should be oriented
-+clockwise on the
-+.I X/Y
-+plane, and those of inner rings counterclockwise.
-+
-+Shapefiles actually consist of two files with the same basename and
-+extensions
-+.BR .shp \ and\  .shx " (or " .SHP \ and\  .SHX ") "
-+containing the shape data and shape index respectively.  The files
-+to open are determined by first stripping any filename extension
-+from
-+.I infile 
-+and attempting to open the files
-+.IB infile .shp
-+or 
-+.IB infile .SHP,
-+and
-+.IB infile .shx
-+or
-+.IB infile .SHX
-+for the respective data and index files.  The files to create
-+from
-+.I outfile
-+are determined by stripping any filename extension from
-+.I outfile
-+and appending
-+.B .shp
-+and
-+.B .shx
-+suffixes for the respective data and index files.
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing
-+.I infile
-+or
-+.I outfile
-+arguments, failed to open shapefile
-+.I infile
-+or create shapefile
-+.IR outfile.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI "Unable to open:" infile
-+.TP
-+.RI "Unable to create:" outfile
-+.TP
-+.IR count " objects rewound."
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH BUGS
-+The implementation assumes that there is at most one outer ring in
-+each shape, that it is the first ring in a shape, and all other
-+rings in a shape are inner rings.  Polygons inside
-+.B MultiPatch
-+shape types aren't rewound.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpadd (1),
-+.BR shpcreate (1),
-+.BR shpdump (1)
---- /dev/null
-+++ b/man/shptest.1
-@@ -0,0 +1,89 @@
-+.\" Process this file with
-+.\" groff -man -Tascii shptest.1
-+.\"
-+.TH SHAPELIB 1 "OCTOBER 2004" "shapelib" "User Commands"
-+.SH NAME
-+shptest \- create some shapefiles for testing
-+.SH SYNOPSIS
-+.B shptest
-+.I num
-+.SH DESCRIPTION
-+Writes out a shapefile consisting of files
-+.RI test num .shp
-+and
-+.RI test num .shx
-+in the current directory.  The
-+.I num
-+argument specifies the type of shapes in the shapefile to create and takes
-+values from:
-+.TP
-+.B 0
-+.B  NullShape
-+.TP
-+.B 1
-+.B  Point
-+.TP
-+.B 2
-+.B  PointZ
-+.TP
-+.B 3
-+.B  PointM
-+.TP
-+.B 4
-+.B MultiPoint
-+.TP
-+.B 5
-+.B MultiPointZ
-+.TP
-+.B 6
-+.B MultiPointM
-+.TP
-+.B 7
-+.B Arc
-+.TP
-+.B 8
-+.B ArcZ
-+.TP
-+.B 9
-+.B ArcM
-+.TP
-+.B 10
-+.B  Polygon
-+.TP
-+.B 11
-+.B  PolygonZ
-+.TP
-+.B 12
-+.B PolygonM
-+.TP
-+.B 13
-+.B MultiPatch
-+.SH EXIT STATUS
-+.TP
-+.B 0
-+Successful program execution.
-+.TP
-+.B 1
-+Missing argument.
-+.TP
-+.B 10
-+Test
-+.RI ` num '
-+not recognised.
-+.SH DIAGNOSTICS
-+The following diagnostics may be issued on stdout:
-+.TP
-+.RI "Test `" num "' not recognised."
-+.SH AUTHORS
-+Frank Warmerdam (warmerdam at pobox.com) is the maintainer of the
-+.B shapelib
-+shapefile library.  Joonas Pihlaja (jpihlaja at cc.helsinki.fi) wrote
-+this man page.
-+.SH "SEE ALSO"
-+.BR dbfadd (1),
-+.BR dbfcreate (1),
-+.BR dbfdump (1),
-+.BR dbf_dump (1),
-+.BR shpcreate (1),
-+.BR shpdump (1),
-+.BR shprewind (1)
diff --git a/debian/patches/series b/debian/patches/series
index efbfac5..6bea34f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-0001-Add-manpages.patch
 0003-Properly-use-libtool.patch
 0004-Dynamically-link-the-shp-binaries-to-libshp.patch
 0005-Stop-setting-CFLAGS-and-PREFIX-in-the-Makefile.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/shapelib.git



More information about the Pkg-grass-devel mailing list