[postgis-users] how storage geometry in WKT format

Nicolas Ribot nicky666 at gmail.com
Wed Mar 15 07:27:37 PST 2006


> Hallo,
> I want storage geometry in WKT format. Is this possible?
>
> I tryed UPDATE lesy SET the_geom_wkt=AsText(the_geom), but my geometry is still saved in WKB format ... .
>
>

Geometries are stored internally in the postgis internal format,
neither WKB nor WKT, but a custom binary format (list, correct me if
I'm wrong).
If you want to express your geometries as a textual representation,
you can use asText(geom) when retrieving geometries.
If you still want a column holding a textual representation, create a
new column of type text and add a trigger updating this column with
the textual representation of your geometric column for each insert
(but I can't see a reason to do so).

Nicolas



More information about the postgis-users mailing list