Unable to change decimal separator

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to change decimal separator

spezzi
Hi all, I would like to use "comma" as the decimal separator for the numerical observation in my SOS server. I changed the original setting with the admin's functionalities, but it seems that it doesn't work. I still have "dot" in the values in the result tag of the GetObservation. And I receive an error when trying to InsertObservation with a value with comma separated decimal.
I assumed that I must do nothing on the database that has already ingested observations with the "dot" configuration, since PostgreSQL should use an internal representation of decimal number not depending by the locale and the other numeric convention.
I'm using the last version of the SOS server.
Thank you,
Stefano

Reply | Threaded
Open this post in threaded view
|

Re: Unable to change decimal separator

Christian Autermann-2
Am 14.10.2016 16:03 schrieb "spezzi" <[hidden email]>:

>
> Hi all, I would like to use "comma" as the decimal separator for the
> numerical observation in my SOS server. I changed the original setting with
> the admin's functionalities, but it seems that it doesn't work. I still have
> "dot" in the values in the result tag of the GetObservation. And I receive
> an error when trying to InsertObservation with a value with comma separated
> decimal.
> I assumed that I must do nothing on the database that has already ingested
> observations with the "dot" configuration, since PostgreSQL should use an
> internal representation of decimal number not depending by the locale and
> the other numeric convention.
> I'm using the last version of the SOS server.
> Thank you,
> Stefano

Hi Stafano,

this will be really hard to achieve (and is not supported by the SOS),
as the XML [1] as well as the  JSON specification [2] clearly define a
decimal number as dot and not comma separated. Without an output
encoding supporting comma separated numbers, there is not much we can
do about this.

The setting you mention is probably for the default text encoding of
SWE data arrays.

[1] https://www.w3.org/TR/xmlschema-2/#decimal-lexical-representation
[2] https://tools.ietf.org/html/rfc7159#section-6
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Unable to change decimal separator

spezzi
Thank you Christian,
very naive from me, but when I found the decimal separator parameter in the miscellanuous admin page I thought it would have been possible!
Thank you again,
Stefano