"Ved", "nær", and "nær ved"
The following is a reply of mine to a question in a sentence discussion. If something is unclear, please don't hesitate to ask about in the comments, and I will clarify the post.
I think comparing nær ved to near by makes it easiest to understand what is going on here: They can be used separately or together, and the meaning hardly changes or depends on the context.
Nær can be an adjective or a preposition. By itself it means near, which has the same dual function. The comparative of the adjective is nærmere (nearer) and nærmest (nearest).
Ved is a preposition just like by (although there is also an adjective and a noun spelled the same, forget that for now). Apparently the original meaning of ved is in front of, opposite of, or against in the sense of physical placement.
So, we have two words that mean almost the same here. My opinion would be that ved is closer than nær, but that might just come from my personal usage. Put together, nær must be in its adverbial form, modifying ved. One could argue that like near+by->nearby it makes it a bit further away than any of the two, but I would say it's not as strictly defined in Danish as it is in English.
Note: This post was written based on my personal knowledge and some quick research. If you're feeling smarter than I am at the time of this writing, please correct or add more details and I will update the post.