On the first zoom levels, I'm using the capital=* tag to select the country capitals, then sorting them with decreasing population. It is a very small number of objects, that can easily be maintained.
The postgis query is here: https://github.com/cquest/osmfr-cartocss/blob/master/osmfr-cartocss.mml#L2070 If you remove the FR specific part, it looks like: (SELECT way, place, name, cast(regexp_replace('0' || population,'[^0-9]','','g') AS bigint) AS pop, coalesce(tags->'is_capital', (CASE WHEN coalesce(admin_level, capital)='2' THEN 'country' WHEN coalesce(admin_level, capital)='4' THEN 'state' ELSE NULL END)) AS is_capital FROM planet_osm_point WHERE place IS NOT NULL AND place IN ('city', 'town') AND (tags->'is_capital' IN ('country', 'state') OR capital IN ('2', '4') OR (capital='yes' AND admin_level IN ('2', '4'))) ORDER BY is_capital, place, pop DESC) AS placenames As it is a bit a mess in the capital/is_capital tags so I had to use this long coalesce/case to deal with different tagging. As you can see it uses the place=* tag + is_capital/capital + population. The result looks ok to me: http://tile.openstreetmap.fr/?zoom=5&lat=43.52781&lon=4.22487&layers=B0000000FFFFFFF At zoom 4, I just put a black dot for capitals. Starting at zoom 6 there is an additional placenames layer to "fill" empty spaces. This avoid large areas with no names at all due to hard cuts in place=* tags. Many areas in the world have far less population than in Europe so the stylesheet has to adapt to this. Compare: osm.org: http://tile.openstreetmap.fr/?zoom=6&lat=23.87977&lon=-4.41038&layers=00B00000FFFFFFF mapquest: http://tile.openstreetmap.fr/?zoom=6&lat=23.87977&lon=-4.41038&layers=000B0000FFFFFFF osm-fr: http://tile.openstreetmap.fr/?zoom=6&lat=23.87977&lon=-4.41038&layers=B0000000FFFFFFF 2014-07-14 11:54 GMT+02:00 moltonel 3x Combo <[email protected]>: > On 14/07/2014, Martin Koppenhoefer <[email protected]> wrote: > >> Am 13/lug/2014 um 22:29 schrieb moltonel 3x Combo <[email protected]>: > >> > >> If osm is missing placename population figures, > > > > deducting the importance from population alone doesn't hit it, and adding > > ranks is generally disputed by many mappers (subjective), so here there > is > > no easy solution. IMHO there is not even a complicated solution, as it is > > indeed subjective how to weight different aspects like economy, politics, > > transportation, communication, religion, ... > > Indeed it's a thorny subject, but delegating the decision to NE sounds > like a cop-out. Whatever hard data NE used in it decision making > (population, area, administrative status, connectedness...) should be > available in OSM, and the subjective algorythm that takes this data to > output a global place ranking could go either in the style or in a > common extraction script. > > For that matter, how does the osmfr style do its place ranking ? > > _______________________________________________ > talk mailing list > [email protected] > https://lists.openstreetmap.org/listinfo/talk > -- Christian Quest - OpenStreetMap France
_______________________________________________ talk mailing list [email protected] https://lists.openstreetmap.org/listinfo/talk

