Unidata/thredds — pull request #45 by kristiansebastian (2014-03-11 11:28:54+00:00)
Title: Fix xml representation to correctly format the dataset offsets

Apply no localization to the java.util.Formatter.format function in the GridDatasetInv class. Same fix applied to the TimeCoord string representation.

This is our problem:

We have a dataset with the offset array set to [-24.0 -21.0 -18.0 .. 66.0 69.0 72.0]. The java.util.Formatter.format function, without the Locale parameter, use the default locale of the Java virtual machine. In our case is es_ES, so the format function format each offset value (double) with comma instance of point. For example, -24.0 => -24,0. The result of the xml representation of the offset array is: "-24,000000,-21,000000,-18,000000, ... ,66,000000,69,000000,72,000000,", giving us the double of offsets.

How we fix it:

We have modified the GridDatasetInv and TimeCoord classes. The format function is called with the Locale parameter set to null (no localization applied). With this fix the xml representation is:
"-24.000000,-21.000000,-18.000000, ... ,66.000000,69.000000,72.000000,".

We think these modifications fix the problem explained in the email with subject "FMRC feature collection problem", that was sent to the Thredds mailing list.