OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Add data unit file #290

Closed smalers closed 3 years ago

smalers commented 3 years ago

There are cases, such as time series table, where data units need to be used to determine output precision. In TSTool, there is a DATAUNIT file that is read in when the application starts. This should be implemented in InfoMapper to provide similar functionality. It is much better to do this than to hard code precision or use a global default of 2 or 4 as a catch-all.

See the Java DataUnits class.

This is an application configuration file and units could vary based on the time series and other data used in the application so maybe it should be defined in the main properties in the app-config.json, with a default version? A property dataUnitsPath could be used, where Path has been used in other property names. Use the same file as TSTool so it can be copied into an InfoMapper application.

Nightsphere commented 3 years ago

The dataUnitsPath property has been added as an option to the app-config.json file, and can use the absolute or relative path to the DATAUNIT file. This can be used as it had been with the Java code before. Closing the issue.