shprewind

Langue: en

Version: OCTOBER 2004 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)

NAME

shprewind - fix polygon ring orientations in ESRI shapefiles

SYNOPSIS

shprewind infile outfile

DESCRIPTION

Makes a copy of the shapefile infile to outfile 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 infile and attempting to open the files infile.shp or infile.SHP, and infile.shx or infile.SHX for the respective data and index files. The files to create from outfile are determined by stripping any filename extension from outfile and appending .shp and .shx suffixes for the respective data and index files.

EXIT STATUS

0
Successful program execution.
1
Missing infile or outfile arguments, failed to open shapefile infile or create shapefile outfile.

DIAGNOSTICS

The following diagnostics may be issued on stdout:
Unable to open:infile
Unable to create:outfile
count objects rewound.

AUTHORS

Frank Warmerdam (warmerdam@pobox.com) is the maintainer of the shapelib shapefile library. Joonas Pihlaja (jpihlaja@cc.helsinki.fi) wrote this man page.

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)