A junction town on the plateau
Kozina and Hrpelje are two settlements separated only by the railway, and together they make one small town on the Karst plateau at 491 m. Hrpelje is the seat of the municipality of Hrpelje-Kozina; Kozina lies on the side of the main roads. The town sits where the Ljubljana–Koper route crosses the road from Trieste to Rijeka, and that crossing explains it as it is today.
The town grew with the railway. The Istrian line to Pula opened through Hrpelje-Kozina in 1876, and from 1887 to 1959 a second line ran down to Trieste; a marked footpath now follows part of its route. Until December 2007 the road to Trieste had a border crossing at Krvavi Potok–Pesek, abolished under Schengen. The Italian name, Erpelle-Cosina, dates from the Italian period of 1920–1947: it is historical, not official, and this is not a bilingual municipality.
The municipality spans the limestone of the Karst, the flysch hills of the Brkini and the edge of the Čičarija. To the west the plateau ends at the Kraški rob, the Karst edge: the step where the limestone drops onto the flysch hills of Istria, which the motorway and the railway both have to get down on their way to Koper. To the south rises the Slavnik, at 1,028 m the highest summit of Slovenian Istria.
Kozina is a working junction, not a postcard village. For now every freight train to and from the port of Koper passes through, and the station at Hrpelje-Kozina hosts the control centre of the Divača–Koper line. According to the Slovenian statistics office, the two towns have grown far faster than the national average over the past decade. Part of that growth coincides with the years of the second-track construction site, and the figures include foreign residents: some of it may be temporary workers rather than people settling for good.

