A directional spatial relationship to a reference object (e.g., "east of the post office") can be represented by a spatial template. The template partitions the space into regions where the relationship holds (to various extents) and regions where it does not hold. The objects for which the relationship holds can then be located. A template can be easily modeled. Computationally, however, exact calculation of the model in case of 2D raster data is prohibitively expensive, and a tractable approximation algorithm was proposed. Here, we introduce a new concept: the concept of the F-template. It leads to a new approximation algorithm, which is faster, gives better results, and is more flexible.