Git Product home page Git Product logo

Comments (9)

giggls avatar giggls commented on August 15, 2024

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.

giggls avatar giggls commented on August 15, 2024

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.

amisha2016 avatar amisha2016 commented on August 15, 2024

@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

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.

giggls avatar giggls commented on August 15, 2024

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.

amisha2016 avatar amisha2016 commented on August 15, 2024

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.

giggls avatar giggls commented on August 15, 2024

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.
foo

from mapnik-german-l10n.

amisha2016 avatar amisha2016 commented on August 15, 2024

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

pla

Changes in OSMBright.xml

osm

May be I am doing some silly mistake in your perspective but still help me.

from mapnik-german-l10n.

giggls avatar giggls commented on August 15, 2024

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.

Bibi56 avatar Bibi56 commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.