From bd0b65b6ae45d5f3d525dd363f643bc034efc5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Thu, 16 Jul 2020 17:23:27 +0200 Subject: [PATCH] Add temporary SQL fix for mapnik-german-l10n https://github.com/giggls/mapnik-german-l10n/issues/54 --- .../mapnik-german-l10n_fix_perf2.sql | 14 ++++++++++++++ layers/transportation/transportation.yaml | 1 + 2 files changed, 15 insertions(+) create mode 100644 layers/transportation/mapnik-german-l10n_fix_perf2.sql diff --git a/layers/transportation/mapnik-german-l10n_fix_perf2.sql b/layers/transportation/mapnik-german-l10n_fix_perf2.sql new file mode 100644 index 000000000..17ee7a6f7 --- /dev/null +++ b/layers/transportation/mapnik-german-l10n_fix_perf2.sql @@ -0,0 +1,14 @@ +CREATE or REPLACE FUNCTION osml10n_geo_translit(name text, place geometry DEFAULT NULL) RETURNS TEXT AS $$ + BEGIN + -- RAISE LOG 'going to transliterate %', name; + IF (place IS NULL) THEN + return osml10n_cc_transscript(name,'aq'); + ELSE + /* + Look up the country where the geometry is located + */ + return(osml10n_cc_transscript(name,NULL)); + + END IF; + END; +$$ LANGUAGE plpgsql STABLE; diff --git a/layers/transportation/transportation.yaml b/layers/transportation/transportation.yaml index 4e0caf8ea..c9a53dfaa 100644 --- a/layers/transportation/transportation.yaml +++ b/layers/transportation/transportation.yaml @@ -209,6 +209,7 @@ layer: srid: 900913 query: (SELECT geometry, class, subclass, network, oneway, ramp, brunnel, service, access, toll, expressway, layer, level, indoor, bicycle, foot, horse, mtb_scale, surface FROM layer_transportation(!bbox!, z(!scale_denominator!))) AS t schema: + - ./mapnik-german-l10n_fix_perf2.sql - ./network_type.sql - ./class.sql - ./highway_name.sql