English

FAQ: Does the value from Well Known Text (WKT) represent the actual geometry?

Question

Does the value from Well Known Text (WKT) represent the actual geometry?

Answer

No, the output from the st_astext function is limited to only return the precision of a geometry's coordinate to the eighth decimal position.

For example, the following demonstrates the well-known text output for one st_geometry polygon.

Code:
SQL> SELECT sde.st_astext(shape) FROM parcels
2 WHERE objectid = 304235;

SDE.ST_ASTEXT(SHAPE)
--------------------------------------------------------------------------------
POLYGON (( 1386152.32216290 408623.12815763, 1386153.95634598 408622.95558579,
1386176.36148490 408620.58846454, 1386184.36114082 408690.86096179, 1386160.5960
9647 408693.48333189, 1386160.34215997 408693.51154704, 1386151.32544573 408623.
23347238, 1386152.32216290 408623.12815763))

Each coordinate value is only reported to the eighth decimal position.

Because of this limitation, it is not possible or expected to be able to compare geometries for equivalency using st_equals() with the original geometry and the well-known text representation from the st_astext() function.