A partial territory class and the idgen associated.