[OSM-dev] Embedded databases

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Tue Apr 28 14:50:42 BST 2009


On Tue, 28 Apr 2009 13:34:16 -0000, "Nolan Darilek"
<nolan at thewordnerd.info>
wrote:
> I'm slowly hacking on a project that could benefit from an embedded
> database, and I'm not smart enough to create my own binary format.

Have you looked at OsmBin in the wiki?
There is a complete, custom binary format on the wiki and a well
documented reference-implementation to test against. ;)

> Furthermore, since we aren't usually under as severe constraints with
> embedded resources these days, an actual embedded DB makes more sense. I
> had a few questions regarding people's experiences, however.

I tried a few and the performance it terrible for anything above 200-500MB.
(a single state, not even a single country.)
With OsmBin importing takes ages but then it's fast enough for
interactive rendering of large areas.

I'll try H2 again once they release a new version (The current one has
a known bug that makes it unusable. For small maps it has shown quite
some promise).

> At the moment, I'm hacking on a prototype that uses Tokyo Cabinet's
> table store, and geohashes to implement geospatial searches.

Do you have any reference on "geohashes"? I did not encounter the
term before. Do you mean one-way functions that turn a 2d-location into
a 1d-index similar to a Z-curve or hilbert-curve?

 I'm still
> working on refining the import process so haven't experimented with how
> well searches work, and of course geohashes fail near the
> equator/meridians,

So? Add 180° and go above the north-pole. ;) No negative numbers anymore.

> I've been reading references to MonetDB. I've googled, but its website
> seems somewhat disorganized.

I agree completely. It looks nice but you have a hard time finding
a given piece of information (if it is present at all.). I needed to
go to the small Sourceforge-link at the bottom just to see what language
monetDB was implemented in.

> How well does it work with Ruby? Again, either my GoogleFu is weak or
> it's just not getting used much, because while it reveals the presence
> of a Ruby library, I can't seem to find any "here's what's cool about
> this and how to start using it" blog posts or articles.

Same here for the Java-support in MonedDB.

Marcus




More information about the dev mailing list