- bookworm 8.0.0-3+b8
- bookworm-backports 8.2.2-1~bpo12+1
- testing 8.2.2-1+b1
- unstable 8.2.2-1+b2
- experimental 8.4.0~beta2-1~exp1
sortshp(1) | sortshp(1) |
NAME¶
sortshp - sort a Shape data set
SYNOPSIS¶
sortshp
[ infile outfile item [ascending |
descending] | -v]
DESCRIPTION¶
sortshp sorts a Shape data set based on a single column in ascending or descending order. Supports INTEGER, DOUBLE and STRING column types. Useful for prioritizing shapes for rendering and/or labeling.
The idea here is that if you know that you need to display a certain attribute classed by a certain value, it will be faster for MapServer to access that value if it is at the beginning of the attribute file.
OPTIONS¶
- infile
- The name of the .shp file
- outfile
- The name of the .shp/.shx and .dbf files to create
- item
- Name of the field to sort on
- ascending, descending
- Sort order (default: ascending)
- -v
- Display mapserver version and build options.
EXAMPLE¶
This example uses a roads file ('roads_ugl') that has a field with road classes in integer format ('class1').
sortshp roads_ugl roads-sort class1 ascending
Result:
Figure 1: Attributes Before sortshp
⟨http://mapserver.org/_images/sortshp-before.png⟩
Figure 2: Attributes After sortshp
⟨http://mapserver.org/_images/sortshp-after.png⟩
SEE ALSO¶
02 September 2024 |