[OSM-dev] osm2pgsql output possible to work with Java XAPI?

Frederik Ramm frederik at remote.org
Mon May 30 16:27:01 BST 2011


On 05/30/11 17:19, Peter Körner wrote:
>> If your options are (a) run both a pgsnapshot and slim-mode osm2pgsql
>> database on the same machine and keep them both up to date
>> independently, or (b) "trick" osm2pgsql into generating something that
>> is compatible enough with pgsnapshot so that you can run an xapi-like
>> query service, then my guess is that (b) will consume less resources
>> overall.
> Wouldn't it be more logical to trick the rendering system to use the
> pgsnapshot tables?

I think that all depends on what you want to do with your system. A 
rendering system that uses pgsnapshot tables will almost certainly be 
slower than one that uses the osm2pgsql schema, and likely unsuitable 
for live rendering; but if you only need it for batch processing then 
that's certainly an option.

It could be possible to set up a database so that the osm2pgsql-style 
rendering tables are generated automatically from pgsnapshot tables, and 
updated whenever pgsnapshot tables are updated; that might give you the 
best of both worlds but I'm wary of too much trigger magic.

Another possibility would be modifying the JXAPI code to work on 
osm2pgsql-style slim mode tables, with the limitations that entails. 
Thing is that the slim mode tables don't normally have geo indexes which 
would have to change then.


More information about the dev mailing list