[postgis-users] PostGIS layer spatial tolerance
Vincent.Picavet at mediapost.fr
Fri Aug 28 06:22:23 PDT 2009
> I come from the ESRI and Oracle world. Both ArcSDE and Oracle
> Spatial have user-defined spatial tolerance for each
> spatially enabled layer. This ensures that coordinates are
> exact, down to the last decimal (or integer for ArcSDE).
> I cannot find in the documentation or in the functionality
> that PostGIS has an awareness of spatial tolerance. What I
> can find is:
> "All floating point comparisons within the SQL-MM
> implementation are performed to a specified tolerance, currently 1E-8"
> but nothing about actual storage.
A solution in order to take spatial tolerance into account, despite not being automated, would be to systematically use the st_snaptogrid postgis function when creating or modifying geometries.
If you want a certain level of automation of this process, you should consider writing a trigger which snaps geometries to a specified grid on insert or update.
This is probably better than rounding coordinate in the application code.
> For me, the easiest solution would be to use a spatial
> tolerance. Otherwise, we may need to round all coordinates in
> the application code to e.g. 14 valid digits.
> Best Regards
> Andreas Oxenstierna
> Telefon direkt 040-16 70 17
> Mobil 0734-12 80 17
> andreas.oxenstierna at sweco.se
> Sweco Position AB
> Hans Michelsensgatan 2
> Box 286
> 201 22 Malmö
> Telefon 040-16 70 00
More information about the postgis-users