Ticket #3 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Filling optional default values issue with GIS GRASS integration

Reported by: soeren Owned by:
Priority: major Milestone:
Component: zoo-kernel Version: 1.0
Keywords: optional values Cc: soeren


By default the zoo kernel fills all optional literal data inputs with default values. Thats fine in case default literal values are provided.

But here is the issue: optional literal data inputs are also attached in case no default values are available.

This results in something like "distance=NULL", which will in case of gis grass modules, abort the processing with an error.

There may be two solutions:

  1. The zoo kernel do not fill optional literal inputs when no default values are supported
  2. The zoo kernel uses the language specific way (None in case of Python) to specify missing default literal input values and the GIS GRASS integration framework will take care of parameter with attached NULL/None values

Both solutions are ok in case of literal data for me. The second one has the advantage, that the input map structure are fully available with literal data for service modules. So no new memory must be allocated/modified in case the developer decides to modify literal data in the input map.

Optional complex data inputs should IMHO not be filled. GIS GRASS has many modules with optional complex data inputs.

Change History

Changed 12 years ago by djay

  • status changed from new to closed
  • resolution set to fixed

Since Revision #63, the ZOO-Kernel does not fill the default value map of the inputs maps in the following case: it is not provided in the request DataInputs and there is no default value set in the zcfg file for this input.

Nevertheless, it still provides other format informations, which means for intance for LitteralData dataType information and potential UOM. This way, from any programming language you are able to test if the value was provided (or default valued) or not. For instance from Python using "value" in inputs["grass_band_number"] you can check if the value was provided in the request or not.

I think this is similar to what you propose as solution 2. Indeed, even if it does not provide specific programming language null value in inputs the value is well not defined in any programming languages.

For ComplexData? it would work the same.

For outputs maps, the NULL value is still set in maps.

Please, feel free to reopen this ticket if anything goes wrong with default value setting.

Note: See TracTickets for help on using tickets.


Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png