The document describes user defined functions for performing interpolation on environmental sensor data. It discusses several approaches to implementing interpolation functions, including cursor-based, data structure-based, writing to a file, table valued functions, and chunk processing. It also describes how SQL queries containing grid references are transformed by parsing the queries and replacing the grid with a user defined interpolation function call. Performance tests on the different approaches show the file-based and chunk processing methods have the best performance for large datasets.