quangis / quangis-workflow

Tools to describe GIS workflows semantically, and to generate them. Includes the core concept transformation algebra (CCT).
GNU General Public License v3.0
1 stars 0 forks source link

Unify ambiguitous concept types (turn `Reg` into alias) #3

Open nsbgn opened 2 years ago

nsbgn commented 2 years ago

Having multiple ways to encode the same concept makes life difficult for tool annotators and may prevent the output of one tool being considered as the input of another, despite being the same thing.

This is a problem in particular for Reg, as mentioned before in https://github.com/quangis/transformation-algebra/issues/87. Reg should probably be dropped as a primary type, and just be an alias for a collection of locations, C(Loc) (which is itself an alias for R(Loc, Unit)).

In today's meeting, it was also noted that a region can sometimes instead be conceptualized as a boolean field. This led to more disagreements between the question parser and the workflow encoding. Therefore, I propose the type alias:

Reg = R(Loc, Unit) & R(Loc, Bool)

This says that a region simultaneously has properties associated with a collection of locations, as well as properties associated with a boolean field. We get Reg < C(Loc) and Reg < R(Loc, Bool).

Then a tool that takes a C(Loc) would also accept a Reg. However, a tool that requires a Reg would not accept a simple C(Loc). I think this is exactly the behaviour that we want: a region is the more abstract concept that can still be interpreted in a more concrete way.

Before we are able to do this, https://github.com/quangis/transformation-algebra/issues/79 needs to be addressed.