Extraction close to Earth/space interface
#1
We identified a bug related to SEAScope extraction method that might prevent users from exploiting extracted data in Python scripts.

Python scripts that call the SEAScope.lib.utils.get_lonlat method may return an error similar to:

ValueError: cannot reshape array of size 14 into shape (4,4)

This error happens in some cases wherein the extraction area is very wide and its vertices are close to the limit between the globe and space in the SEAScope viewer.
The viewer actually extracts over a 2D rectangular area that encompasses the user polygon and computes 16 regularly-spaced control points (a 4x4 grid) to geolocate this rectangle. When the polygon is too close to the "edge" of the globe, it is possible that one or several corners of the rectangle are not on the globe and it is therefore impossible to compute their geographical location.

In this case, when running SEAScope in debug mode (with the --debug option) you will see error messages in the terminal:

[Extractor] Error no longitude/latitude found for this gcp

Here is an example to illustrate the problem:

   

The extraction polygon is in orange, its bounding box (2D rectangle) is drawn in green, the control points are in blue if placed on the globe and in red if their location cannot be computed.

Unfortunately we cannot fix or foolproof this mechanism: making sure that the polygon is centered on the screen to keep its vertices as far as possible from the "edge" of the globe is the only way to avoid the issue.

We will make sure to improve the extraction process in the next version od SEAScope.
Reply


Forum Jump: