Re: [postgis-users] strange behavior in ST_SnaptoGrid

2023-09-03 Thread Paul Ramsey
One thing to always ask is “why exactly am I doing this snapping operation?” If the answer is “so my numbers look nicer in my UI” then using the second parameter of the ST_AsText() function will give you nice, perfectly rounded-looking outputs just like you want them. ATB, P > On Sep 3, 2023,

Re: [postgis-users] strange behavior in ST_SnaptoGrid

2023-09-03 Thread Mike Taves
On Mon, 4 Sept 2023 at 00:06, Sajjad Hassany Pazoky wrote: > > I observed a strange behavior when using ST_SnaptoGrid. > I don't know whether I am making a mistake or if there is a bug. > The following code: > SELECT ST_AsText(ST_SnapToGrid( > ST_GeomFromText('LINESTRING(334729.13

[postgis-users] strange behavior in ST_SnaptoGrid

2023-09-03 Thread Sajjad Hassany Pazoky
I observed a strange behavior when using ST_SnaptoGrid. I don't know whether I am making a mistake or if there is a bug. The following code: SELECT ST_AsText(ST_SnapToGrid( ST_GeomFromText('LINESTRING(334729.13 4103548.88,334729.12 4103548.53)'), 0.001) ); produces: