thanks Vaclav, i'm glad it worked as intended.
there two major methods:
the simple one fist a gradiant map as a mask for a gaussian-blured layer. At the area where the mask is white the resulting image will be fully blured, where it is dark the non blured image shows through.
a more refined one uses an actuall depth map, where the gray scale defines the distance to the lens. you can get it automatically when using a stereo camera. but you can make a simple one easily in photoshop/gimp
here's mine for the train station:
toyueno_depthmap by
knehcsgat first you define one plane where your gradient progresses, that is in my case the railway ballast. i put a basic layer of a gradient going from white at the bottom to black at the top.
if i now want to put in a vertical object, i go to the spot where it intersects my plane. in the example of the catenary-bridge it is where it stands on the railway ballast. I go to that spot and take with the pipette tool the colour of the gray-gradient and paint the object in my layer. this can be repeated for all relevant objects.
Next step is the focus blur plugin (standard included in new gimp, for older you can download it) it applies a blur effect on a image layer based on the grayscale of a depth-map layer (the one i described howto do). You pick the grayscale where it is in focus (in my example around 60) and let it render. It can create a more realistic bokeh, by let you choose different patterns for the out of focus discs. (You can see that strongly in the foreground of my image, lines became double not just soft, very typical for many lenses with high apertures.)