[postgis-devel] geographystyle feature request (external textual representation)

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Wed Sep 9 12:59:17 PDT 2015


On 09/09/15 18:39, Malek,Christophe [CMC] wrote:

> Hi PostGIS devs,
> 
> 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 ofa directlyhuman readable formas I believeitmay
> be the intention and possibly proper usage ofhaving the"external textual
> representation".
> 
> Currently it appears that the geography data type is represented
> textually as something like
> "010100008000000080EB5108400000006066662E400000000000005940" which means
> little to nothing to the average human.
> 
> Obviously we can run the ST_AsText function to getanothermorereadable
> column but then we have two columns:onejustfor readability and
> anotherthat users actually work withto calculate distances etc.etc.Or
> even worse, creating even more columnsfor users to work withusing ST_X,
> ST_Y, ST_Z.
> 
> I would like to request that we instead be able to set the"external
> textual representation" of the geography data typeto something more
> humanfriendly such as to the output of ST_AsText.This would allow users
> tobetter understand the data while at the same time allowing them to
> work with itwithout additional conversion.
> 
> It is my understanding that this has been done in Postgres for the date
> and interval data types using thecommands:
> 
> "SET DATESTYLE TO ISO" etc. or
> 
> "SET INTERVALSTYLE TOPOSTGRES" etc.
> 
> Postgis could perhaps include somethingsimilar:
> 
> "SET GEORAPHYSTYLE TO WKT", "SET GEOGRAPHYSTYLE TO POSTGIS", etc. or
> something along those linesto give users somemoreoptions.
> 
> Please forgive me if there is already such a featureas 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 directionand my apologies.
> 
> If there isn't, then it might be interesting to hear back if people
> would be interested in such a featureand even more interested to hear
> back if somebody else is willing to develop it.
> 
> I unfortunately don't have time at the moment to implement it myself as
> I am just at the early stages of testing Postgres/Postgisand converting
> a very large dataset.But I believe such a feature might make Postgis an
> evenmore digestible option for our end usersand possibly others.
> 
> I understand there could be some precisionrelatedissues in converting
> back and forth between internal storage and WKTformat that users would
> probably need to be aware ofbut in such cases users should probably be
> using the "binary external representation" orthe usual
> geography/geometry constructors rather than "text external
> representation" for construction anyway.Effectively, the text
> representationisprobably one of the worst ones to be working with from a
> performance standpoint(due to all theextraparsing involved)so should
> bepossibly bediscouragedin generalfor anything other thanconvenience
> forhuman use anyway.
> 
> Lookingforward to hearing from you,
> 
> Chris

Hi Chris,

Can you explain exactly what your use case is here? Normally for any
moderately complex geometry the text output becomes so large that even
in text form you get several screens of text which is almost impossible
to read.

If you have a small number of tables then perhaps views could be a
potential solution. But then again most people will be viewing and/or
editing the data via graphical tools rather than directly in text form.


ATB,

Mark.




More information about the postgis-devel mailing list