SELECT DISTINCT在PostGIS几何列上的精度是多少?
我想知道SELECT DISTINCT操作员在PostGIS几何图形上的精度如何。在我的系统上,以下查询给我一个5的计数,这意味着如果插入的点相差小于1e-5,则认为插入的点相等,并且我不确定这是否是PostGIS的功能,这是我安装的问题或错误。 有人知道这是否是预期的行为吗? CREATE TEMP TABLE test (geom geometry); INSERT INTO test VALUES (St_GeomFromText('POINT (0.1 0.1)')), (St_GeomFromText('POINT (0.001 0.001)')), (St_GeomFromText('POINT (0.0001 0.0001)')), (St_GeomFromText('POINT (0.00001 0.00001)')), (St_GeomFromText('POINT (0.000001 0.000001)')), (St_GeomFromText('POINT (0.0000001 0.0000001)')), (St_GeomFromText('POINT (0.00000001 0.00000001)')), (St_GeomFromText('POINT (0.000000001 0.000000001)')); SELECT COUNT(*) FROM (SELECT DISTINCT geom FROM test) AS test; count ------- 5 …