Skip to content

coveragecalculator: Optimize File IO for coverage reports. #27

@ryanketzner

Description

@ryanketzner

The current process in the coveragecalculator class for writing coverage reports is inefficient.

            # compute coverage
            points = cov_checker.CheckPointCoverage() # list of indices of the GPs accessed shall be returned
            if len(points)>0: #If no ground-points are accessed at this time, skip writing the row altogether.
                for pnt in points:
                    coords = self.grid.get_lat_lon_from_index(pnt)
                    access_writer.writerow([time_index, pnt, coords.latitude, coords.longitude])

For every individual point accessed, the coordinates are requested one at a time. This requires a lot of python function calls and back and forth between python and C++. It would be better to request them all at once using something along the lines of self.grid.get_lats_lons_from_indices(pnts).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions