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?
Asked
Active
Viewed 1,875 times
2
-
which database are you using? Can you give some context as to where this question is coming from – Ian Turton Jul 10 '15 at 08:49
1 Answers
2
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.
MC5
- 1,901
- 1
- 14
- 23
-
2The 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 03:51