On 2009-08-04, [email protected] <[email protected]> wrote: > The osmosis library seems to contain some classes to connect with the > postgresql database.
Yes but only for bulk-reading and bulk-writing. Not for searching for and accessing individual elements. > The javadoc i used is located here: > http://travelingsales.sourceforge.net/javadoc/libosm/ That one is completely outdated. I need to repair the script that uploaded the javadoc some time. > I could also just use JDBC to connect and send out queries, but I noticed > that the libosm library contains some methods that are transparent to the > user to work with Nodes. (in other words the queries do not need to be > writtenn which is a great timesaver for the routing part) > So i think it would be better to use the libosm's pgsql classes instead of > just jdbc. LibOSM contain no current IDataSet -implementation for Postgres. Your are however free to write one. E.g. based on the H2DataSet. > Could you provide me with better documentation of how these classes work (if > better documentation is available) or a clear example of how the connection > is made using this library? Look at H2DataSet and MysqlDataSet to see how to connect to a database. Node, Way, Relation, Entity,... are just data-objects. IDataSet is where it gets interesting. There is lots of doumentation on it in the wiki: http://travelingsales.sourceforge.net/ Looking at the "Plugins"-page and then "IDataSet" can get you started. PS: There are no unaproved posts in the forum. I´m checking it (nearly) every day. _______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
