Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#1818 closed patch (fixed)

C implementation for GeoHash input

Reported by: darkpanda Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: trunk
Keywords: history Cc:

Description

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?.

Attachments (1)

geohash_input.patch (18.0 KB) - added by darkpanda 7 years ago.
C implementation for GeoHash? input functions.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by darkpanda

Would it be cool to change the milestone to PostGIS 2.1.0? I had originally set it to PostGIS Future before the new branch was created but now that it exists 2.1.0 might be a better fit.

comment:2 Changed 7 years ago by strk

Milestone: PostGIS FuturePostGIS 2.1.0

Sounds good to me

comment:3 Changed 7 years ago by darkpanda

Any chance this patch could be merged in time for 2.1? I can post a newer patch rebased off of svn-trunk if that's helpful -- it currently seems to apply cleanly against the latest svn-trunk.

comment:4 Changed 7 years ago by robe

Yes you can still make the 2.1 cut. We haven't called feature freeze yet.

What you do seem to be missing is user documentation. Please refer to our instructions on submitting documentation for new features:

http://trac.osgeo.org/postgis/wiki/DevWikiDocNewFeature

comment:5 Changed 7 years ago by darkpanda

Gotcha. I'll see if I can't find some time to put towards that this weekend.

Changed 7 years ago by darkpanda

Attachment: geohash_input.patch added

C implementation for GeoHash? input functions.

comment:6 Changed 7 years ago by darkpanda

Alright, I just finally found the time to write the user documentation for the new GeoHash? functions and I've updated the patch accordingly, as well as rebased it off of the latest svn-trunk, so hopefully it's all good to go.

comment:7 Changed 6 years ago by darkpanda

Type: patchenhancement

comment:8 Changed 6 years ago by darkpanda

Any chance someone could give this patch a review now that it has docs as well? I can upload a rebased patch if necessary.

comment:9 Changed 6 years ago by robe

Looks okay to me. pramsey and strk -- any comments or should I go ahead and patch and do a little stress testing?

comment:10 Changed 6 years ago by robe

Type: enhancementpatch

comment:11 Changed 6 years ago by robe

Keywords: history added
Resolution: fixed
Status: newclosed

darkpanda -- what do you want for creidts. I just see J. Smith but don't know what the J stands for.

Committed at r11341, r11342, r11343 (sorry I forgot to add a bunch of new files in original commit)

I've still got some local stress testing to do and the buildbots are still running thru the pg 9.0-9.3 tests and so far looks good.

comment:12 Changed 6 years ago by darkpanda

Cool. The "J" stands for... "Jay"... which stands for "Jason". Saves on the typing. "Jay" is fine though. The happy medium. Cheers!

Note: See TracTickets for help on using tickets.