Comments (9)
This code is designed for latin aphabet target languages in mind. Thus it may well behave in strange ways using target languages like hindi which are usually not written in latin!
Have a look at my presentation from FOSS4G linked in the wiki to see what this is all about.
https://github.com/giggls/mapnik-german-l10n/wiki
You might probably be better off using COALESCE function instead of my code:
SELECT COALESCE(tags->'name:hi',tags->'name:en',name) from ...
This works for me:
SELECT COALESCE(tags->'name:hi',tags->'name:en',name) from planet_osm_point where osm_id=537966705;
Concerning the osml10n_get_country function (which is currently used only for determination of which transliteration mechanism to use) it looks like the India polygon in country_osm_grid might be broken. This is taken verbatim from nominatim. I just submitted a bug there:
osm-search/Nominatim#616
from mapnik-german-l10n.
A second comment. I forgot to mention, that I would of course be happy to help making this code usable for non latin language targets. Make shure to watch the video, then we might be able to define the naming conventions for a hindi language map afterwards.
from mapnik-german-l10n.
@giggls Thanks for your reply
I have tried COALESCE function also but problem not solved. I am able to see the output in my database but not to the map in browser.
gis=# SELECT COALESCE(tags->'name:hi',tags->'name:en',name) from planet_osm_polygon where name='India';
coalesce
----------
त
(1 row)
Map on browser
I am confuse that whether it is the problem of the module mod_tile or postrgesql only.
I would also be happy to do the task with you.
from mapnik-german-l10n.
To see the output in the map the renderer Software has to use the correct database queries.
E.g. in Geman style I use database views providing "columns" called localized_name_second and such.
See https://github.com/giggls/openstreetmap-carto-de/tree/master/views_osmde
E.g. a style has to use something like "select COALESCE(tags->'name:hi',tags->'name:en',name) as name from ..." instead of just using "select name from ...".
I recommend using views as well. This way you can "redirect" selections of "name" column in standard style to a localized form of name using COALESCE or one of my functions provided here without changing the queries in the style itself.
from mapnik-german-l10n.
I think I have done in the same way as you explained above but forgot to mention here. I have changed the command in the file OSMBright.xml to "select COALESCE(tags->'name:hi',tags->'name:en',name) as name ..." and as I have said above I was succeeded in viewing the map in browser in latin language but not in my own language.
from mapnik-german-l10n.
It just tried the naive approach of changing the 'de' to 'hi' in the views mentioned above. Even this seems to mostly work (see attached screenshot from kosmtik) As I already said I recommend using views.
from mapnik-german-l10n.
I am unable to understand that why I have to create view if I have relation with the same name. Should I have to clone the repo https://github.com/giggls/openstreetmap-carto-de and do all the changes they have explained.
The overall changes I have done is shown below.
Changes in relation planet_osm_polygon
Changes in OSMBright.xml
May be I am doing some silly mistake in your perspective but still help me.
from mapnik-german-l10n.
Hm OSMBright is vector tiles, right? I am not yet very familiar with vector tiles. This said: When using vector tiles you have to re-create them after changing an SQL query.
from mapnik-german-l10n.
The issue seems to be a font issue, as the letters are replaced by squares. Be sure the selected font supports Indi characters.
@giggls, with Tessera (for instance) you can deliver vector tiles or bitmap tiles from the same source (PostGres/PostGIS, shapefiles, ...) using Mapnik for server rendering or delivering MVT for client rendering.
from mapnik-german-l10n.
Related Issues (20)
- This extension was added to GCP's request list, need your support.
- Mention curl as a dependency HOT 1
- Rendering tiles with English labels when they are available HOT 11
- Symbol not found HOT 16
- Replace Thai transliteration library HOT 5
- Abkürzungen für Strassen / Orte in Französisch HOT 48
- Easy use in "CartoOSM" ? HOT 3
- More french abbreviations - How to proceed? HOT 5
- Spanish minimal abbrev. - "Calle => C."
- Superscript code HOT 2
- Chinese romanization in Hong Kong and Macau area HOT 15
- If there is no name:de use old_name:de HOT 5
- tail +3 HOT 2
- cat -s can't run in alpine linux
- osml10n_get_streetname_from_tags seems to be slower since v2.5.7 HOT 37
- Some thoughts about the future of this project HOT 13
- Performace of osml10n_get_name_without_brackets_from_tags HOT 5
- `make deb` changes a file which is under version control. HOT 1
- Error with missing column in views HOT 2
- build problems when multiple postgresql versions are installed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapnik-german-l10n.