William Stanger, medical practitioner, civil servant, surveyor and plant collector, studied medicine and natural history at Edinburgh University, qualifying as Doctor of Medicine (MD). After a visit to Australia, apparently as ship's surgeon, he practised his profession in London. On the basis of his knowledge of natural history and his adventurous nature he became the geologist and medical doctor to a Royal Navy anti-slaving and exploratory expedition, led by Captain H. Trotter, up the Niger River in 1841. He was one of only a few members who survived the attacks of malaria during this venture, which yielded meagre scientific results and permanently affected his health. However, his observations resulted in a paper, "On the geology of some points on the west coast of Africa, and of the banks of the river Niger", that was published in the Proceedings of the Geological Society (1846).
In 1842 Stanger married Sarah Hursthouse, with whom he had two sons and two daughters. That same year it was foreseen that Natal might soon become a British colony and he applied for a post in the British colonial civil service. He arrived in the Cape Colony around the middle of 1843. In December that year the newly instituted Central Road Board appointed him to survey the road between Cape Town and Grahamstown, recommend and price repairs to the road, and determine the latitudes and longitudes of river crossings and other important points along the way. He does not appear to have practiced medicine in South Africa.
In February 1845 Stanger was appointed surveyor-general of Natal Colony, after the post was turned down by C.D. Bell*. His appointment was the first official professional appointment in the administration of the new colony, indicating that the British government attached much importance to the settlement of land claims. He found existing maps of the territory inaccurate and travelled widely to acquaint himself with all parts of the colony. With a small staff of surveyors he set out to establish the boundaries of the colony and showed that it was substantially larger (by about 30 000 square kilometers) than previously thought, partly because of the unrecorded dog-leg shape of the Drakensberg. He compiled a geographical description of the colony and verified the sources of the Buffalo and Umzimkulu Rivers. Surveys were made of the main roads and of Durban, Pietermaritzburg, Congella and Weenen. His instructions required him to execute rapid and piecemeal cadastral surveys of blocks of farms, as far as possible on the same scale, as well as a long term definitive topographic survey of the whole Natal. The latter survey was to be carried out at a scale of 1:63 360 (one inch to a mile) and would eventually incorporate the regional surveys. Although Stanger recognised the importance of this topographic survey for the future economic development of the colony, little progress was made during his term of office, mainly because of the immense size of the task, financial constraints, and the fact that there was always other more urgent work. In addition to his written report Stanger compiled two maps of Natal. The first, Sketch of Natal shewing its proposed divisions, projected towns, villages, etc, was published in 1848. The second, The district of Natal, was published in London in 1850 at a scale of 1:570 240 (9 miles to the inch). Though the topographic basis of the latter was still oversimplified, it was more accurate than any contemporary map of the territory. It included simplified farm boundaries and the position of crown lands, which made it the first topo-cadastral map of Natal. Stanger readily admitted its shortcomings, which tends to support his professional status as a cartographer.
As surveyor-general he was an ex officio member of both the Executive Council and Legislative Council of Natal and played an important role in drawing up legislation on land matters. During his absence from Natal between March 1851 and April 1853 John Bird was appointed acting surveyor-general. While in England during this period Stanger delivered a paper before the British Association for the Advancement of Science "On certain furrows and smoothings on the surface of granite caused by drift sand, at the Cape of Good Hope". These geological observations were presumably made during his spell in the Cape Colony. At some time he was elected a Fellow of the Royal Geographical Society.
Stanger was interested also in botany and collected plants in all parts of the colony. In 1849 he was vice-president of the Natal Agricultural and Horticultural Society (founded in 1848) and helped to obtain land on the banks of the Umgeni River for the society's botanical garden. In 1850 he was the society's corresponding secretary and from 1853 to the time of his death in March 1854 he was its president. The management committee noted that "[his] scientific acquirements and energy, directed as they were by intelligence, constituted him one of the most valuable members of our community" (Durban and Coast Horticultural Society, 1954). He corresponded with the director of Kew Gardens, Sir William Hooker, and with Dr N.B. Ward, inventor of the Wardian case for transporting plants. When he went to England in 1851 he brought Ward a cycad which was later named Stangeria paradoxa. However, Stanger did not discover it, but received it from W. Gueinzius*, as he explained in a letter to Hooker in 1854. His specimens are preserved at Kew Gardens and in the British Museum (Natural History). The species Amphiora stangeri was named after him by W.H. Harvey*.
Though inclined to be tactless, Stanger was respected by the colonists and was an influential person in the fledgling colony. He had a home in Pietermaritzburg until about 1850, but died in Durban of pneumonia, aged only 42. A street in Durban and the town of Stanger (laid out in 1873) were named after him. His successor as Surveyor-General, Dr P.C. Sutherland*, was appointed only in 1856.