Purpose
Begins a redistricting session. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax
Create Redistricter source_table By district_column
With
[ Layer <layer_number> ]
[ Count ]
[ , Brush ] [ , Symbol ] [ , Pen ]
[ , { Sum | Percent } ( expr ) ] [ , { Sum | Percent } ( expr ) ... ]
[ Percentage From expr ]
[ Percentage from { column | row } ]
[ Order { "MRU" | "Alpha" | "Unordered" } ]
source_table is the name of the table containing objects to be grouped into districts.
district_column is the name of a column; the initial set of districts is built from the original contents of this column, and as objects are assigned to different districts, MapInfo Pro stores the object's new district name in this column.
layer_number is the number of a layer in the current Map window (for example, 1 for the top layer); to determine the number of layers in a Map window, call the MapperInfo() function.
Count keyword specifies that the Districts Browser will show a count of the objects belonging to each district.
Brush keyword specifies that the Districts Browser will show each district's fill style.
Symbol keyword specifies that the Districts Browser will show each district's symbol style.
Pen keyword specifies that the Districts Browser will show each district's line style.
expr is a numeric column expression.
Percentage From clause specifies in-row calculation.
Order clause specifies the order of rows in the Districts Browser (alphabetical, unsorted, or based on most-recently-used); default is MRU.
Description
The Create Redistricter statement begins a redistricting session. This statement corresponds to choosing MapInfo Pro's Redistricter command on the HOME tab. For an introduction to redistricting, see the MapInfo Pro documentation.
To control the set of districts, use the Set Redistricter statement. To end the redistricting session, use the Close Window statement to close the Districts Browser window.
If you include the Brush keyword, the Districts Browser includes a sample of each district's fill style. Note that this is not a complete Brush clause; the keyword Brush appears by itself. Similarly, the Symbol and Pen keywords are individual keywords, not a complete Symbol clause or Pen clause. If the Districts Browser includes brush, symbol, and/or pen styles, the user can change a district's style by clicking on the style sample that appears in the Districts Browser.
The Percentage From clause allows you to specify the in-row mode of percentage calculation. If the Percentage From clause is not specified, the in-column method of calculation is used.
See Also:
Set Redistricter statement