areaint has a singularity?

8 ビュー (過去 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.

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by