Documentation ¶
Index ¶
- type Catalog
- func (c *Catalog) AddHandler(r *mux.Router)
- func (c *Catalog) BurstsInventory(ctx context.Context, area entities.AreaToIngest, aoi geos.Geometry, ...) ([]*entities.Scene, int, error)
- func (c *Catalog) BurstsSort(ctx context.Context, scenes []*entities.Scene) int
- func (c *Catalog) DeletePendingRecords(ctx context.Context, scenes entities.Scenes, scenesID map[string]int)
- func (c *Catalog) DoScenesInventory(ctx context.Context, area entities.AreaToIngest) (entities.Scenes, error)
- func (c *Catalog) DoTilesInventory(ctx context.Context, area entities.AreaToIngest, scenes entities.Scenes, ...) (int, error)
- func (c *Catalog) FindTiles(ctx context.Context, area catalog.AreaToIngest, scenes catalog.Scenes) (int, error)
- func (c *Catalog) IngestArea(ctx context.Context, area entities.AreaToIngest, ...) (IngestAreaResult, error)
- func (c *Catalog) IngestedScenesInventoryFromTiles(ctx context.Context, tiles []common.Tile) ([]*entities.Scene, error)
- func (c Catalog) PostAOIHandler(w http.ResponseWriter, req *http.Request)
- func (c Catalog) PostScenes(ctx context.Context, area catalog.AreaToIngest, ...) (map[string]int, error)
- func (c Catalog) ScenesHandler(w http.ResponseWriter, req *http.Request)
- func (c *Catalog) ScenesInventory(ctx context.Context, area *entities.AreaToIngest, aoi geos.Geometry) (entities.Scenes, error)
- func (c *Catalog) ScenesToIngest(ctx context.Context, area entities.AreaToIngest, scenes entities.Scenes) ([]common.SceneToIngest, error)
- func (c Catalog) TilesHandler(w http.ResponseWriter, req *http.Request)
- func (c *Catalog) ValidateArea(area *entities.AreaToIngest) error
- type IngestAreaResult
- type RemoteWorkflowManager
- func (rwm RemoteWorkflowManager) CreateAOI(ctx context.Context, aoi string) error
- func (rwm RemoteWorkflowManager) IngestScene(ctx context.Context, aoi string, scene common.SceneToIngest) (int, error)
- func (rwm RemoteWorkflowManager) LeafTiles(ctx context.Context, aoiID string) ([]common.Tile, error)
- func (rwm RemoteWorkflowManager) RootTiles(ctx context.Context, aoiID string) ([]common.Tile, error)
- type WorkflowManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct { GeocubeClient *geocube.Client Workflow WorkflowManager ScihubUser string ScihubPword string OneAtlasCatalogUser string OneAtlasApikey string OneAtlasCatalogEndpoint string OneAtlasOrderEndpoint string OneAtlasAuthenticationEndpoint string GCSAnnotationsBucket string WorkingDir string }
Catalog is the main class of this package
func (*Catalog) AddHandler ¶ added in v1.0.0
func (*Catalog) BurstsInventory ¶
func (c *Catalog) BurstsInventory(ctx context.Context, area entities.AreaToIngest, aoi geos.Geometry, scenes []*entities.Scene) ([]*entities.Scene, int, error)
BurstsInventory creates an inventory of all the bursts of the given scenes Returns the number of bursts
func (*Catalog) BurstsSort ¶
BurstsSort defines for each burst the previous and reference bursts Returns the number of tracks and swaths
func (*Catalog) DeletePendingRecords ¶
func (c *Catalog) DeletePendingRecords(ctx context.Context, scenes entities.Scenes, scenesID map[string]int)
DeletePendingRecords deletes records of scenes that have not been successfully posted to the workflow server
func (*Catalog) DoScenesInventory ¶
func (c *Catalog) DoScenesInventory(ctx context.Context, area entities.AreaToIngest) (entities.Scenes, error)
DoScenesInventory lists scenes for a given AOI, satellites and interval of time
func (*Catalog) DoTilesInventory ¶
func (c *Catalog) DoTilesInventory(ctx context.Context, area entities.AreaToIngest, scenes entities.Scenes, rootLeaf []common.Tile) (int, error)
DoTilesInventory creates an inventory of all the tiles of the given scenes
func (*Catalog) IngestArea ¶ added in v1.0.0
func (c *Catalog) IngestArea(ctx context.Context, area entities.AreaToIngest, scenes, scenesWithTiles entities.Scenes, outputDir string) (IngestAreaResult, error)
func (*Catalog) IngestedScenesInventoryFromTiles ¶ added in v1.0.0
func (c *Catalog) IngestedScenesInventoryFromTiles(ctx context.Context, tiles []common.Tile) ([]*entities.Scene, error)
IngestedScenesInventoryFromTiles retrieves the ingested scenes from a list of tiles
func (Catalog) PostAOIHandler ¶ added in v1.0.0
func (c Catalog) PostAOIHandler(w http.ResponseWriter, req *http.Request)
PostAOIHandler posts a request to ingest scenes
func (Catalog) PostScenes ¶ added in v1.0.0
func (c Catalog) PostScenes(ctx context.Context, area catalog.AreaToIngest, scenesToIngest []common.SceneToIngest) (map[string]int, error)
PostScenes sends the scenes to the workflow server Returns the id of the posted scenes (even if PostScenesToIngest returns an error)
func (Catalog) ScenesHandler ¶ added in v1.0.0
func (c Catalog) ScenesHandler(w http.ResponseWriter, req *http.Request)
ScenesHandler lists scenes for a given AOI, satellites and interval of time and returns a json
func (*Catalog) ScenesInventory ¶
func (c *Catalog) ScenesInventory(ctx context.Context, area *entities.AreaToIngest, aoi geos.Geometry) (entities.Scenes, error)
ScenesInventory makes an inventory of all the scenes covering the area between startDate and endDate The scenes are retrieved from scihub
func (*Catalog) ScenesToIngest ¶
func (c *Catalog) ScenesToIngest(ctx context.Context, area entities.AreaToIngest, scenes entities.Scenes) ([]common.SceneToIngest, error)
ScenesToIngest creates the payload for each scene
func (Catalog) TilesHandler ¶ added in v1.0.0
func (c Catalog) TilesHandler(w http.ResponseWriter, req *http.Request)
TilesHandler lists tiles for a given list of scenes (previous call of ScenesHandler)
func (*Catalog) ValidateArea ¶
func (c *Catalog) ValidateArea(area *entities.AreaToIngest) error
type IngestAreaResult ¶ added in v1.0.0
type IngestAreaResult struct { ScenesID map[string]int `json:"scenes_id"` TilesNb int `json:"tiles_nb"` }
IngestAreaResult is the output of the catalog
type RemoteWorkflowManager ¶ added in v1.0.0
type RemoteWorkflowManager struct {
Server, Token string
}
func (RemoteWorkflowManager) CreateAOI ¶ added in v1.0.0
func (rwm RemoteWorkflowManager) CreateAOI(ctx context.Context, aoi string) error
CreateAOI implements WorkflowManager
func (RemoteWorkflowManager) IngestScene ¶ added in v1.0.0
func (rwm RemoteWorkflowManager) IngestScene(ctx context.Context, aoi string, scene common.SceneToIngest) (int, error)
IngestScene implements WorkflowManager
type WorkflowManager ¶ added in v1.0.0
type WorkflowManager interface { // RootTiles from the workflow server (tiles that have no previous tile) RootTiles(ctx context.Context, aoi string) ([]common.Tile, error) // LeafTiles from the workflow server (tiles that is not the previous of any tiles) LeafTiles(ctx context.Context, aoi string) ([]common.Tile, error) // Create an AOI in the workflow server CreateAOI(ctx context.Context, aoi string) error // IngestScene adds a new scene to the workflow and starts the processing // returns id of the scene, db.ErrAlreadyExists IngestScene(ctx context.Context, aoi string, scene common.SceneToIngest) (int, error) }
WorkflowManager is an interface to some functions of the Workflow component