[postgis-users] precision of GeomFromTex, Transform and text functions

Ludovico Bianchini metlud at yahoo.it
Mon Sep 3 12:39:08 PDT 2007


Hi all,

I'm using this postgis function:
- GeomFromText(text, int4) to create a geometry value
in 4326 spatial_ref_sys
- Transform(geometry, int4) to convert a geometry from
4326 to 26591 when I'm inserting a record and to
convert 26591 to 4326 when I'm selecting records
- text(geometry) to convert the geometry column in a
human-readable string

The problem is that the operations are not precise:
the value I obtain via text(transorm(geom_column,
4326)) is different from what I inserted via 
Transform(GeomFromText('POINT(' || $10 || ')', 4326),
26591).

Here an example (lon-lat values separated by a space):
Insert:37.13953463591601 45.66405322544534
Select:37.1321614399253 45.6647733181425

Insert:37.1321614399253 45.6647733181425
Read:37.1248077366115 45.6654912656918

Insert:37.1248077366115 45.6654912656918
Read:37.1174734269995 45.6662070796171

Is this a 'normal' behaviour?
Am I omitting anything?

Thanks in advance for any help!!

Bye,
Ludovico 


      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html



More information about the postgis-users mailing list