- Load a csv file through file browser Download Sample File
- Delimiter can be either space or a single comma
- The csv file contains 2D matrix of numbers(with column structure as |x-coord, y-coord, value|)
- Display the content in a text box or table.
- Replace bad zero values by interpolating with spatial neighbours
- Write the result in another text box or table.
- HTML5 File browser with limiting only to single csv file
- Parse csv file to collect metrics(file size, delimiter and header row) and records
- Javascript to render table
- Javascript business logic to replace the zero values by spatial interpolation technique called Inverse Distance Weighting(IDW) method from https://gisgeography.com/inverse-distance-weighting-idw-interpolation/
- Parse the csv data
- Print delimiter
- Print has header row
- Print file size
- Print total number of records count
- Print input records table
- Filter the bad records when the value field is zero
- Print number of bad recods count
- Print bad recods table
- Filter valid records by removing bad records
- Find the two closest valid points to the bad records
- Calculate the interpolated values using IDW math for bad records based on the two closest points
- Update the interpolated values into the original records
- Print the final interpolated recods
- Single formatted error message will be displayed when a file is uploaded with any of the following - duplicate data set; missing coordinates; invalid data such as alphabets and special characters
- File holding records inclusive of empty lines will still be processed as the code will automatically ignore the empty lines and process rest of the dataset
- While uploading the same file subsequently, please press the reset button and then upload the file
- File containing records with both Space and Comma as delimiters cannot be uploaded