[postgis-users] Geometric precision

Tim Baumgartner jongleur0815 at gmx.de
Thu Feb 2 05:56:44 PST 2006


Hi,

I have two questions. Perhaps somebody can help

1.
I am porting a GIS-related application from Oracle to PostGIS. In 
Oracle, It was possible to define the precision of spatial data, so that 
two points x(0.001, 3) and y(-0.001, 3) might be considered equal by the 
database. Is something like that possible in PostGIS as well?

2.
I noticed something that I don't understand when testing spatial queries:

insert into testtable values(GeomFromText('POINT(10.3 10.3)'));
SELECT * FROM testtable where g && SetSRID('BOX3D(10.300001    10,    
11     11)'::box3d,-1)

=> found something

SELECT * FROM testtable where g && SetSRID('BOX3D(10.30001    10,    
11     11)'::box3d,-1)

=> found nothing

Is there a rule for this behaviour? Does it have something to do with 
the fact that I am using -1 for SRID?

Any help would be very welcome.

Tim



More information about the postgis-users mailing list