[OSM-dev] possible changes to osmarender.xsl
xaa+openstreetmap at dohd.org
Sat Sep 29 17:35:02 BST 2007
> On 9/29/07, *Mark Huizer* <xaa+openstreetmap at dohd.org
> <mailto:xaa+openstreetmap at dohd.org>> wrote:
> 80n wrote:
> > DVC! Cool.
> Hmm, my 5 minute googling for DVC was not really successful, but
> I'll assume it's good :-)
> DVC = divide-and-conquer which is a name often used for the algorithm
> you have implemented. See:
Ah, ok, yeah, I know that's what I implemented, just couldn't get the abbreviation figured out :-)
> I was adviced to see if the osmarender 5 code had already fixed this
> or might need this as well. Maybe you can tell?
> It would be applicable to Osmarender 5. I assumed you were working on
> the Osmarender 5 code base. I'm not maintaining any of the previous
Ah, ok, I'll keep it around for when osmarender 5 hits the road then. That was in a few weeks, if I'm not mistaken. Or I could see if I can find the right version :) Wiki, here I come!
> b. I'm trying to also make this recursion treeshaped, instead of
> using tail recursion so the depth is less, but I don't see a way to
> return 2 values from a call-template call. Any hints?
> It might be better to take a different approach. Calculate the length
> of the text first and then walk the segments until the enough length has
> been processed and then stop. If you also build in a back-stop of, say,
> 200 iterations then the stack problem would also be avoided.
> This would be much quicker than measuring the full length of every path
> and then doing the comparison.
Yep, as long as you make sure it isn't used for anything else. The file Spaetz sent you already does something like that (I wrote that stuff as well, but wasn't satisfied with it). It still errors on some ways, stuff like coastlines, borders etc, I assume. I'd call it differently then, not getPathLength but eeeh, well... checkSufficientLength or whatever. But okay, I'll fix my running version here to include that first version of my changes, add a breakoff point (200 might do) and have it run for a little.
More information about the dev