On Sat, Sep 13, 2008 at 09:27:22AM +0200, Jiri Klement wrote: > >> 2) Draw icon in area center only when there is no node inside of area > >> with the same tags. > > > > I wouldn't bother about this, I've mostly seen this where you have a > > parking space that's input twice, as both area and node. That was > > basically a renderer workaround for before the renderers did symbols > > for areas. > > Yes, it's workaround and if rendering rules stayed the same as now, it > will be unnecessary. But I was thinking I will add support for more > features applicable to both nodes and areas. For example big > place_of_worship is usually tagged as both node and area. If I change > rendering rules to add area symbol, I'll get thousands of churches > with two icons.
Then the solution is again to fix the data, imho. > > If we want to do anything about these nodes at all I'd rather convert > > them into labels using the relation, thus actually fixing the data > > instead of adding a workaround to handle an old workaround. > > This will be cleaner solution, but I'm afraid there is already too much data. I wasn't thinking about doing this manually, but with a script that goes over the planet and changes everything. I think scripts to do that kind of fixing exist somewhere. > >> Checking whether point is inside of polygon is quite simple, it should > >> be possible to do in xslt in reasonable time. Anyway I'm planing to > >> extend area-center preprocessor help osmarender with it. > > > > Point-in-polygon is not all that simple, it's definitely not cheap > > (pretty much no matter how you implement it). > > I think it's quite cheap. You get points in boundbox, it should be > just one XPath query. Then you make horizontal line going through > every point and count number of intersections with area edges. If the > number is odd, then point is inside of polygon. I think it's something like O(n^2) plus a bit with n being the number of nodes in the polygon. That's not my idea of cheapness. Just so you know there is a reason why I made the areacenter wrapper not try running the fancy areacenter on anything with more than X nodes, and it's precisely these kinds of calculations. -- Knut Arne Bjørndal aka Bob Kåre [EMAIL PROTECTED] [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/listinfo/tilesathome
