On 22 June 2010 01:15, Phil! Gold <[email protected]> wrote: > I've got a PostGIS database created and maintained with osm2pgsql. For > some of the Mapnik rendering I'm doing, I'd like to see whether ways > belong to relations. (Specifically, whether a highway=* way is a member > of a route=road relation.) I've been able to look in the planet_osm_rels > table for relation membership, but the members are stored in an array, and > searching those arrays for membership, even on a bbox-restricted subset, > is really slow. Is there any way to do this faster? If not, I suppose I > can file a feature request against osm2pgsql for an indexed relation > membership table.
osm2pgsql probably isn't the best tool for the job, relations get stored as geometries in the database, rather than meta information cross referencing the ways. What you are after is a database structure similar/the same as the main OSM DB to be able to do this kind of interrogation rather than trying to interrogated pre-processed information which has lost some/a lot of non-desirable attributes to make rendering faster. _______________________________________________ talk mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk

