Skip to content

Commit

Permalink
Merge pull request #614 from geoadmin/fix_swisssearch_plz
Browse files Browse the repository at this point in the history
fix ortschaften query in swisssearch
  • Loading branch information
ltclm authored Apr 24, 2024
2 parents a1cf84f + b42e52a commit b524cf6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions conf/search.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -288,25 +288,25 @@ source src_zipcode : src_swisssearch
sql_db=stopo_${DBSTAGING}
sql_query = \
SELECT \
gid as id \
os_uuid::int as id \
, os_uuid::text as feature_id \
, plz::text as detail \
, concat('<b>', plz, ' - ', trim(langtext), '</b>') as label \
, NULL as objectclass \
, 'zipcode' as origin \
, quadindex(the_geom) as geom_quadindex \
, box2d(st_transform(the_geom, 21781)) as geom_st_box2d \
, box2d(st_transform(the_geom, 2056)) as geom_st_box2d_lv95 \
, box2d(the_geom) as geom_st_box2d_lv95 \
, 1::integer as rank \
, st_y(st_transform(st_setsrid(st_point(label_x,label_y),2056),21781)) as x \
, st_x(st_transform(st_setsrid(st_point(label_x,label_y),2056),21781)) as y \
, st_y(st_transform(st_setsrid(st_point(label_x,label_y),2056),2056)) as x_lv95 \
, st_x(st_transform(st_setsrid(st_point(label_x,label_y),2056),2056)) as y_lv95 \
, st_y(st_transform(st_setsrid(st_point(label_x,label_y),2056),4326)) as lat \
, st_x(st_transform(st_setsrid(st_point(label_x,label_y),2056),4326)) as lon \
, st_y(st_transform(ST_PointOnSurface(the_geom),21781)) as x \
, st_x(st_transform(ST_PointOnSurface(the_geom),21781)) as y \
, st_y(ST_PointOnSurface(the_geom)) as x_lv95 \
, st_x(ST_PointOnSurface(the_geom)) as y_lv95 \
, st_y(st_transform(ST_PointOnSurface(the_geom),4326)) as lat \
, st_x(st_transform(ST_PointOnSurface(the_geom),4326)) as lon \
, -1 as zoomlevel \
, 1 as num \
FROM vd.gabmo_plz p
FROM vd.amtovz_ortschaften p
}

source src_haltestellen : src_swisssearch
Expand Down

0 comments on commit b524cf6

Please sign in to comment.