<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_elevation(self, latitude, longitude, approximate=None):
 """ If approximate is True then only the points from SRTM grid will be used, otherwise a basic aproximation of nearby points will be calculated. """

        if not (self.latitude - self.resolution <= latitude < self.latitude + 1):
            raise Exception('Invalid latitude %s for file %s' % (latitude, self.file_name))
        if not (self.longitude <= longitude < self.longitude + 1 + self.resolution):
            raise Exception('Invalid longitude %s for file %s' % (longitude, self.file_name))

        row, column = self.get_row_and_column(latitude, longitude)

        if approximate:
            return self.approximation(latitude, longitude)
        else:
            return self.get_elevation_from_row_and_column(int(row), int(column))