MATLAB: Creating map projection structure to get latitude and longitude from geotiff

defaultmgeotifflatitudelongitudemap projection structuremappingMapping ToolboxMATLABminvtranmstruct

Hello,
I am currently trying to map Corine Land Cover data (Link) to Lat Lon coordinates. The coordinate system is ETRS89 / ETRS-LAEA (Link), so an equal area projection ('eqaazim'). My problem is now that the coordinates are given in meters from the upper left corner of the image. I naively assumed that I could simply use inverse projection with the info structure I returned from
I = geotiffinfo(mymap);
However, this does not work, I get the error message "Error using proj2gtif (line 17): The GeoTIFF structure PROJ cannot be used with functions PROJFWD or PROJINV." I tried to follow the reverse approach shown here (Link) to get further (R is of map.rasterref.MapCellsReference class) but apparently have insufficient information.
Checking the info structure manually (see attachment), I do not see any LatLon reference (e.g., in I.CornerCoords).
Currently, my plan is to create a map projection structure (see attachment) and then use
[lat,lon] = minvtran(mstruct,x,y)
to get the coordinates. I started to create a default stucture using
mstruct = defaultm('eqaazim')
and will now have to populate missing values. Using only false northings and easting returns an error because of complex values:
Error using atan2
Inputs must be real.
Error in eqaazim>eqaazimInv (line 198)
lon(indx) = atan2(x(indx).*sin(ce), D*rho(indx).*cos(ce));
Error in eqaazim>applyInverse (line 131)
[lat, lon] = mproj.inverse(mstruct, x, y);
Error in doApplyProj (line 51)
[lat, lon] = mproj.applyInverse( ...
Error in eqaazim>applyAzimuthalProjection (line 34)
outputs = doApplyProj(mproj, varargin{:});
Error in eqaazim (line 22)
varargout = applyAzimuthalProjection(mproj, varargin{:});
Error in minvtran (line 36)
[lat, lon, alt] = feval(mstruct.mapprojection, ...
Maybe I need to define more values?
Thanks in advance,
Max

Best Answer

I did not supply the correct geoid, which needs the following structure:
mstruct.geoid = [SemiMajor, Ecc];