geosolutions-it / evo-odas

Code Repository for the EVO-ODAS
https://waffle.io/geosolutions-it/evo-odas
MIT License
31 stars 15 forks source link

S1 footprint coordinates are swapped #192

Closed torse closed 7 years ago

torse commented 7 years ago

It seems that the s1reader is swapping the footprint coordinates. Instead of x,y it produces y,x coordinates. The WMS is actually right (top left) but the OS is wrong: selection_465 Checking the product.zip, I found that indeed the granules (processed with gdal) are correct, while the product.json (uses s1reader) are wrong.

$ more granules.json
{
    "type": "FeatureCollection",
    "features": [
        {
            "geometry": {
                "type": "Polygon",
                "coordinates": [
                    [
                        [
                            -73.1724346686319,
                            13.218151264186833
                        ],
                        [
                            -73.1724346686319,
                            11.321108894053172
                        ],
                        [
                            -70.59473353269375,
                            11.321108894053172
                        ],
                        [
                            -70.59473353269375,
                            13.218151264186833
                        ],
                        [
                            -73.1724346686319,
                            13.218151264186833
                        ]
                    ]
                ]
            },
            "type": "Feature",
            "properties": {
                "location": "/oda/repository/SENTINEL/S1/S1_GRD_1SDV/v0/s1b-iw-grd-vv-20170901t225844-20170901t225908-007205-00cb3c-001.tiff"
            }
        }
    ]
}
$ more product.json
{
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    12.774841,
                    -73.172493
                ],
                [
                    13.217943,
                    -70.881294
                ],
                [
                    11.767998,
                    -70.594658
                ],
                [
                    11.321244,
                    -72.872597
                ],
                [
                    12.774841,
                    -73.172493
                ]
            ]
        ]
    },
randomorder commented 7 years ago

PR merged. Testing is needed to make sure issue is fixed

torse commented 7 years ago

Works for us. New data is published correctly: selection_466

However, I just noticed now, that the quicklook is upside down, but that probably unrelated.