Any foreign or domestic corporation organized or chartered for the purpose, among other things, of conducting or maintaining a pipeline for the transmission of power, water, air, or gas for hire to any mine or mining claim or for any manufacturing, milling, mining, or public purpose shall have the right-of-way for the construction, operation, and maintenance of such pipeline for such purpose through any lands without the consent of the owner thereof, if such right-of-way is necessary for the purpose for which said pipeline is used.