Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I force latin names for countries like Greece or China? #406

Open
gsontheimer opened this issue Jan 6, 2024 · 6 comments
Open

How do I force latin names for countries like Greece or China? #406

gsontheimer opened this issue Jan 6, 2024 · 6 comments

Comments

@gsontheimer
Copy link

The title says it all. Is there an environment variable I can set to force latin names?

@Istador
Copy link
Contributor

Istador commented Jan 6, 2024

No, there isn't an environment variable for it.

Also see #24

@gsontheimer
Copy link
Author

Well, then that would be something to add to the Docker code, so that an environment Variable could be used to force Latin names.

@Istador
Copy link
Contributor

Istador commented Jan 8, 2024

This will likely never happen, because we'd need to rewrite/adjust the SQL queries that are defined in the osm-carto repo for that. Doing that binds us harder to a specific version, which makes updating that dependency harder.

Maybe there is another style that already does this, that you can easily use instead?

@YosefCohen877
Copy link

YosefCohen877 commented Apr 10, 2024

i did it like this update to Hebrew and if not success to English -

docker run \
-e DOWNLOAD_PBF=https://download.geofabrik.de/asia/israel-and-palestine-latest.osm.pbf \
-v /home/debian/gis:/data/database/ \
overv/openstreetmap-tile-server \
import

docker run \
-p 8080:80 \
-v /home/debian/gis:/data/database/ \
-d overv/openstreetmap-tile-server \
run

docker exec -it name bash
psql -h localhost -U renderer gis
the password is - "renderer"

save it to "/convert.sql"

BEGIN;
UPDATE planet_osm_point SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_line SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_polygon SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_roads SET name = COALESCE(tags->'name:he', tags->'name:en', name);
COMMIT;

\i /convert.sql

exit
docker restart name

@Istador
Copy link
Contributor

Istador commented Apr 13, 2024

BEGIN;
UPDATE planet_osm_point SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_line SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_polygon SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_roads SET name = COALESCE(tags->'name:he', tags->'name:en', name);
COMMIT;

I just want to point out that this would not work with automatic updates turned on (you don't have it enabled in your posted commands, so that's fine), because the updates would revert it for changed entries. You'd need to re-run these update queries regularly or need to add them to the update script to be persistent.

@YosefCohen877
Copy link

BEGIN;
UPDATE planet_osm_point SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_line SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_polygon SET name = COALESCE(tags->'name:he', tags->'name:en', name);
UPDATE planet_osm_roads SET name = COALESCE(tags->'name:he', tags->'name:en', name);
COMMIT;

I just want to point out that this would not work with automatic updates turned on (you don't have it enabled in your posted commands, so that's fine), because the updates would revert it for changed entries. You'd need to re-run these update queries regularly or need to add them to the update script to be persistent.

My env is offline so its ok..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants