Hi Nikolas, Hi Michael,
Thanks a lot for your help. I think asText function could do the job we
Nicolas Ribot schrieb:
>>While workin with PostgreSQL 7.4.6 Geometry was stored as String for
>>Now we have installed PostgreSQL 8.1.3. and included in the installer
>>Geometries are stored in a different format for example:
>>Is there a way to set up PostgreSQL8.1 or PostGIS to store geometries in
>>String format as it was prviously?
>>Thanks a lot in advance
>I don't think it is possible. Postgis changed the way it stores
>geometries internally, for space and performanace reason, if I
>This format also avoids coordinate precision reduction as it could
>happen with a textual format.
>You can still display geometries as text by calling textual
>representation functions when selecting geometries:
>asText() (so srid displayed, OGS-compliant function)
>asEXKT (srid dislpayed before the geometry).
>postgis-users mailing list
To make some light on the question:
PostGIS *NEVER* stored geometries in Text format.
Internal representation has always been in binary form.
The difference between 0.x and 1.x is the
*canonical text output representation*
The canonical text output representation is what you get
when fetching a Geometry object from a text cursor. This
is what you get with the 'psql' monitor application, for
Most importantly, canonical text output representation is
the representation used when *dumping* a database. This
is the exact reason why it changed betseen 0.x and 1.x:
to allow lossless dump/restore operations.
I hope this clarify things.
Michael Fuhr schrieb:
PostGIS is a separate project from PostgreSQL so you'd be better off
asking questions about it on the postgis-users mailing list.
The change you're seeing is due to a different version of PostGIS,
not a different version of PostgreSQL. Recent versions of PostGIS
(since 1.0, I think) display a different "canonical form" than older
versions did; search the postgis-users and postgis-devel archives
for discussion and rationale. You can use the AsText or AsEWKT
functions to get the Well-Known Text representation:
postgis=> SELECT geom, AsText(geom) FROM foo;
geom | astext
010100000077BE9F1A2FDD5E40AC1C5A643BDD8E40 | POINT(123.456 987.654)
pgsql-novice by date
|Next:||From: Zouari Fourat||Date: 2006-02-20 10:31:00|
|Subject: inserting a value as null|
|Previous:||From: A. Kretschmer||Date: 2006-02-20 10:02:38|
|Subject: Re: get the inserted row id|