<div dir="ltr">Dear all,<br><br>I want to display the area of a polygon, for example :<br>POLYGON((45.179 1.94,45.179 1.95,45.182 1.95,45.182 1.94,45.179 1.94))<br><br>I cannot get the area either in m^2  or deg^2.<br>Am I missing something ?<br>Below are some tests I went through.<br><br>1) Area measured with QGIS :<br>Ellispsoïdal <br>square degrees : 0.00003 deg²<br>square meters : 369063.9 m²<br><br>Cartesian<br>square degrees : 0.00003 deg²<br>square meters : 371759.7 m²<br><br>2) Area displayed with mapserver<br>2.1) based on attribute [shape]<br>LABEL<br>   TEXT (" surf=" + tostring(area([shape]), "%.1f")  )<br>   ...<br>END<br><br>The area value depends on zoom level : the more I zoom in, the higher the area value.<br>It turns out that the area is expressed in pixel^2 <br><br>2.2) based on hard coded polygon<br>LABEL<br>   TEXT ("surf=" + tostring(area(fromText('POLYGON ((45.179 1.94,45.179 1.95,45.182 1.95,45.182 1.94,45.179 1.94))')), "%.10f")  )<br>...<br>END<br>The area value is exactly what I would expect (deg^2) : 0.00003<br><br>3) Conversion from deg^2 to m^2<br>The relationship is :<br>* Surf_m ~ Surf_deg * (R * pi/180)^2<br>* R ~ 6378137 (the earth radius in meters)<br><br>which yields to :<br>Surf_m ~ 371760.8 m^2</div>
<font style="font-size: 9px;">The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.<br>If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.<br>Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.<br>All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.</font>