The countryside around the town is mostly farmed, although there are some areas of nearby woodland. About to the north-east is Beacon Hill Wood, owned by the Woodland Trust), at the junction of the Fosse Way and a Roman road along the top of the Mendip Hills, which contain a number of tumuli. To the north-west of the town are Ham Woods, within which are the Windsor Hill railway tunnels and a viaduct, remnants of the Somerset and Dorset Joint Railway. The East Mendip Way long-distance path passes around the northern edge of Shepton Mallet and through Ham Woods. South-west of the town is the Friar's Oven SSSI, site of herb-rich calcareous grassland classified as the Upright Brome ("Bromus erectus") type, and north-east is the Windsor Hill Quarry geological SSSI and the Windsor Hill Marsh biological SSSI, a marshy silted pond with adjacent damp, slightly acidic grassland of interest for its diverse flora, largely due to the varied habitats present within a small area. Two species are present that are rare in Somerset: Flat-sedge ("Blysmus compressus") and Slender Spike-rush ("Eleocharis uniglumis"). Other marshland plants there include Purple Loosestrife, Yellow Flag ("Iris pseudacorus"), Hard Rush ("Juncus inflexus"), Soft Rush ("J. effusus"), Flowering Rush ("Butomus umbellatus"), Devil's-bit Scabious ("Succisa pratensis"), three species of Horsetail "Equisetum" spp. and seven sedges "Carex" spp. The centre and oldest parts of Shepton Mallet are adjacent to the River Sheppey, at the bottom of a valley about above sea level. The edges of the town lie about higher. The river has cut a narrow valley, and between Shepton Mallet and the village of Croscombe, to the west, it is bounded by steeply sloping fields and woodland. However, the river flows through much of Shepton Mallet itself in underground culverts. It occasionally floods after heavy rain, such as on 20 October 2006, and again on 29 May 2008, when the rainfall was too heavy for the culverts to cope. Some houses around Leg Square, Lower Lane and Draycott Road were submerged to a depth of . A study by the Environment Agency identified that the current standard of flood protection in these parts of the town is insufficient, as it was of a 5–10-year event standard, whereas current guidelines require protection of a 50–200-year standard.