<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6618.4">
<TITLE>Re: [mapguide-dev] area calculation conversion to meters</TITLE>
</HEAD>
<BODY dir=ltr>
<DIV>I'm far from an expert either, but here is what makes sense to
me...</DIV>
<DIV> </DIV>
<DIV>The simplest solution to me seems to transform to the nearest UTM Zone
projection in meters and compute the area of the resulting geometry. I think
this will be accurate enough for what you are doing, since it is very
likely that the original data (for Sheboygan) was measured in that UTM zone
and then converted to LatLon after the fact anyway. That's why it seems to
me that this approach will give you exact results, even though in theory it is
not exact (since the data can be far away from the UTM Zone's central
meridian).</DIV>
<DIV> </DIV>
<DIV>Another, more generic approach, that would be good for small features,
would be to construct a UTM coordinate system definition centered around the
meridian that crosses the centroid of the feature. This will give you an
LL-UTM transformation with the least distortion for the feature at hand. </DIV>
<DIV> </DIV>
<DIV>My hunch is that computing an exact area on the ellipsoid without
projection involves elliptical integrals, since even the area of a whole
ellipsoid involves those. Elliptic integrals have no closed form solution so you
would need a numerical integration approach, which hurts my head even thinking
about it.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Traian</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT size=2>-----Original Message----- <BR><B>From:</B> Paul Spencer
(External) <BR><B>Sent:</B> Sat 12/2/2006 12:04 PM <BR><B>To:</B>
dev@mapguide.osgeo.org <BR><B>Cc:</B> <BR><B>Subject:</B> Re: [mapguide-dev]
area calculation conversion to meters<BR><BR></FONT></DIV>
<P><FONT size=2>Trevor,<BR><BR>That would work for GetLength() but I wonder if
you need to adjust <BR>for latitude as well ... and it doesn't work for
area. I pondered <BR>doing this for the square root of the area and
then squaring the <BR>result ... I think that would work, but again it
would have to be <BR>adjusted for the latitude ... or am I
over-engineering this?<BR><BR>Paul<BR><BR>On 1-Dec-06, at 4:10 PM, Trevor
Wekel wrote:<BR><BR>> Hi Paul,<BR>><BR>> For the most general case, I
think you're on the right track. Most of<BR>> the geometry classes
support the Transform() operation. The<BR>>
MgCoordinateSystemTransform allows transformation from one coordinate<BR>>
system to another. I'm not a coordinate system expert but from what
I<BR>> understand most coordinate systems projections have an accurate
sweet<BR>> spot in the center and become more inaccurate around the
edges. I<BR>> wonder if there is a programmatic way to determine the
appropriateness<BR>> of the target system? Possibly based on center
point of the <BR>> projection?<BR>><BR>> But if your target
system is in decimal degrees, doesn't that imply a<BR>> direct mapping to
the world space? Isn't a decimal degree some number<BR>> of
meters? Could you just use<BR>>
MgCoordinateSystem::ConvertCoordinateSystemUnitsToMeters(double units)<BR>>
as the conversion factor? I suspect this may also work in the
sweet<BR>> spot of projected systems as well.<BR>><BR>>
Thanks,<BR>> Trevor<BR>><BR>> -----Original Message-----<BR>>
From: Paul Spencer (External)<BR>> Sent: Thursday, November 30, 2006 3:03
PM<BR>> To: dev@mapguide.osgeo.org<BR>> Subject: [mapguide-dev] area
calculation conversion to meters<BR>><BR>> Hi all,<BR>><BR>> I'm
measuring the area and length of features using<BR>>
MgGeometricEntity::GetArea() and GetLength() in the Sheboygan data.<BR>>
This returns values in the units of the projection, which
happens <BR>> to be<BR>> decimal degrees. Not so
useful. I'd like the result to be in meters.<BR>><BR>> Since this
code needs to be generic, I've implemented some stuff to<BR>> transform the
geometry into a coordinate system that supports meters.<BR>> This is not
too accurate since I arbitrarily picked a World LCC<BR>> projection wkt
:)<BR>><BR>> What is the recommended way of doing this
calculation?<BR>><BR>> Cheers<BR>><BR>> Paul<BR>><BR>>
+-----------------------------------------------------------------+<BR>>
|Paul
Spencer
pspencer@dmsolutions.ca |<BR>>
+-----------------------------------------------------------------+<BR>>
|Chief Technology
Officer
|<BR>> |DM Solutions Group
Inc
<A href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A> |<BR>>
+-----------------------------------------------------------------+<BR>><BR>><BR>><BR>><BR>><BR>>
---------------------------------------------------------------------<BR>>
To unsubscribe, e-mail: dev-unsubscribe@mapguide.osgeo.org<BR>> For
additional commands, e-mail:
dev-help@mapguide.osgeo.org<BR>><BR>><BR>><BR>>
---------------------------------------------------------------------<BR>>
To unsubscribe, e-mail: dev-unsubscribe@mapguide.osgeo.org<BR>> For
additional commands, e-mail:
dev-help@mapguide.osgeo.org<BR>><BR><BR>+-----------------------------------------------------------------+<BR>|Paul
Spencer
pspencer@dmsolutions.ca
|<BR>+-----------------------------------------------------------------+<BR>|Chief
Technology
Officer
|<BR>|DM Solutions Group
Inc
<A href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A>
|<BR>+-----------------------------------------------------------------+<BR><BR><BR><BR><BR><BR>---------------------------------------------------------------------<BR>To
unsubscribe, e-mail: dev-unsubscribe@mapguide.osgeo.org<BR>For additional
commands, e-mail:
dev-help@mapguide.osgeo.org<BR><BR></FONT></P></BLOCKQUOTE>
</BODY>
</HTML>