[OSM-dev] Update on osmosis dataset support

Brett Henderson brett at bretth.com
Sun Jan 6 11:22:42 GMT 2008


Hi Marcus,

I had a quick look, it looks interesting.  Have you tried importing 
complete planets and if so do you have any numbers on the time for doing 
so?  I'm interested to see how it compares with what I've done so far.  
I had a quick look at the hsqldb website and it mentions supporting data 
up to 8GB.  I assume you're storing most data in xml files so aren't 
running into that limit ...

Is it possible to apply changes to your database?  I had a quick look at 
the code but not long enough to really figure out what was going on ;-)

As for implementing an interface, the interface required is 
com.bretth.osmosis.core.container.v0_5.Dataset which has a single method 
returning an instance of 
com.bretth.osmosis.core.container.v0_5.DatasetReader.
DatasetReader currently has the following methods.

    public Node getNode(long id);
    public Way getWay(long id);
    public Relation getRelation(long id);
    public Iterator<EntityContainer> iterate();
    public Iterator<EntityContainer> iterateBoundingBox(double left, 
double right, double top, double bottom, boolean completeWays);

I may add new methods over time but this was the minimal set for solving 
immediate needs.

The interface provides a way for tasks to randomly access any entity as 
well as retrieve all the data in a bounding box.  My implementations 
(Berkeley DB and custom file-based implementations) use tile indexes on 
ways as well as nodes to solve the "way crossing tile without containing 
node" problem but this isn't essential.

Brett

Marcus Wolschon wrote:
>
>
> Hello Brett,
>
> I have an existing Database that does that.
> It uses OSM-xml-files (one per tilenr.) and
> an hsqldb as an index by (node/way/relation-)id
> and (normalized)name. What interface would it need
> to implement to be usable to you?
> (See Sourceforge->Traveling Salesman->FileTileDataSet)
>
>
> Hsqldb is as fast as Mysql but very small and can be included
> in the jar.
> It also allows an alternative on-disk-format that stores
> a text-file with sql-insert-statements. (Surprisingly fast.)





More information about the dev mailing list