Processing data for particular lat long

Post Reply
karthickmurugan
Posts: 2
Joined: Mon Jun 24, 2019 11:10 am
company / institution: Indian Institute of Technology
Location: Chennai

Processing data for particular lat long

Post 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?
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Processing data for particular lat long

Post 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
jcardoso
Posts: 12
Joined: Fri Feb 08, 2019 10:17 am
company / institution: Royal Belgian Institute of Natural Sciences
Location: Brussels

Re: Processing data for particular lat long

Post 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.
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Processing data for particular lat long

Post 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
Post Reply