Skip to content
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

PRISMA L2D loading: incorrect geocoding of panchromatic and hyperspectral band #1072

Open
antoine-lavrard opened this issue Jan 21, 2025 · 2 comments

Comments

@antoine-lavrard
Copy link

antoine-lavrard commented Jan 21, 2025

I believe there is an issue with the geocoding of the panchromatic/ hyperspectral data, causing a shift of 15m for hyperspectral data and 2.5m for panchromatic data. Due to this incorecct geocoding, hyperspectral and panchromatic raster do not have the same extent.

I think the origin of the problem are here. Indeed, according to this link, pixel coordinate in a raster correspond to the upper left coordinate when using gdal.

deleting the offset in the code should fix the issue (see below)
`

def spatialInfo(self, metadata, res):
extent = QgsRectangle(
float(metadata['Product_ULcorner_easting']),
float(metadata['Product_LRcorner_northing']) -res,
float(metadata['Product_LRcorner_easting']) +res,
float(metadata['Product_ULcorner_northing']),
)
crs = QgsCoordinateReferenceSystem.fromEpsgId(int(metadata['Epsg_Code']))
geoTransform = (extent.xMinimum(), res, -0., extent.yMaximum(), -0., -res)
return crs, extent, geoTransform

`

@janzandr
Copy link
Contributor

Thanks for pointing that out. I can confirm that the SPECTRAL and the PAN products don't match up.
Currently, I'm not fully convinced, that the proposed fix is correct. I will talk to the PRISMA team at ASI for clarification.

@antoine-lavrard
Copy link
Author

You're welcome! Is it possible to keep me informed when you will have thoses clarrification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants