[postgis-devel] C implementation patch for GeoHash input

J Smith dark.panda+lists at gmail.com
Mon May 14 14:04:03 PDT 2012


G'day list.

As discussed briefly at
http://postgis.refractions.net/pipermail/postgis-devel/2012-April/020364.html
, I took a couple of hours over the weekend and wrote up an
implementation of some functions for converting from GeoHash strings
to box2ds and geometries and such. I've attached a patch that adds a
few functions for GeoHash input along with some regression tests. I
haven't written up any documentation yet as this is really kind of a
first-pass and my first attempt at a PostGIS patch, so have at it and
see if it's relatively sane and I'll get to the documentation next.
I've made the patch against the current svn head at r9732 via strk's
github repository.

The patch itself contains the following functions:

ST_Box2dFromGeoHash(geohash text [, precision int4 default null])
ST_GeomFromGeoHash(geohash text [, precision int4 default null])
ST_PointFromGeoHash(geohash text [, precision int4 default null])

Where the default precision is the full precision of the GeoHash.

Cheers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geohash_input.patch
Type: application/octet-stream
Size: 11035 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120514/70f801ef/attachment.obj>


More information about the postgis-devel mailing list