areaint has a singularity?

8 vues (au cours des 30 derniers jours)
Maarten Buijsman
Maarten Buijsman le 18 Juil 2019
Commenté : Marcus Adkins le 1 Avr 2022
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 commentaire
Marcus Adkins
Marcus Adkins le 1 Avr 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.

Connectez-vous pour commenter.

Réponses (1)

Harsha Priya Daggubati
Harsha Priya Daggubati le 12 Août 2019
Hi,
I suspect this discrepancy is due to the dy value you chose.

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by