displacements and rapid urbanization need regular updating, meaning that the manual digitization process must be replicated.

Previously, automated zone design methods have been employed to group areas into zones for a range of purposes including investigation of neighborhood effects on health and release of census data (Cockings et al. 2011; Flowerdew et al. 2007; Haynes et al. 2007). To construct the created new zones some constraints were considered such as population size and building types. However, these works were conducted in developed countries where actual household data were available, and the method relied on previously-defined sub-units or EAs. In addition, in most cases, the created zone boundaries do not match well with the logical ground natural boundary. Several studies have also employed region merging techniques to derive the census enumeration areas. For instance, Folch & Spielman (2014) showed the advantage of applying the improved max-p algorithm on growing the irregular regions from census tracts. In New Zealand, the ArcGIS/AZTool toolkit, which is a region-merging tool, was developed to design new reporting geographic units using the 2006 census data as the main input, with significant improvements over traditional methods reported (Martin and Lyndon 2009). However, all these examples used existing EAs as their base unit and no works exist that have employed region merging techniques to generate new EAs in a country where an existing product is not available.

Despite the many potential advantages of automated EA generation, the approach has not gained significant uptake in LMIC contexts where the kinds of spatial data previously used in tools like the AZTool (such as census tracts) are unavailable or outdated. Fortunately, many new and freely available data sources have become available, which can directly inform the creation of EAs. For example, crowdsourced road and natural feature data, which can be used to define logical boundaries for EAs, are increasingly available in repositories such as Open Street Maps (OSM). Globally, OSM is ~83% complete; more than 40% of countries (including several in the developing world) have a fully mapped street network (Barrington-Leigh & Millard-Ball 2017). In addition, global high-resolution population models such as WorldPop (www.worldpop.org, 2019) provide estimates of population density that can be used to help inform the creation of EAs.

Here for the first time, we describe how these freely available data on population and georeferenced features can be combined to design a new full set of pre-defined census EAs, or to update existing EAs, using Somalia to demonstrate the process. Our automated process is based on a methodology we termed ‘split and merge’, inspired from the field of image processing, specifically image segmentation using mathematical morphology (e.g. watershed and waterfall algorithms; Beucher 1994; Damiand & Resch 2003). The process first splits the country into regions as small as possible that follow visible boundaries (e.g. roads), then progressively re-merges them so that they are as large as possible while respecting given constraints on the area and population size, and so that they do not cross obstacles and administrative boundaries. This process ensures creating EAs so that their boundaries do not cut across buildings and can be seen easily from the ground by surveyors.

# **2. Methodology**

At the request of the World Bank, we applied an automated EA delineation process to build a national sampling frame for Somalia. This section describes our approach and then details its application in the context of Somalia.

# **2.1 General approach**

We developed a novel automated process to create EAs for an entire country that falls within given ranges of population size and area, that does not cut through buildings, that do not cross obstacles and administrative boundaries, and that follow tangible borders visible from the ground as much as possible.

3