Sunday 17 July 2016

Set Tolerance in Postgis


is there anyway to set tolerance in Postgis, in Arcgis tolerance is the minimum distance which could separate two points, if the distance between them is smaller than the tolerance so the points are considered overlapped. i need to set this parameter because i get some weird results using functions like ST_Intersects, ST_equals, ST_difference. in this conditions i check intersecting points by ST_Distance(p1 , p2) < tolerance but i would like to get a more robust and general solution.


in my use case i need only 1cm to 1mm precision, but for example sometimes ST_Intersects do not give expected results because of some microns (0.000001).


SELECT ST_Intersects('POINT(0.00000000000000001 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry);


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...