[OSM-dev] Suggestion about country specific maps
Peter Körner
osm-lists at mazdermind.de
Wed Oct 6 08:08:17 BST 2010
Am 06.10.2010 08:40, schrieb Jaak Laineste:
> Can you share your experiences with this. We are doing exactly this
> (global OSM map in Estonian and possibly also in some very local
> dialects) right now. My initial plan is quite simplistic:
Not much other then: it works.
> 1.modify style file of osm2pgsql to import name:et tags in addition to name
> 2.update planet_osm_x set name=name:et where name:et is not null;
> update planet_osm_x set name=name:en where name:en is not null; The
> last one should make e.g. Israel readable for us: they have names in
> Hebrew by default, but mostly have also English names
I wouldn't do it that way because you wont be able to keep the database
updated. Instead of the two updates you can use the COALESCE function of
Postgres:
SELECT COALESCE("name:et", "name:en", "name") AS name FROM ...
> 3. use the same stylesheet without modification
You could either modify the SQL queried in the Stylesheet to use the
COALESCE function or create a view in Postgres and just change the
%prefix; in the stylesheet.
When you only want one map, the second approach would be better because
you could update the stylesheet from osm-svn. We took the first approach
because we didn't want to have 4 views for each language.
> 4. finetune style to be better fit for names (mostly local
> administrative system) and some other minor improvements. Maybe we'll
> add hillshading and some other local-specific data.
You can take the hillshading overlay ftom the toolserver if you want
[2], [3].
> 5. use local projection instead of global Mercator (just a wild idea).
This is possible but you will get problems with the tile-naming.
> We have just set up a server platform, and have not the localization
> part, can you comment what can possibly fail here, or what was your
> toolchain?
We use the normal toolchain for a mapnik tileserver:
osmosis -> osm2pgsql with hstore -> postgis -> tirex -> mapnik with
stylesheet [4].
Peter
[1]
<http://www.postgresql.org/docs/8.1/static/functions-conditional.html#AEN12663>
[2] <http://toolserver.org/~cmarqu/hill/{z}/{x}/{y}.png
[3]
<http://toolserver.org/~osm/styles/?layers=00B0F0FT0000F0FFFF&zoom=12&lat=59.38558&lon=24.72937>
[4] <http://svn.toolserver.org/svnroot/p_osm/styles/osm-locale/>
More information about the dev
mailing list