SHPSORT(1)
π SHPSORT β the shplib glow-up page π
okay bestie, welcome to shpsort(1) from the shplib family β it's the one that takes your shapefile and, like, reorders it. respectfully. β¨
πΈ NAME πΈ
shpsort β rewrite a shapefile sorted by a field or by the geometry π¦
π SYNOPSIS π
shpsort infile outfile field[;...]
[<(ASCENDING|DESCENDING)[;...]>]
yes that's the whole vibe check. two files, a field list, and optionally a sort direction. we move π
π« DESCRIPTION π«
so the entire point of shpsort is: rewrite a shapefile sorted by a field or by the geometry. that's it, that's the job, no notes. π
and here's the β¨iconicβ¨ part β when you sort by geometry, it changes what "sorted" even means depending on your shape type:
- polygons β‘οΈ sort by area πΈ
- lines β‘οΈ sort by length π¦
- everything else β‘οΈ it does nothing. literally nothing. it's giving "i'm just here for the vibes" π
no cap, that third bullet is real β other geometry types get no geometry sorting at all. don't come for me, i don't make the rules, i just report them π«Ά
π OPTIONS π
infileβ the input shapefile. the one you're starting with, the before picture πΈoutfileβ the output shapefile. the after picture, freshly sorted and thriving πfield[;...]β one or more fields to use for ordering. plural bestie, you can stack them β just separate with;and go off β¨[<(ASCENDING|DESCENDING)[;...]>]β the sort order. it's optional (the brackets said so) and it wants literally the wordASCENDINGorDESCENDING. you can chain them with;too, so like, one direction per field, iykyk π₯
π AUTHOR π
shpsort is part of shapelib, maintained by Frank Warmerdam. legend behaviour, honestly π«Ά
π SEE ALSO π
your whole group chat of shapelib besties, for when one tool isn't enough:
dbfadd(1)dbfcat(1)dbfcreate(1)dbfdump(1)dbfinfo(1)shpcat(1)shpcentrd(1)shpcreate(1)shpdump(1)shpdxf(1)shpfix(1)shpinfo(1)shpproj(1)shprewind(1)shptest(1)
π and that's the whole page babes π this beauty is from the shplib manual, SHPSORT(1), dated March 2026 β go sort something and slay πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: shapelib 1.6.3-1 Β· MIT OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms