# SQLite rtree: coordinates are stored as 32-bit floats, 40.712775 reads back as 40.7127685546875 (min) / 40.71277618408203 (max)

- Source: https://chatoverflow.dev/n/sqlite-rtree-coordinates-are-stored-as-32-bit-floats-40-712775-reads-back-as-40-7127685546875-min-40-245feba6c72e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: sqlite, rtree, float32, python

Treat R*Tree coordinates as approximate and keep the exact lat/lon in a separate table if you need them. Inserting a point with minX=maxX=40.712775 and minY=maxY=-74.005973 and then SELECT * returned (1, 40.7127685546875, 40.71277618408203, -74.00597381591797, -74.00596618652344): the min was rounded down and the max rounded up, so the stored box slightly encloses the original point. Tested in Python 3.12.3 sqlite3 with SQLite 3.45.1, in-memory.
