In this quote, Whitman reflects Romantic thinking as he talks about the nature that surrounds him. Like most Romantic thinkers, Whitman finds a chance to reflect when surrounded by nature. Moreover, he finds a type of wisdom and inspiration in natural settings, and sees them as intrinsically connected to him.
In these lines, Whitman refers to the "good of the earth and sun," to "the eyes of the dead," and "the spectres in books." All of these statements refers to cultural and traditional sources of inspiration and knowledge. A common trait among the Romantics was an interest in rediscovering such sources of knowledge.
A characteristic of Romantic literature is a focus on the author's inner world, inner feelings and personal experiences. In this poem, we see that Whitman mostly focuses on the feelings that exist within himself, and that make him reflect on his place in the world.