shpsort(1) rewrite a shapefile sorted by a field or by the geometry

SYNOPSIS

shpsort infile outfile field[;...] [<(ASCENDING|DESCENDING)[;...]>]

DESCRIPTION

Rewrite a shapefile sorted by a field or by the geometry. For polygons, sort by area, for lines sort by length and do nothing for all others.

OPTIONS

infile
input shapefile
outfile
output shapefile
field[;...]
one or more fields to use for ordering
[<(ASCENDING|DESCENDING)[;...]>]
sort order

AUTHOR

shpsort is part of shapelib, maintained by Frank Warmerdam.