[postgis-users] PostGIS layer spatial tolerance
Oxenstierna Andreas
Andreas.Oxenstierna at sweco.se
Sun Aug 30 23:50:08 PDT 2009
Thanks.
SnapToGrid used in a trigger should, as far as I understand, act as a layer spatial tolerance.
Then we "just" need to ensure that all editing operations act accordingly, i.e. not shift any coordinate outside of the selected tolerance.
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
www.sweco.se
-----Ursprungligt meddelande-----
Från: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] För Picavet Vincent
Skickat: den 28 augusti 2009 15:22
Till: PostGIS Users Discussion
Ämne: Re: [postgis-users] PostGIS layer spatial tolerance
Hi,
> 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.
http://postgis.refractions.net/docs/ST_SnapToGrid.html
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.
Regards,
Vincent
>
> 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
> www.sweco.se
>
>
>
>
>
>
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090831/57d720e9/attachment.html>
More information about the postgis-users
mailing list