Hi,
in Finland (Finnish Environment Institute) we are building an Open311 api for
collecting citizen observations on environmental issues, ie. water temperature,
algal blooming and ice thickness. We will be using attributes of datatype
number for getting numeral values (like water temperature).
So, the question is: is there an established way of handling units? It would be
convinient, if the end-user application could somehow get the required unit
together with the attribute definition. The application could then let the user
input data in his or her preferred unit, and do the necessary transformation
before sending the attribute. If the end-user application uses sliders for
input, it would also need a minimun, maximum and a step value.
We are thinking of using the datatype-description field for delivering these to
the end-user application. Would this be ok? Maybe an escaped json: '{ "unit":
"cm", "minValue": 0, "maxValue": 100, "step": 1 }'. Any thoughts on this?
Best,
Matti Lindholm
in Finland (Finnish Environment Institute) we are building an Open311 api for
collecting citizen observations on environmental issues, ie. water temperature,
algal blooming and ice thickness. We will be using attributes of datatype
number for getting numeral values (like water temperature).
So, the question is: is there an established way of handling units? It would be
convinient, if the end-user application could somehow get the required unit
together with the attribute definition. The application could then let the user
input data in his or her preferred unit, and do the necessary transformation
before sending the attribute. If the end-user application uses sliders for
input, it would also need a minimun, maximum and a step value.
We are thinking of using the datatype-description field for delivering these to
the end-user application. Would this be ok? Maybe an escaped json: '{ "unit":
"cm", "minValue": 0, "maxValue": 100, "step": 1 }'. Any thoughts on this?
Best,
Matti Lindholm