Mercurial > gemma
changeset 3739:e1bd5391a4b8
Use correct existing function to convert ISRS code to string.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Mon, 24 Jun 2019 11:58:08 +0200 |
parents | 9f20d2b59d4c |
children | 6f1d5f310e08 |
files | schema/search_functions.sql |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/search_functions.sql Mon Jun 24 11:56:38 2019 +0200 +++ b/schema/search_functions.sql Mon Jun 24 11:58:08 2019 +0200 @@ -21,7 +21,7 @@ SELECT COALESCE(json_agg(r),'[]') INTO _result FROM (SELECT (location_code).hectometre || ' rhm' AS name, - replace(concat(location_code), ',','') AS locationcode, + isrs_asText(location_code) AS locationcode, ST_AsGeoJSON(geom)::json AS geom, 'rhm' AS type FROM waterway.distance_marks_virtual WHERE (location_code).hectometre = search_string::int) r; @@ -29,7 +29,7 @@ SELECT COALESCE(json_agg(r),'[]') INTO _result FROM (SELECT (location_code).hectometre || ' rhm' AS name, - replace(concat(location_code), ',','') AS locationcode, + isrs_asText(location_code) AS locationcode, ST_AsGeoJSON(geom)::json AS geom, 'rhm' AS type FROM waterway.distance_marks_virtual WHERE location_code = isrs_fromText(search_string)) r;