Greetings Brieuc, Thanks for your feedback. Unfortunately, this part of the netcdf-java code base was written before the conventions were in place, and to change the behavior at this point would require a substantial rewrite (we have checked into it before for the reasons you mention). Cheers, Sean > Hi there, > > My name is Brieuc. I'm working to add support for NetCDF dataset in our > products. > > I am a bit puzzled by some code in > AbstractCoordTransBuilder.getFalseEastingScaleFactor(...): this method > first fetch the unit from the GeoX axis, and if present, return the > scale factor to convert one count of this unit into kilometers, if not > present return 1.0: > > String units = ...; // fetch from grid mapping variable or GeoX axis > > if (units != null) { > try { > SimpleUnit unit = SimpleUnit.factoryWithExceptions(units); > return unit.convertTo(1.0, SimpleUnit.kmUnit); > } catch (Exception e) { > log.error(units + " not convertible to km"); > } > } > return 1.0; > > This make the behaviour of method a little bit unpredictable. I'm not > sure if all supported conventions (COARDS, CF...) require a unit > attribute on GeoX and GeoY axes (or what would be the default unit if > not present) but now we have: > > - unit present -> false easting and false northing converted from > whatever length unit is specified into km > - unit not present -> false easting and false northing unit is unknow > > Wouldn't it be more consistent if we assume metre as default and convert > to metre (instead of km) if unit if present. Hence we could safely > assume that ProjectoinImpl "false_easting" and "false_northing" > parameter would be expressed in metre. > > Thanks for your feedback. > > Regards > > Brieuc DESOUTTER > Senior Software Engineer > Luciad NV > > Ticket Details =================== Ticket ID: CSV-442004 Department: Support netCDF Java Priority: High Status: Open
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.