[OSM-talk] Mapping Qs: Hotel Complex? Beach? Enclosed Woodland?

Jon Burgess jburgess777 at googlemail.com
Wed Aug 22 22:33:14 BST 2007


On Wed, 2007-08-22 at 14:18 +0100, Tom Chance wrote:
> 80n wrote:
> > However, we are missing any kind of specification of priority for 
> > overlapping landuse elements.  Should we just say that the render 
> > order is residential, commercial, industrial,... or should the render 
> > order be undefined, so that layer= has to be used explicitly, or 
> > should the default order be alphabetical? 
> >
> > Or maybe some smarter method, like smaller areas that are completely 
> > enclosed by larger areas get rendered later?
> That smarter method would be ideal. Otherwise / in cases where they 
> overlap, I think that residential, industrial, commercial, retail is as 
> good a default order as any. So long as it's clearly documented in the 
> right places and consistent with what Mapnik does, there's not much more 
> you can do surely?
> 
> Ideally we'd all make sure they didn't overlap unless there was a good 
> reason, as Andy suggests, but I think so many people are tracing huge 
> residential areas and then sticking in smaller other areas that such 
> dedication is a pipedream :)
> 

I've just done some experiments of changing the rules which Mapnik uses
to determine the polygon drawing order. It seems that ordering them by
the enclosed area is probably the solution in many cases. I think you
can ignore the bit about them being 'completely enclosed'. 

I think we still need to obey an explicitly set layer= tag, so the SQL
statement will look something like:

SELECT ... FROM ..polygon ... ORDER BY layer, area(way) DESC

This will make negative layers get rendered first, being overlayed by
more positive layers. In each layer the biggest polygons will render
first and be overlayed by any smaller ones.

	Jon







More information about the talk mailing list