Add topography function generation to Topography class

Also changes topo1writer and topo2writer to use the new class.