But in all cases, the process is more or less the same. Mapmakers begin with Census Bureau data that marries political boundaries and geographic features like rivers and roads with information on residents’ ages, races and ethnicities. Redistricting software can add custom-tailored political data to the mix, allowing map-drafters to see instantly the partisan impact on a proposed district of adding or removing areas as small as a block.

Kimball W. Brace, whose firm, Election Data Services, mostly assists Democrats, said the basics are little changed from the 1980s, when he used huge paper maps and acetate overlays to create districts in Illinois. Back then, he said, finished map data was entered onto coding sheets by hand, then taken to a local bank whose mainframe would crunch the numbers overnight after it finished clearing checks.

Modern computers have reduced those weeks of work to hours, and both maps and census and political data have become far more accurate, he said. In creating 2011 redistricting maps, Wisconsin Republicans created a composite partisan score for each of the state’s 6,000-plus wards based on the results of statewide elections since 2004. North Carolina used results from as many as 20 state elections; Maryland’s NCEC Services used a regularly updated “Democratic performance index,” a proprietary analysis of the party’s strength in state and federal races.

Redistricting that begins in 2021 is likely to be even more finely tuned, Mr. Brace said, relying on the explosion of marketing and online information that can infer personal preferences down to individual households. “We’re seeing that more and more in campaigns,” he said, “so I think you’ll see people wanting to use it in redistricting.”

While consultants can and sometimes do produce hundreds of suggested maps, most present political leaders with between five and 10 options that can be fine-tuned to meet incumbents’ wishes.

In states where political power is divided, district maps may be politically neutral — or drawn to shield incumbents in both parties. In other states under one-party control, the political marching orders may be more brazen: North Carolina Republicans ordered that no more than three of the state’s 13 House seats be given to Democrats.

Mr. Gaddie, who analyzed the partisan impact of proposed Wisconsin State Assembly maps for the chamber’s Republicans, says partisan gerrymandering has become a threat to the political system because politics has devolved into all-out ideological war, not because of redistricting software or dark-hearted mapmakers. He said he abandoned a sideline as a redistricting adviser and expert witness in redistricting lawsuits after finishing work in Wisconsin.