Opened 13 years ago

Closed 12 years ago

Last modified 12 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: master
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 12 years ago.
C implementation for GeoHash input functions.

Download all attachments as: .zip

Change History (13)

comment:1 by darkpanda, 12 years ago

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 by strk, 12 years ago

Milestone: PostGIS FuturePostGIS 2.1.0

Sounds good to me

comment:3 by darkpanda, 12 years ago

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 by robe, 12 years ago

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 by darkpanda, 12 years ago

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

by darkpanda, 12 years ago

Attachment: geohash_input.patch added

C implementation for GeoHash input functions.

comment:6 by darkpanda, 12 years ago

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 by darkpanda, 12 years ago

Type: patchenhancement

comment:8 by darkpanda, 12 years ago

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 by robe, 12 years ago

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

comment:10 by robe, 12 years ago

Type: enhancementpatch

comment:11 by robe, 12 years ago

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 by darkpanda, 12 years ago

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.