Saltar a contenido

geo_hash

app.contrib.geospatial.geo_hash

Python module for Geohash.

https://github.com/vinsci/geohash

commit 3f0ce0b 7 Jan 2015

Copyright (C) 2008 Leonard Norrgard leonard.norrgard@gmail.com Copyright (C) 2015 Leonard Norrgard leonard.norrgard@gmail.com

This file is part of Geohash.

Geohash is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Geohash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with Geohash. If not, see http://www.gnu.org/licenses/.

decode_exactly(geohash)

Decode the geohash to its exact values, including the error margins of the result. Returns four float values: latitude, longitude, the plus/minus error for latitude (as a positive number) and the plus/minus error for longitude (as a positive number).

decode(geohash)

Decode geohash, returning two strings with latitude and longitude containing only relevant digits and with trailing zeroes removed.

encode(latitude, longitude, precision=12)

Encode a position given in float arguments latitude, longitude to a geohash which will have the character count precision.