SQLite Forum

geopoly_json rounding effect
Login
Result of geopoly\_contains\_point may change when geopoly\_json(_shape_) instead of the _shape_ itself it used.

```
sqlite> select geopoly_contains_point('[[0,0],[1,0],[1,1.000001],[0,0]]', 1.0/3, 1.0/3);
2
sqlite> select geopoly_contains_point(geopoly_json('[[0,0],[1,0],[1,1.000001],[0,0]]'), 1.0/3, 1.0/3);
0
```

No wonder because geopoly\_json in the second query returns '[[0,0],[1,0],[1,1],[0,0]]'. The problem is that rounding of geopoly\_json is inconsistent with rounding used internally (is it geopoly\_blob?).

Is it possible to increase precision of geopoly\_json to avoid loss of precision in conversion?