File: sortshp.1.xml

package info (click to toggle)
mapserver 8.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,492 kB
  • sloc: ansic: 137,759; cpp: 124,149; python: 3,175; xml: 1,722; yacc: 1,114; cs: 1,001; sh: 836; lex: 778; java: 588; perl: 489; makefile: 383; tcl: 158; ruby: 55
file content (147 lines) | stat: -rw-r--r-- 4,220 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry id='sortshp'>

  <refmeta>
    <refentrytitle>sortshp</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>sortshp</refname>
    <refpurpose>sort a Shape data set</refpurpose>
  </refnamediv>

  <refsynopsisdiv id='synopsis'>
    <cmdsynopsis>
      <command>sortshp</command>
      <group>
        <arg choice='plain'>
          <replaceable>infile</replaceable>
          <arg choice='plain'><replaceable>outfile</replaceable></arg>
          <arg choice='plain'><replaceable>item</replaceable></arg>
          <group>
            <arg choice='plain'><replaceable>ascending</replaceable></arg>
            <arg choice='plain'><replaceable>descending</replaceable></arg>
          </group>
        </arg>
        <arg choice='opt'><option>-v</option></arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id='description'>
    <title>DESCRIPTION</title>
    <para>
      <command>sortshp</command> 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.
    </para>

    <para>
      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.
    </para>
  </refsect1>

  <refsect1 id='options'>
    <title>OPTIONS</title>
    <variablelist>

      <varlistentry>
        <term><replaceable>infile</replaceable></term>
        <listitem>
          <para>The name of the .shp file</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>outfile</replaceable></term>
        <listitem>
          <para>The name of the .shp/.shx and .dbf files to create</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>item</replaceable></term>
        <listitem>
          <para>Name of the field to sort on</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>ascending</replaceable></term>
        <term><replaceable>descending</replaceable></term>
        <listitem>
          <para>Sort order (default: ascending)</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-v</option></term>
        <listitem>
          <para>Display mapserver version and build options.</para>
        </listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1 id='example'>
    <title>EXAMPLE</title>

    <informalexample>
      <para>
        This example uses a roads file ('roads_ugl') that has a field with road
        classes in integer format ('class1').
      </para>

      <screen>
       sortshp roads_ugl roads-sort class1 ascending
      </screen>

      Result:
      <blockquote>
        A new Shape data set named 'roads-sort.shp' is created with shapes
        sorted in ascending order, according to the values in the 'class1'
        field.
      </blockquote>

      <figure id='before'>
        <title>Figure 1: Attributes Before sortshp</title>
        <ulink url="http://mapserver.org/_images/sortshp-before.png"/>
      </figure>

      <figure id='after'>
        <title>Figure 2: Attributes After sortshp</title>
        <ulink url="http://mapserver.org/_images/sortshp-after.png"/>
      </figure>
    </informalexample>
  </refsect1>

  <refsect1 id='see-also'>
    <title>SEE ALSO</title>

    <citerefentry>
      <refentrytitle>map2img</refentrytitle>
      <manvolnum>1</manvolnum>
    </citerefentry>,

    <citerefentry>
      <refentrytitle>shptree</refentrytitle>
      <manvolnum>1</manvolnum>
    </citerefentry>,

    <citerefentry>
      <refentrytitle>shptreetst</refentrytitle>
      <manvolnum>1</manvolnum>
    </citerefentry>,

    <citerefentry>
      <refentrytitle>shptreevis</refentrytitle>
      <manvolnum>1</manvolnum>
    </citerefentry>
  </refsect1>

</refentry>