%CENTROID Macro
         
         Retrieves the centroids of polygons 
         
            
               | Variables written out: | 
               X, Y, id variables | 
            
            
               | Requirement: | 
               You must run the %ANNOMAC macro before using
                  any other annotate macros. For more information, see Making the Macros Available. | 
            
         
         
         
         
         
         
            Syntax 
            
            
               %CENTROID (input-data-set, output-data-set, list-of-id-variables <SEGONLY= n>); 
               
             
            
               
                  Parameters
                  
                  - input-data-set
 
                     - 
                        
specifies a map data
                           set. The input map data set must be sorted by the ID variables.
                        
                      
                  
                  - output-data-set
 
                     - 
                        
contains the ID variables
                           and the X and Y variables.
                        
                      
                  
                  - list-of-id-variables
 
                     - 
                        
specifies the variables
                           each of which is to be assigned the centroid coordinates of each observation
                           in the input-data-set. There will be one observation for each unique
                           set of ID values. If you specify more than one ID variable, then separate
                           each variable with a space.
                        
                      
                  
                  - SEGONLY= n
 
                     - 
                        
specifies that only
                           the nth segment of each map
                           area is used to calculate the centroid. For example, if you specify
                           SEGONLY=1, then only the first segment of each area is used.