Answers to: Find the area of a map (Xkm x Ykm) from the left & right longitude and latitudehttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude<p>How can the area of a map from OpenStreetMap be determined in the form of Xkm x Ykm, given the following information:</p>
<p>Left Longitude = 103.554879
Right Longitude = 103.740497
Top Latitude = 1.585770
Bottom Latitude = 1.490873</p>
<p>Any ideas? Thanks a lot!</p>enTue, 13 Oct 2015 13:11:55 +0100Answer by Frederik Rammhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude/45869<p>This is not an OpenStreetMap specific question and should better have been asked at a general GIS or geography Q&A site. (Edit: I see it was cross posted. Not generally a recommended practice as it wastes helpers' time.)</p>
<p>You can use PostGIS for this. PostgreSQL with the PostGIS extension is a database system but often handy to do quick geometry or geography calculations like this:</p>
<pre><code># select st_area(
st_setsrid(
st_makebox2d(
st_makepoint(103.55487,1.490873),st_makepoint(103.740497, 1.585770)
),
4326)::geography);
st_area
------------------
216753707.811525
(1 row)
</code></pre>
<p>The area is returned in square metres.</p>Frederik RammTue, 13 Oct 2015 13:11:55 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude/45869Answer by EdLoachhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude/45864<p>This isn't a simple question, as the answer won't be a square as the Earth isn't flat, so the bottom edge will be a different length to the top edge. Additionally because of the spherical bulge the surface will be greater than the 'flat' area. I think <a href="http://mathforum.org/library/drmath/view/63767.html">this might answer your question</a> if you're willing to approximate the Earth to a sphere.</p>
<p>Edit: Of course this won't be in the format Xkm x Ykm but give the area in square km, if you specify a value for R, the radius of your spherical Earth, in km, for which 6,371km is an approximation.</p>EdLoachTue, 13 Oct 2015 11:37:42 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude/45864