<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Chris,<br>
<br>
Actually, I was wrong in stating that one degree of latitude equals
1852 meters. That should have been a minute (on sixtieth of a
degree). <br>
<br>
I agree that it is not good to start rounding coordinates or other
intermediate values when performing a transformation. But it does
seem funny not to round the end result to something representative
of the 'real' accuracy (assuming that the starting values have the
right precision). Whatever kind of transformation is done, it is
impossible to improve the accuracy of the initial values. Accuracy
of coordinates can only get worse. So it seems to me it is not wrong
to round the end result. <br>
<br>
Of course I am assuming that the number of significant tells us
something about accuracy. Maybe I should not do that. But there
there is no other way to express the level of accuracy of individual
coordinate values. <br>
<br>
Thinking about the subject a bit further I now realise that this is
not really an issue with ST_Transform, it is probably a much more
general issue with all calculations involving geometry (is the
radius of a circle with a circumference of 10 meters
1.5915494309189533576888376337251 or 1.6?). So maybe I'd better
withdraw my second point. <br>
<br>
Regards,<br>
Frans <br>
<br>
<br>
On 2011-06-23 17:29, Chris Hermansen wrote:
<blockquote
cite="mid:BANLkTi=zFeOewtJxasObSvCCuS5ZPGEfkg@mail.gmail.com"
type="cite">Frans,<br>
<br>
You think of your input coordinates as accurate to the nearest
meter. Well perhaps :-) But anyway, the output of the
transformation is as accurate as possible a representation of your
input coordinates in the new coordinate system. That is, the
transformation contains multiplication, division, perhaps
iteration, and an underlying representation (IEEE floating point
double precision) that causes round-off errors in floating point
calculations. <br>
<br>
It is your assumption, not correct actually, that the output
representation contains false precision. Think of your own
example - if one degree of latitude is 1852 meters (to the nearest
meter, on average around the spheroid), then to twenty digits of
precision 1 meter is 0.00053995680345572354 degrees. There is no
"false precision" here; that is just what one gets dividing 1 by
1852 and keeping the first 20 digits of the answer.<br>
<br>
If you start to throw away digits of your transformed numbers,
then do calculations, then transform back, you will get a less
accurate answer than if you keep it all (cumulative round-off
error). That's the point of precisely representing your numbers -
minimize that computational error.<br>
<br>
As to serializing, I guess it depends on how you serialize, but if
it's some kind of character representation of the underlying
binary floating point, you're not going to save much - you might
use hexadecimal characters to represent 8 bytes for each number
and generally there won't be a bunch of trailing zeros in those
character representations, so you're not going to be able to
shorten them up much on average.<br>
<br>
<div class="gmail_quote">On Thu, Jun 23, 2011 at 7:56 AM, Frans
Knibbe <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:frans.knibbe@geodan.nl">frans.knibbe@geodan.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi Mike,<br>
<br>
Thanks for your response.<br>
<br>
About the order of coordinates: I see that PostGIS uses EPSG
as the authority that defines coordinate reference systems. If
you look up the definition of EPSG:4326 (for example at <a
moz-do-not-send="true" href="http://www.epsg-registry.org/"
target="_blank">http://www.epsg-registry.org/</a>, use
'retrieve by code'), you can see that it explicitly says that
the axes are latitude, longitude. So it seems the standard
that is used in PostGIS specifies (latitude, longitude), not
(longitude, latitude).<br>
<br>
About accuracy/precision: The original coordinates in my
example were (253328, 593188). Those values are in meters. So
the measurement is accurate on the level of a meter. Now look
at the number 6.86264236062518 (longitude). The unit of
measurement in this case is degrees. One degree of latitude is
1852 meters. The number 6.86264236062518 implies that it has
an accuracy of about 0.00000000000001 degree, which is
0.00000000001852 meter. So suddenly, after transforming, the
coordinates seem to have been measured at a submicroscopic
level!<br>
<br>
I agree that a high precision is a good thing, but only if it
is combined with a high accuracy. The precision in this case
is clearly far too large. Another point that can be made here
is that the large number of insignificant digits in this case
cause bloating of data, which is a nuisance if these data are
serialised.<br>
<br>
Regards,<br>
<font color="#888888">
Frans</font>
<div>
<div class="h5"><br>
<br>
On 2011-06-23 16:05, Mike Toews wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
On 24 June 2011 01:19, Frans Knibbe<<a
moz-do-not-send="true"
href="mailto:frans.knibbe@geodan.nl" target="_blank">frans.knibbe@geodan.nl</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
POINT(6.86264236062518 53.3160795502069)<br>
There are two things wrong with this result:<br>
1) The coordinates are in the wrong order (EPSG:4326
uses latitude,<br>
longitude).<br>
</blockquote>
They are in the correct order. Standards say "X, Y"
which are "long,<br>
lat". This convention is commonly confused, as "lat,
long" is very<br>
common.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
2) There are too much significant numbers in the
result (the implied<br>
accuracy was increased by ST_Transform).<br>
</blockquote>
It's "precision" (not "accuracy") that was increased.
This is<br>
generally a good thing, and is required to represent
global positions<br>
within fractions of a millimeter. The "significant
digits" method of<br>
determining precision does not work here as the actual
re-projection<br>
calculations are not simple.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
I would have expected a result like<br>
POINT(53.31608 6.86264)<br>
</blockquote>
You can format geometry any way you like, e.g. for
reporting as<br>
"53.31608N 6.86264E". But if you are passing data for
applications,<br>
keep to standard WKT and high precision if you can. The
distance<br>
between the high-precision and 5-decimal precision is
about 16.5 cm,<br>
which can be significant to many users.<br>
<br>
-Mike<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:postgis-users@postgis.refractions.net"
target="_blank">postgis-users@postgis.refractions.net</a><br>
<a moz-do-not-send="true"
href="http://postgis.refractions.net/mailman/listinfo/postgis-users"
target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:postgis-users@postgis.refractions.net"
target="_blank">postgis-users@postgis.refractions.net</a><br>
<a moz-do-not-send="true"
href="http://postgis.refractions.net/mailman/listinfo/postgis-users"
target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<font size="3" face="SANS"><span style="border-collapse: collapse;
color: rgb(32, 32, 32); font-family: 'Droid
Sans',arial,sans-serif; font-size: 13px;"><font
style="font-family: arial,helvetica,sans-serif;" size="3"
face="SANS">Chris Hermansen</font><br style="font-family:
arial,helvetica,sans-serif;">
<i style="font-family: arial,helvetica,sans-serif;"><font
size="2">Vice President</font></i><br style="font-family:
arial,helvetica,sans-serif;">
<img style="font-family: arial,helvetica,sans-serif;"
src="cid:part1.08070405.01010401@geodan.nl" align="bottom"
border="0"><br style="font-family:
arial,helvetica,sans-serif;">
<font style="font-family: arial,helvetica,sans-serif;"
size="2" face="SANS">TECO Natural Resource Group Limited</font><br
style="font-family: arial,helvetica,sans-serif;">
<font style="font-family: arial,helvetica,sans-serif;"
size="2" face="SANS">301 · 958 West 8th Avenue</font><br
style="font-family: arial,helvetica,sans-serif;">
<font style="font-family: arial,helvetica,sans-serif;"
size="2" face="SANS">Vancouver BC CANADA · V5Z 1E5</font><br
style="font-family: arial,helvetica,sans-serif;">
<font size="2" face="SANS"><span style="font-family:
arial,helvetica,sans-serif;">Tel +1.604.714.2878 · Cel
+1.778.840.46</span>25</font></span></font><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<br>
</body>
</html>