Skip to main content

Hello everybody !


I’m new in eolearn . I executed the full example of slovinia .

In order to adapt the code to my study area I need to have the latitude and longitude of each point of an epoatch.

How could I do that please!

Hi Sophie,


You will find some useful elements in this post. Maybe @Maryem has made some progress and can give some tips?


Hi @maxim.lamare @duboissophie


I would like to help. But , I am still seeking the solution. There is no much documentation. I am trying to find something.

If there is any improvement it be shared.


Take a look at this stack overflow post, it should help you. You have the corner coordinates and pixel size from your eopatch, and I’m thinking you can assume zero rotation and thus use the simplified calculation.


Otherwise, I found some inbuilt eolearn functions that can help: eopatch_to_dataset & new_coordinates, but you would need to experiment with them (they are seldom used):


from eolearn.visualization.xarray_utils import eopatch_to_dataset, new_coordinates

# Convert patch to xarray
ptch = eopatch_to_dataset(eopatch)

# Get coordinates in lat lon (check the input and output CRS
# they may be different for you)
latlon = new_coordinates(ptch, CRS('32633'), CRS('4326'))

Reply