What is the difference between ST_GEOMETRY and WKT? Is ST_GEOMETRY just a database type and WKT (well-known text) is a textual representation of the data?

  • which database are you using? Can you give some context as to where this question is coming from – Ian Turton Jul 10 '15 at 8:49

WKT is a text interchange format (Wikipedia) (PostGIS), and if you use PostGIS, you might use it like I do occasionally in SQL queries, to get a quick non-visual check on the geometry - see the ST_AsEWKT function.

ESRI seems to use 'ST_Geometry' to be the whole class of 'Spatial SQL' concepts and functions laid out in the OGC/ISO standard, AND use it to be a geometry storage type, e.g. in contrast to their older closed SDEBINARY format. PostGIS seems to use it as a storage type, as you use functions like ST_GeomFromText to populate spatial columns from interchange formats. Though I can't say I've got a clue what the actual storage format in PostGIS is.

  • The storage format is described here. Unless you're actually writing C code for the back-end, you never see it. Even the binary output is not the storage format, it's extended WKB. – Paul Ramsey Jun 11 '16 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.