Please enable JavaScript to view this site.

Openwind Online Help

Navigation: Layers

Search Order

Scroll Prev Top Next More

Openwind searches for physically meaningful data in a fixed order. When Layer A sends out a call that it needs terrain elevation data at a point, the first layer that is queried is the first child of LayerA, followed by the first child of the first child of Layer A and so on. When a layer is found that has no children, the second child of its parent is queried. When all the layers below Layer A in the hierarchy have been searched and still no answer is found, the parent of Layer A is queried and then its parent and so on up to the root or workspace node. The search order is much easier to understand in diagram form.

When we look at the properties of a SiteLayer, we see that in the Layer Properties dialog (see Site Layers ) there is the altitude of the base of each turbine. SiteLayers do not contain this information, so for each turbine position the SiteLayer (in this case, Site 1) must generate a call to the Openwind framework requesting terrain elevation data at the point at which the turbine is located.



Figure 29:   Example Layer Hierarchy Showing a SiteLayer and Several Elevation Layers


In figure 29, we see an example Openwind workspace. In this case, the SiteLayer is called Site 1. According to the Openwind search order, when Site 1 makes a call for terrain elevation at point xy, the call first goes to the layer called buildings.shp. The call takes the form of a request for data of a certain type (terrain elevation) at a certain location (point xy). Because buildings.shp is not a terrain elevation layer, it answers “no” to the request and the call passes to the next layer in the search order, which is Site boundary. Site boundary is not an elevation layer and so the search continues until it reaches RSF80_1E_MERGED.WRG, which is a wind resource grid (WRG) layer or WRGLayer. WRGs do contain elevation data and the point xy does lie within its bounding rectangle, so the WRGLayer would normally answer “yes” to the request for terrain elevation data at point xy. However, in this case the area of validity (see Section 8.1) has been constricted to the PolygonLayer called Polygon_0403 which, for the purposes of this example, does not contain the point xy.

The search now moves to the first child of RSF80_1E_MERGED.WRG and then to Polygon_0403 which both answer “no” to the request. If the layer Sample_Mast_0403_80 had child layers, these would have been searched before moving on to Polygon_0403. Having exhausted the child layers of RSF80_1E_MERGED.WRG, the search now continues to the second copy of RSF80_1E_MERGED.WRG, which is valid for the point xy and so returns a value for the terrain elevation at point xy and the search stops there. The remaining elevation layer (elev) is never asked, as the search ends with the first valid answer.

This is the default behavior of Openwind and determines how layers and models find their data. The occasional model can bend these rules, but that is very much the exception rather than the rule and one should generally assume that the first answer is the only answer unless the model description states otherwise.

In the case outlined above, it is a pity that the search stops with the elevation data found in RSF80_1E_MERGED.WRG because the layer named "elev" has much finer resolution and higher quality terrain elevation data. But as the layer hierarchy stands, there is no way for New_Layout to access that superior data.  This parent layer would only be asked if none of the child layers or their children (and so on) were able to give a valid answer. We said at the start of this section that if the child layers and their children (and so on) do not stop the search, the parent layer and its parent (and so on) are asked successively all the way back to the root node (named "workspace").

However, if we were to rearrange the data in figure 29 we might be able to make better use of this layer. Figure 30 shows an improved layer hierarchy in which the high-quality elevation layer is always asked first.



Figure 30:   Showing Rearranged Layer Hierarchy


Another way to think about the search order is that if all the branches of the tree are expanded and the calling layer is currently selected then repeatedly pressing the down cursor will take you through the child layers in the correct search order. Once you have reached the last child layer than the search travels to the parent layer and then to its parent and so on until it reaches the node called “workspace” at which point the search has failed.

Please visit us at Openwind information page