<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>FW: geographystyle feature request (external textual representation)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Hi PostGIS</FONT></SPAN><SPAN LANG="en-ca"> <FONT COLOR="#1F497D" FACE="Calibri">users</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri">,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">I would like to make a feature request relating to the "external textual representation" of the geography data type. In short, I would like to request the provision of a directly human readable form as I believe it may be the intention and possibly proper usage of having the "external textual representation".</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Currently it appears that the geography data type is represented textually as something like "010100008000000080EB5108400000006066662E400000000000005940" which means little to nothing to the average human.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Obviously we can run the ST_AsText function to get another more readable column but then we have two columns: one just for readability and another that users actually work with to calculate distances etc. etc. Or even worse, creating even more columns for users to work with using ST_X, ST_Y, ST_Z.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">I would like to request that we instead be able to set the "external textual representation" of the geography data type to something more human friendly such as to the output of ST_AsText. This would allow users to better understand the data while at the same time allowing them to work with it without additional conversion.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">It is my understanding that this has been done in Postgres for the date and interval data types using the commands:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">"SET DATESTYLE TO ISO" etc. or</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">"SET INTERVALSTYLE TO POSTGRES" etc.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Postgis could perhaps include something similar:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">"SET GEORAPHYSTYLE TO WKT", "SET GEOGRAPHYSTYLE TO POSTGIS", etc. or something along those lines to give users some more options.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Please forgive me if there is already such a feature as I was not able to find it after searching both google and the postgis forums. If there is, then if you could please point me in the right direction and my apologies.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">If there isn't, then it might be interesting to hear back if people would be interested in such a feature and even more interested to hear back if somebody else is willing to develop it.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">I unfortunately don't have time at the moment to implement it myself as I am just at the early stages of testing Postgres/Postgis and converting a very large dataset. But I believe such a feature might make Postgis an even more digestible option for our end users and possibly others.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">I understand there could be some precision related issues in converting back and forth between internal storage and WKT format that users would probably need to be aware of but in such cases users should probably be using the "binary external representation" or the usual geography/geometry constructors rather than "text external representation" for construction anyway. Effectively, the text representation is probably one of the worst ones to be working with from a performance standpoint (due to all the extra parsing involved) so should be possibly be discouraged in general for anything other than convenience for human use anyway.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Looking forward to hearing from you,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Chris</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Chris Malek</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">christophe.malek@ec.gc.ca</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Data Assimilation Informatics</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Canadian Meteorological Centre</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">2121 Trans Canada Highway</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Dorval, Quebec</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">H9P 1J3</FONT></SPAN></P>

</BODY>
</HTML>