[OSM-dev] API: no BBOX download of a way if no nodes inside the BBOX?
brett at bretth.com
Sun Apr 26 23:56:40 BST 2009
Frederik Ramm wrote:
> Matt Amos wrote:
>> On Sun, Apr 26, 2009 at 9:16 PM, Frederik Ramm <frederik at remote.org> wrote:
>>> I think it would be promising to set up a daily/hourly/minutely diff
>>> based API mirror outside of the OSM empire that uses proper PostGIS
>>> geometries so we could do performance comparisons.
>> i did a simple performance comparison of our tile-based btree node
>> lookup versus a proper postgis r-tree. the r-tree was twice as slow.
> It is possible that these effects would be offset by PostGIS being able
> to include way geometries in the index, thus allowing us to drop the
> node->way indirection we currently employ.
> It is of course equally possible that this is even slower.
If anybody wishes to test some PostGIS magic out without too much effort
you may wish to look into the existing 0.6-based Osmosis pgsql schema.
It allows optional bbox and linestring columns to be created on the way
table. The --write-pgsql and --write-pgsql-dump tasks (one writes
direct, the other creates bulk import files) both support optional
in-memory geometry calculation functionality which if you have 6GB RAM
or greater will let you create the columns very quickly. If not you'll
have to rely on either a temp file approach (medium speed) or raw SQL
update queries (very slow). The key difference between this schema and
the main API schema (PostGIS aside) is that it doesn't support history,
otherwise it is layed in in a similar fashion (ie.
If you want any further info let me know.
More information about the dev