Tuesday, 15 December 2015

postgis - ST_SnapToGrid doesn't work properly, e.g. 41.94186153740355 -> 41.941861499999995


I'm using ST_SnapToGrid: ST_SnapToGrid(somePoint, 0.0000001) and I get strange result on many points, such as:


- POINT (21.619820510769063 41.94186153740355) -> POINT (21.6198205 41.941861499999995)  

- POINT (22.49594094391644 41.20357506925623) -> POINT (22.495940899999997 41.203575099999995)

What am I doing wrong?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...