When I enter the following value into a geofield: POINT (13.375017851383 52.50967395)
, this geohash is computed: u33d8r57h88nhbz4u4vj
.
This leads to the following SQL exception, when I try to save the respective entity:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_location_geohash'
I am not sure whether the geohash is still a valid geohash at that length (i.e. this might be a bug with geophp?), or whether the column should allow longer values.
Either way, the error disappears when I reduce the number of decimals in the coordinate components to 6 or 7, i.e. POINT (13.375017 52.509673)
. This is most likely still precise enough, and maybe something that could be done automatically before stuff is stored in the database...
Any thoughts? :)
Comments
Comment #2
plopescThis should be fixed in -dev.
Thank you for reporting this!