Compactness and contiguity are crucial criteria in political geography and electoral districting, ensuring that districts are geographically coherent and not excessively fragmented. These principles aim to prevent gerrymandering by promoting fair representation through logically shaped and connected electoral boundaries.