panel_segmentation.panel_detection.PanelDetection.runSiteAnalysisPipeline

PanelDetection.runSiteAnalysisPipeline(file_name_save_img, latitude=None, longitude=None, google_maps_api_key=None, file_name_save_mount=None, file_path_save_azimuth=None, generate_image=False)[source]

This function runs a site analysis on a site, when latitude and longitude coordinates are given. It includes the following steps:

  1. If generate_image = True, taking a satellite image in

    Google Maps of site location, based on its latitude-longitude coordinates. The satellite image is then saved under ‘file_name_save_img’ path.

  2. Running the satellite image through the mounting

    configuration/type pipeline. The associated mount predictions are returned, and the most frequently occurring mounting configuration of the predictions is selected. The associated labeled image is stored under the ‘file_name_save_mount’ path.

  3. Running the satellite image through the azimuth estimation

    algorithm. A default single azimuth is calculated in this pipeline for simplicity. The detected azimuth image is saved via the file_path_save_azimuth path.

  4. If a mounting configuration is detected as a single-axis

    tracker, an azimuth correction of 90 degrees is applied, as azimuth runs parallel to the installation, as opposed to perpendicular.

  5. A final dictionary of analysed site metadata is returned,

    including latitude, longitude, detected azimuth, and mounting configuration.

Parameters
  • file_name_save_img (string) – File path that we want to save the raw satellite image to. PNG file.

  • latitude (float) – Default None. Latitude coordinate of the site. Not required if we’re using a pre-generated satellite image.

  • longitude (float) – Default None. Longitude coordinate of the site. Not required if we’re using a pre-generated satellite image.

  • google_maps_api_key (string) – Default None. Google Maps API Key for automatically pulling satellite images. Not required if we’re using a pre-generated satellite image.

  • file_name_save_mount (string) – File path that we want to save the labeled mounting configuration image to. PNG file.

  • file_name_save_azimuth (string) – File path that we want to save the predicted azimuth image to. PNG file.

  • generate_image (bool) – Whether or not we should generate the image via the Google Maps API. If set to True, satellite image is generated and saved. Otherwise, no image is generated and the image saved under the file_name_save_img path is used.

Returns

Dictionary containing the latitude, longitude, classified mounting configuration, and the estimated azimuth of a site.

Return type

Python dictionary