In this article, the preliminary routing, sizing, and cost structure of a heat network that supplies energy, in an agrarian district, to greenhouses located around a cogeneration plant in the municipality of El Ejido (Almería) is presented. A genetic algorithm is employed to select a set of points of consumption (plots of land)–which indirectly determine the network routing over the road network–resulting in a project with a better net present value. To obtain the routing, the Steiner tree problem is solved through an approximation that involves several algorithms derived from graph theory and the use of georeferenced information. The design is constrained to ensure technical feasibility, so that the available thermal power from the plant, averaged for hourly periods over a year, is greater than the demand from the greenhouses. The said demand is calculated through an empty-greenhouse climate model, considering temperature setpoints compatible with the most common crops in the region. According to the results, a network of total length equal to 1.3464 km and an average pipe diameter of 0.1532 m would be required to annually supply 8621.4 MWh of heat to 12 points of consumption. The net present value of the project would be 6 417 900 €, considering a 3% discount rate and useful life of 30 years, with an initial investment cost of 1 723 300 € and an annual operation cost of 15 800 €year−1. A sensibility analysis of the variables with greater economic impact is also presented.