[OSM-dev] osm2pgsql output possible to work with Java XAPI?
frederik at remote.org
Mon May 30 16:17:44 BST 2011
On 05/30/11 17:04, Peter Körner wrote:
>> Well... in "slim" mode, osm2pgsql already tracks all nodes and the
>> relationships between nodes, ways, and relations;
> osm2pgsql throws away all objects that don't have the right tags if you
> don't use the hstore features and it don't store way-node and
> relation-member information if you don't use slim-mode.
That was my point. In slim mode, osm2pgsql basically keeps two data sets
- one is the render-optimized geometry data set, the other is a data set
that is very close to the raw OSM data because it is required as the
basis for diff updates. This other data set stores *all* nodes and ways,
and possibly also all relations (not sure about that at the moment). It
doesn't store all tags and metadata (user id etc).
> In general osm2pgsql is targeted at generating a smaller database that
> fits exactly on rendering a style - not for serving an xapi-like query
> service - although the one or the other might be tricked into working
> with the other, they're not made for each other.
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
More information about the dev