The institution, in the 15th century, of the Dogana delle Pecore di Foggia, the magistracy charged of the questions related to the demanio armentizio (state property for livestock) in the territory of central-southern Italy, is an important event, particularly for those who work in the field of landscape and territorial history, because of its role in the construction of a territorial configuration that was peculiar to the whole of central-southern Italy. From the fifteenth century, the Dogana delle Pecore (Customs of Sheep) of Foggia, conceived on the model of the Spanish Mesta, imposed itself as a particularly effective instrument of fiscal control, an instrument through which the central government procured monetary revenue by temporarily ceding to transhumant shepherds, technically defined in the system as "locati", territories and services of the prince or mediated by him (Marino, 1992, p. 12). The development of this system, which crystallised centuries-old farming practices in the bureaucratic network and the territory, was, from the early modern age, the cause of competition, which sometimes resulted in conflict, between centralist instances, aimed at protecting pastoral production, and pressing local instances, which preferred forms of territorialisation aimed, according to a more consolidated scheme, at an agricultural use of the land. In this system, which in some cases has been interpreted as "the submission of the plains to the economic reasons or needs of the mountains" (Farinelli, 2003, p. 51), transhumance, over time, has become an actual state enterprise, robust in terms of capital and pertinent areas, which requires, for its development, a balanced coexistence with ancient agricultural practices (Marino, 1996, p. 16). Hence the need to know, organise and represent the territory to moderate competition and encourage cooperation. This need is met by a series of regulations and documents produced within the institution, whose purpose is to create various practices for organising and governing the complexity of the territory. The map is one of the leading tools in the construction of this system. In order to construct the complex and extensive territorial structure, it is necessary to organise a capillary cartographic operation that is continuous over time, aimed, on the one hand, at giving stability to the system and, on the other, at managing a series of problems that arise in the organisation of the institution. Those responsible for monitoring the territory are the Regi Compassatori, technicians with a licence, responsible for controlling the pastures, checking for illegal occupations, and reintegrating the network of sheep tracks and leases if necessary. They are professionals whose task is to measure, describe, organise and manage the territories of the Customs (Petrella, 2017). Although some studies on the Foggia Customs cartography and the Regi Compassatori have already been carried out (Di Cicco, 1990, Marino, 1996, Petrella, 2017, Russo, 2007), a detailed work focusing on the cartography they produced, their formation, their socio-cultural context, the knowledge networks they created remains still an element not sufficiently explored. In particular, it remains to be identified, by analysing their representations and the archival material on their activities preserved in the State Archives of Foggia, their role as mediators of the territory, as builders of landscapes where agriculture and pastoralism coexist. Such a role was possible through a meticulous geometric control of the properties and a recognition of the needs and the construction of works aimed at managing territory that today we would define multifunctional. To this end, the period comprised between the 1710s and the 1780s constitutes a particularly active phase in the history of the Customs and a moment of theoretical and cartographic elaboration deserving special attention. It is a moment of intensive reorganisation of the Customs when the first signs of crisis in the wool market of the Neapolitan kingdom start. The terminus a quo and post quem of this research are respectively the Crivelli and Magnacca reintegrations, that is to say, the complex re-establishment operations of the sheep-track routes aimed at controlling and restoring the transhumance routes often subject to misappropriation. The careers of some of these professionals working in the period have been reconstructed through the letters of dispatch of the licences and the cartographic documents inventoried in the Customs fund of the Foggia State Archive. In almost all cases, these people came from the areas affected by the customs institution: Apulia, Abruzzo, Molise and Basilicata. They are, therefore, local professionals who, in some cases, have had previous experience in other institutions of the Kingdom of Naples. The development of this professional profile is particularly characteristic of the areas of origin of the locati, especially in the territories of Abruzzo and Upper Molise. Small mountain towns such as Vastogirardi, Capracotta and Lucoli, for example, were the places of origin of many technicians, a sign of a professional specialisation of the area, built up through a tradition perpetuated at a family level. The social background of compassatori is also heterogeneous. They include notaries and even priests. Once they had obtained their licence, compassatori practised their profession using a few simple tools: the iron chain, the compass and the surveying square. During their travels through the transhumance territories, compassatori take measurements, listen to the parties involved and finally make cartographic representations during periods when surveys cannot be carried out due to the winter climate. Their role is as relevant as unpopular: they are both guarantors of a balance between stakeholders and customs officials. However, they are not perceived as external entities as they are often inhabitants of the places monitored. This characteristic allows them to operate better on the territory and prevent any conflicting attitudes. It cannot be said, however, that they are generally well-liked characters, also because of the damage caused to the various subjects by the horses and the groups of people who "invade" the sown fields at a time of the year, the spring, when the grains are still in the grass (Di Stefano, 1732, t.2, p. 210). The numerous operations in which the 18th-century surveyors measured the territories of the Customs House, well documented in their memoirs, led to remarkably accurate topographical representations. Among the most active cartographers is Michele della Croce of Vastogirardi, whose long career as a land surveyor and enormous cartographic production yields only partially known documents worth dwelling on. In this context, we focus on the dispute taking place in 1726 between the centres of Carovilli and Castiglione and the tenants for the right of passage through a stretch of sheep-track intersecting a defence, i.e. an area designated for civic use. The reason for the dispute was that in the area, despite the two sheep tracks assigned by the Royal Court, whose passage was completely free, the tenants had created a third route, a shortcut, right in the territories belonging to the Universities. Michele della Croce drew up a map of the territory (Figure 2), the elaboration of which became the basis for the Universities to obtain the claimed right to the duty. This document is representative of the technique used to produce it. It is particularly noteworthy that the document, as a whole, denotes a deep knowledge of the places by the land surveyor, attentive to every small detail, and a particular predilection for the area, contiguous to Della Croce's place of origin. In this sense, Della Croce creates an identity representation of the territory in which, through a system of well documented topographic particulars and local toponyms, he expresses a feeling of belonging to the places portrayed. Such an approach probably became a way to act quickly and effectively to resolve the dispute. From the middle of the 18th century, the profile of the Regi Compassatori became increasingly specialised, and his role was not limited to mere surveying. Not only because of a cartographic representation that became increasingly realistic and imbued with "personal" traits but also because of an evolution of tasks, which began to be involved in more complex issues of customs territory management. Witness to this is the inclusion of some of them in implementing projects aimed at effective land management and collaboration with the engineers of other institutions. The evolution of the corps, from a fragmentary experience linked to a group of poorly coordinated and up-to-date surveyors to a group of technicians capable of meeting the challenges of land management, is paradigmatic on the one hand of the evolution of a cartographic magistracy in a peripheral territory, and on the other of the progressive investment of public commissions. In the period analysed, the latter appears to be aware of the decisive role of monitoring and drawing the territory to preserve an economic-productive condition. The geometry and topographical rendering of the territory, which in the case analysed takes on a solid socio-political value, takes place through particular forms of representation in which the need for measurement is progressively accompanied by artistic figuration, in some cases identity-based. In this sense, the map creation is facilitated by the direct knowledge of the territory and a sort of identity instance that contributes to constructing a precise, capillary and lived representation of the territories of transhumance. In this particular way of acquiring topographical instruments, valuable tools for resolving disputes, we can trace the particular imprint that the Regi Compassatori gives to the territory's construction. By the end of the 18th century, royal surveyors expressed both centre and periphery instances, and their skills led to an evolution towards the profession of engineer, already seen in other European contexts. [ABSTRACT FROM AUTHOR]