Thanks Robert,<br><br>I have run a query on spatial_ref_sys to check all projection related to Malaysia and have found quite a few, by trying a few projection listed there I have some result that is more likely to be true:<br>
<br><br>SELECT st_area(transform(the_geom, 3385)) / 10000 as hectares<br><br>FROM mal_state<br><br>WHERE name = 'KELANTAN'<br><br><br>thou i still have no way of verifying them, will try to verify it somehow. thanks again for your fast and helpful response.<br>
<br>i do have another question, sorry if this is a newbie question, why do we need to reproject it again if its in WGS84? i thought of putting all types of free maps into one central database and open it to anyone who want to use them, if this is the case, lets say someone contribute a map of Thailand, how do i perform a spatial query if map in different geographic location has to be manually handled? take for example, if a query involve both map in Thailand and Malaysia, what kind of re-projection should i used? And how come the sample data in PostGIS tutorial do not require a re-projection?<br>
<br>Start reading the PostGIS manual, really appreciate if someone can help answer these questions or point me the right way. Thanks in advance.<br><br>Best regards,<br><br>Stephen<br><br><br><div class="gmail_quote">On Tue, May 6, 2008 at 3:02 AM, Burgholzer,Robert <<a href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Stephen,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">This is a classic, and I think it must be
in some FAQ some where.  The only way I have done it is to re-project
using the transform function to something whose units are in meters, since the
4326 SRID has distance units in meters.  Thus, something like the following:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">SELECT st_area(transform(the_geom, 26918))
/ 10000 as hectares </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">FROM mal_state</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">WHERE name = 'KELANTAN'</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Now, in this example, I have chosen SRID
26918, which off the top of my head is like NAD 1983, UTM Zone 17.  This
is a fairly appropriate projection for my area (eastern US), however, I don't
know enough about projections to say without reservation that you could use any
old projection without concerning yourself with whether or not the projection
you use is valid in the area that you are operating on in DD.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">If anyone else has better, more
comprehensive insight on this, I for one would like to hear about it, </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Robert W. Burgholzer</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Surface Water Modeler</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Office of Water Supply and Planning</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Virginia Department of Environmental
Quality</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="mailto:rwburgholzer@deq.virginia.gov" target="_blank">rwburgholzer@deq.virginia.gov</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">804-698-4405</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Open Source Modeling Tools:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://sourceforge.net/projects/npsource/" target="_blank">http://sourceforge.net/projects/npsource/</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

</div><div><div></div><div class="Wj3C7c">

<p style="margin-left: 0.5in;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">-----Original Message-----<br>
<b><span style="font-weight: bold;">From:</span></b>
<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>
[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Stephen Lee<br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, May 05, 2008 2:27 PM<br>
<b><span style="font-weight: bold;">To:</span></b>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> [postgis-users] question
on returning area size using st_area.</span></font></p>

<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p style="margin-right: 0in; margin-bottom: 12pt; margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">hi
there,<br>
<br>
i've just started using postgis, i have loaded a sample map of malaysia using
the following command:<br>
<br>
F:\PROGRA~1\PostgreSQL\8.3\bin>shp2pgsql -c -s 4326
G:\Maps\Malaysia\Detailsmaps\state_region public.mal_state > state.sql<br>
<br>
Shapefile type: Polygon<br>
Postgis type: MULTIPOLYGON[2]<br>
<br>
the projection file in the prj is as follow so I assume the SRID is 4326 :<br>
<br>
GEOGCS["Lat Long WGS84",DATUM["D_WGS84",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]<br>

<br>
the map is successfully loaded and can be viewed using uDig. The problem occurs
when I tried to use the st_area command as state in the PostGIS (1.3.3) manual
(<a href="http://4.6.2.2" target="_blank">4.6.2.2</a>). the sql statement i issue is:<br>
<br>
SELECT<br>
  ST_Area(the_geom)/10000 AS hectares<br>
FROM mal_state<br>
WHERE name = 'KELANTAN';<br>
<br>
hectares <br>
------------------ <br>
0.000122167591783352 <br>
(1 row)<br>
<br>
is the return result measure in the unit of the WGS84 projection? if so how can
i change it to the correct measurement? i have attached my map file in this
email, can someone please shine some light? thanks in advance.<br>
<br>
best regards,<br>
<br>
Stephen</span></font></p>

</div></div></div>

</div>


<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>