Re: [OSM-talk] mapnik rendering or tagging issue?

2008-10-06 Thread Andy Allan
On Mon, Oct 6, 2008 at 5:28 PM, Ed Loach <[EMAIL PROTECTED]> wrote:
> Stefan asked:
>
>> Is this a problem in mapnik or is it a problem with the OSM
>> data?
>> If the latter, how can I fix it?
>
> It looks like the data is OK. All three are cities, and each is
> tagged as such. I suspect that the lowzoom Mapnik tiles just happen
> to decide that rendering the outer two cities names would overlap
> the name of the middle one, which is Montreal, so drops it.

Yep, it's a common problem. If someone can extend the mapnik
stylesheet and osm2pgsql to do something more clever with place names,
that would be cool.

Zoom levels 4+5 come from VMAP0, hence the ascii-ness. Beyond that,
increasing zoom levels increases the number of types of place names
rendered (cities, towns etc) but there's no priority in placename
rendering. See 
http://trac.openstreetmap.org/browser/applications/rendering/mapnik/osm-template-fontset.xml#L5329
- it would be nice if there was a z-order for points (and an ORDER BY
clause, of course) that reflected that we'd rather draw city names
first, then towns if there were space etc. Even better, we'd probably
want to order cities by population so that a big city next to a
smaller one still gets its name rendered. Such z-order calculations
are probably best done in osm2pgsql, which is where the z-ordering of
road occurs (see
http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/output-pgsql.c#L88
).

Students will achieve extra credit for moving z-ordering into a
run-time configuration file ala default.style :-)

Cheers,
Andy

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] mapnik rendering or tagging issue?

2008-10-06 Thread Ed Loach
Stefan asked:

> Is this a problem in mapnik or is it a problem with the OSM
> data?
> If the latter, how can I fix it?

It looks like the data is OK. All three are cities, and each is
tagged as such. I suspect that the lowzoom Mapnik tiles just happen
to decide that rendering the outer two cities names would overlap
the name of the middle one, which is Montreal, so drops it. 

If we condoned tagging for rendering, you could perhaps move the
node that is used to label Montreal south slightly, so the captions
*might* not overlap, but it's probably best not to worry about it.

I'm wondering whether the Greater Montreal Area [1] is defined as a
region, and if so whether that label would take priority at certain
zoom levels?

Ed
[1] http://en.wikipedia.org/wiki/Greater_Montreal_Area




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] mapnik rendering or tagging issue?

2008-10-06 Thread Stefan Monnier
If you look at
http://openstreetmap.org/?lat=45.52&lon=-73.59&zoom=8&layers=B000FTFT
you should see an urban island labelled "Laval" and "Longueil".  If you
zoom out, only "Laval" is left, while if you zoom in you'll discover
that this is really the island of Montreal.

Is this a problem in mapnik or is it a problem with the OSM data?
If the latter, how can I fix it?


Stefan


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk