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 16:43:59 +0100Comment by Frederik Ramm on Frederik Ramm's answerhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45872<p>No, 141723578 * 75030130 is 10633538481405140 and not 216753707. Your aspect ratio seems to be about 1.88:1, so you're looking at an area of perhaps 20186 * 10737, assuming the earth is flat.</p>Frederik RammTue, 13 Oct 2015 16:43:59 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45872Comment by amatek on Frederik Ramm's answerhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45871<p>Thanks a lot. Since the image has a resolution of 17408x9216, the area should then be around 141723578m x 75030130m ?</p>amatekTue, 13 Oct 2015 13:49:03 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45871Answer 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/45869Comment by scai on amatek's questionhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45868<p>crosspost: <a href="https://gis.stackexchange.com/questions/166302/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude">https://gis.stackexchange.com/questions/166302/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude</a></p>scaiTue, 13 Oct 2015 12:24:28 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45868Comment by amatek on EdLoach's answerhttps://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45865<p>Thanks for your response. Actually, I downloaded a map enclosed by those coordinates to be used in a large-scale simulation. Since the image is in XxY format (resolution of 17,408 x 9,216 to be precise), I would like to get an approximate value for my simulation area.</p>amatekTue, 13 Oct 2015 11:50:58 +0100https://help.openstreetmap.org/questions/45861/find-the-area-of-a-map-xkm-x-ykm-from-the-left-right-longitude-and-latitude#45865Answer 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