1. Does the adjective follow the first noun in case and definiteness? Al-qaryati and al-ẓālimi are both definite and genitive.
2. Whose quality is asserted? The village’s people, ahluhā, not the village itself.
When the quality belongs to a related noun, use the relational-naʿt analysis.