diff --git a/conf/search.conf.part b/conf/search.conf.part index 7125077..aaf79f4 100644 --- a/conf/search.conf.part +++ b/conf/search.conf.part @@ -288,7 +288,7 @@ 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('', plz, ' - ', trim(langtext), '') as label \ @@ -296,17 +296,17 @@ source src_zipcode : src_swisssearch , '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