areaint has a singularity?
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
In MATLAB17a I am computing surface integrals for rectangular polygons on a sphere ("earth") using areaint and wgs84Ellipsoid.
I get annomalously large surface areas in meter-squared when my rectangular polygons cover latitude 0 and longitude 0, 180, or 360 degrees. Away from these points the surface area is what you would expect. Is this a singularity (an error), or am I doing something wrong?
% example code
dy = 2.5;
E = wgs84Ellipsoid;
% declare longitudes and latitudes
%lonc = -5:1:5;
lonc = 175:1:185;
latc = -5:1:5;
AA = ones(length(latc),length(lonc)); %declare area
for i=1:length(lonc)
disp(num2str(i))
for j=1:length(latc)
% make rectangular polygons centered on lonc and latc
lonp = [lonc(i)-dy/2 lonc(i)+dy/2 lonc(i)+dy/2 lonc(i)-dy/2 lonc(i)-dy/2];
latp = [latc(j)-dy/2 latc(j)-dy/2 latc(j)+dy/2 latc(j)+dy/2 latc(j)-dy/2];
AA(j,i) = areaint(latp,lonp,E);
end
end
% plot surface area
figure
pcolor(lonc,latc,AA);
colorbar

1 Kommentar
Marcus Adkins
am 1 Apr. 2022
I've been comparing small target sizes against the same targets (+/- 0.02 deg in lat/lon) against area targets created using Satellite Took Kit. The area size agreement is within 5 significant digits until you get within about +/- 1 degree in latitude around the equator - including targets that cross the equator. The areas computed by areaInt can be as much as 50% larger than they should be. While you can use functions like outlinegeoquad to make more interior points which buys back a lot of this - it only applies if your original target edges are parallel to the lat/lon axes. So yes, I would call this a bug.
Antworten (1)
Harsha Priya Daggubati
am 12 Aug. 2019
Hi,
I suspect this discrepancy is due to the dy value you chose.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!