areaint has a singularity?

조회 수: 16 (최근 30일)
Maarten Buijsman
Maarten Buijsman 2019년 7월 18일
댓글: Marcus Adkins 2022년 4월 1일
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
Marcus Adkins
Marcus Adkins 2022년 4월 1일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Harsha Priya Daggubati
Harsha Priya Daggubati 2019년 8월 12일
Hi,
I suspect this discrepancy is due to the dy value you chose.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by