(self, threshold=100)
return geounits
Get a list of the geounit ids of the geounits that comprise
        this plan at the base level.

        Parameters:
            threshold - distance threshold used for buffer in/out optimization

        Returns:
            A list of tuples containing Geounit IDs, portable ids,
            district ids, and num_members that lie within this Plan.
Get a list of the geounit ids of the geounits that comprise
        this plan at the base level.
Get a list of the geounit ids of the geounits that comprise this plan at the base level .
def get_base_geounits(self, threshold=100):
        """
        Get a list of the geounit ids of the geounits that comprise
        this plan at the base level.

        Parameters:
            threshold - distance threshold used for buffer in/out optimization

        Returns:
            A list of tuples containing Geounit IDs, portable ids,
            district ids, and num_members that lie within this Plan.
        """

        # Collect the geounits for each district in this plan
        geounits = []
        for district in self.get_districts_at_version(
                self.version, include_geom=True):
            # Unassigned is district 0
            if district.district_id > 0:
                districtunits = district.get_base_geounits(threshold)
                # Add extra district data to the tuples
                geounits.extend([(gid, pid, district.district_id,
                                  district.num_members)
                                 for (gid, pid) in districtunits])

        return geounits
def get_base_geounits ( self , threshold = 100 ) : # Collect the geounits for each district in this plan geounits = [ ] for district in self . get_districts_at_version ( self . version , include_geom = True ) : # Unassigned is district 0 if district . district_id > 0 : districtunits = district . get_base_geounits ( threshold ) # Add extra district data to the tuples geounits . extend ( [ ( gid , pid , district . district_id , district . num_members ) for ( gid , pid ) in districtunits ] ) return geounits