[OSM-dev] C++ implementation of the API

Tom Hughes tom at compton.nu
Fri May 30 08:53:13 BST 2008


In message <44d06e000805300027y1e35fb78q517e5f4877b8012a at mail.gmail.com>
        Alex Wilson <alex_wilson at pobox.com> wrote:

> I'm taking the printf method below - except streaming out using the apache
> module interface rather than stdout. I'm also streaming as much stuff from
> the db as possible (nodes, ways, . However I believe for the map query
> there's a trade-off between local process memory usage and minimising db
> queries: For instance when outputting the ways, one can either have
> previously built up a local dictionary of way ids to way tag key-value
> pairs, or one can query the db each time for the tags for each way. I've
> chosen the former - because in C/C++ I think the overhead of storing the
> strings locally is fairly minimal.

Can't you use a join to fetch the tags along with the ways and then
stream the ways along with their tags?

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list