-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coordinates doesn't match between metadata and plot #87
Comments
Hey! I'm glad you want to use EOReader 😄 You maybe don't know, but EOReader is always working with projected (UTM) CRS, to allow computing areas easily. This is a known limitation, and an issue has been adressed here. Moreover, if you are not aware, you cannot use only A good way to do this is to use And don't forget to import this: import hvplot.pandas
import hvplot.xarray If you just want to have two plots, just add : from matplotlib import pyplot as plt
# ... your code before the first plot
plt.show()
# ... your code before the second plot
plt.show() |
Thanks for the fast reply! I'm just kind of confused because the tile I want to process is on the 30T tile UTM, which lat/lon coordinates match my polygon, but I don't understand what is the range of values of the plot that I attached to the issue. How do I go around to get the coordinates in UTM once I load my plot? Or maybe what I should do is transform my polygon to the coordinates of my plot, is that something that I should do with EOReader or geopandas should be the way to go? I assume I'm dropping really simple questions to you but I'm starting in the world of satellite imaging and I'm trying to understand where does my problem come from! |
No problem for your questions! If you really want to have lat/lon coordinates in your plot, you should reproject your raster to |
I understand that reproject will actually wrap the whole image so this is not super efficient and I'm better of converting the polygon to UTM, am I right? Nevertheless, thanks for your help! |
You are already doing it here 😉 : polygon = polygon.to_crs(prod.crs()) |
Well this is part of my confusion. As I understood, this should have work to conver py polygon to the same crs of the image but it keeps it more or less at the same. I will play with it a bit later. Thanks for your help! |
I just started using EOReader.
I'm following this link: https://eoreader.readthedocs.io/en/v0.19.4/notebooks/windowed_reading.html
As I want to visualize a POLYGON over an image of sentinel-2.
The polygon I want to plot is something like this:
"POLYGON ((-7.5262454743456715 39.66672692059894, -7.5238403916980525 39.66669637036892, -7.523853372713001 39.666086466637324, -7.52625843422954 39.666117016209796, -7.5262454743456715 39.66672692059894))"
The image I want plot with it has a metadata where the footprint is something like this:
As you can see my polygon should be contained on the image.
The problem I'm finding is that once I load the image following the code and I plot just the image I get the next coordinates.

As you can see in the previous image the range of x and y coordinates is aroung 1e5-1e6.
My code looks like this:
I'm assuming I'm missing some transformation somewhere as this data is just a .safe downloaded from SNAP.
The text was updated successfully, but these errors were encountered: