Sections
Getting Started
  • Work through the tutorial available on the downloads page.
  • Read and/or subscribe to the support forums.
  • Peruse some images of the software in action.
  • Watch an instructional video 
Enterprise Version
A commercial version of openWind is available for clients who require:
  • Deep Array Wake Models
  • optimization for cost of energy
  • shadow-flicker
  • multi-threaded wind-flow calculation
  • sector management
  • optimization enhancements
  • grid layout tool
  • stream-lined interface
  • authenticated reports
Licensing
Please contact the openWind team regarding:
  • developing products from the openWind codebase
  • partnering with us to develop specialist modules
Document Actions
  • Send this page to somebody
  • Print this page

Musings on Layer Validity and Consistency

Up to Software Developers

Musings on Layer Validity and Consistency

Posted by nick at August 06. 2008

So I've been spending some time thinking about the whole layer validity idea and:


  • whether it should be all about layers affecting their parent layer's validity or
  • whether it should be the validity of the layer itself which then the parent layer can pick up on or
  • whether there should be two different affects - one being how the layer affects the parent and the other being how the layer affects its own validity.

Its not that I don't have things to do with my time. I do, but this is a fundamental question concerning how the whole openwind framework works.

At present a layer is valid at all points (usually limited by its extents) except when it is invalidated by its children.

The question then becomes: how does a layer behave when asked by a parent whether it is valid or not at a given point when that layer has one or more children who are exercising validity constraints upon it?

Now in the case of a Raster Layer, the behaviour is fairly straightforward. The raster returns a value (true or false) depending on the value drawn from its data grid unless declared invalid at this point by one of its children in which case it returns the result of the constraint based on the invalid value (which can be true depending on the constraint and the invalid value).

In the case of a Vector Layer, we currently do not allow them to have their validity affected by child layers so its not an issue.

In the case of an Image Layer, this is undefined behaviour

In the case of a WRG, this behaviour is poorly defined although usually the parent layer will be a Site Layer in which case, the Site Layer effectively becomes invalid due to the WRG not providing a wind resource value

I have looked at layers limiting themselves and it just becomes more complicated without adding any new functionality (you can always duplicate a layer and use it to effectively set its own validity).

If anyone has any thoughts, please feel free to chip in. In the meantime I will probably continue this conversation with myself just so I can read it back and perhaps in future direct questions to this.

Cheers,

Nick

Re: Musings on Layer Validity and Consistency

Posted by Alicia at August 29. 2008

I'm tired, so forgive me if I didn't follow your thoughts well enough.  I like that the children can validate or invalidate the parent.  I'm requesting that you not get rid of that.  It's more apparent, because you can basically see what's happening just by how you've got your work setup.  Plus, I like being able to load .shps for valid areas of wind resource grids.  It's a nice way to mesh more than one WRG and still effectively use the TABs.   Even if you don't have the GIS software, there seems to be enough functionalilty built into OpenWind to be able to create layers (polygons) that would signify invalid areas for the parent. Maybe I don't understand what you mean by validating itself. In what case would you need to have a layer invalidating or validating itself?


Re: Musings on Layer Validity and Consistency

Posted by nick at September 08. 2008

Hi Alicia,


Quote: "In what case would you need to have a layer invalidating or validating itself?"


Yeah you really don't. I just wanted to revisit the whole topic as when I started coding openWind I had several ideas on how the validity thing might work and I wasn't sure that my solution was 100% consistent or the most intuitive as it stood. However, since my ramblings above I have hardened the layer validity definition and am happy with it now. Hopefully, you as a user should not be able to tell any difference but there were a couple of things that one could do that didn't quite make sense so this exercise fixed that.


I'm tempted to remove this thread as I suspect it may only serve to confuse.


Thanks for answering though. Usually when I'm that vague and not making sense, I'm best ignored :)


Nick


Powered by Ploneboard