Page 1 of 1

Processing data for particular lat long

Posted: Fri Sep 06, 2019 11:43 am
by karthickmurugan
Hi,

I wanted to process the satellite data for particular Lat Long instead of entire image. Is there any particular comment like sline,eline,spixl and epixl option.

or anyother provision Polymer giving?

Re: Processing data for particular lat long

Posted: Mon Sep 09, 2019 9:24 am
by fsteinmetz
Dear Karthick,

Indeed, all Level1 readers support the following keywords: sline, eline, scol and ecol.

Example:

Code: Select all

run_atm_corr(
    Level1_OLCI(product_name, sline=1000, eline=1100, scol=300, ecol=400),
    Level2_NETCDF()
)
Cheers,
François

Re: Processing data for particular lat long

Posted: Mon May 25, 2020 5:14 pm
by jcardoso
Dear François,

Is no other way to add the lat/lon coordinates instead row/column numbers?

It's more curiosity than necessity.
Thank you for the very nice software,
Joao.

Re: Processing data for particular lat long

Posted: Mon May 25, 2020 7:11 pm
by fsteinmetz
Hi Joao,
And thanks !!
It's not possible out of the box, but what you can try as a workaround :

Code: Select all

    l1 = Level1_OLCI(dirname)
    
    lat = l1.read_band('latitude', (l1.totalheight, l1.totalwidth), (0, 0))
    lon = l1.read_band('longitude', (l1.totalheight, l1.totalwidth), (0, 0))

    d = (lat - lat0)**2 + (lon - lon0)**2
    dmin = np.amin(d)

    if np.sqrt(dmin) < dmin0:
        coords = np.where(d == dmin)
        ix = coords[0][0]
        iy = coords[1][0]
        l1sub = Level1_OLCI(dirname,
            sline=ix-delta,
            eline=ix+delta+1,
            scol=iy-delta,
            ecol=iy+delta+1,
            )
I hope that helps.
Cheers,
François