From 882e704d5a902e5bed5f78d8b8c4f71a901f4de1 Mon Sep 17 00:00:00 2001 From: "osm@osm.rrze" Date: Tue, 7 Aug 2012 12:30:38 +0200 Subject: [PATCH] optimize database queries - a lot (they were gigantic because they were copy+paste from some significantly larger rendering) --- styles/mapnik-osm-data/rrze-overlay.xml | 42 +++---------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/styles/mapnik-osm-data/rrze-overlay.xml b/styles/mapnik-osm-data/rrze-overlay.xml index bbd8fcd..d8841c0 100644 --- a/styles/mapnik-osm-data/rrze-overlay.xml +++ b/styles/mapnik-osm-data/rrze-overlay.xml @@ -25,17 +25,9 @@ points - (select way,amenity,shop,tourism,highway,man_made,access,religion,waterway,lock,historic,leisure + (select way,amenity,access from &prefix;_point where amenity is not null - or shop is not null - or tourism in ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet') - or highway in ('bus_stop','traffic_signals','ford') - or man_made in ('mast','water_tower') - or historic in ('memorial','archaeological_site') - or waterway='lock' - or lock='yes' - or leisure in ('playground','slipway') ) as points &datasource-settings; @@ -44,15 +36,9 @@ points - (select way,amenity,shop,tourism,highway,man_made,access,religion,waterway,lock,historic,leisure + (select way,amenity,access from &prefix;_polygon where amenity is not null - or shop is not null - or tourism in ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet') - or highway in ('bus_stop','traffic_signals') - or man_made in ('mast','water_tower') - or historic in ('memorial','archaeological_site') - or leisure='playground' ) as points &datasource-settings; @@ -63,20 +49,9 @@ text - (select way,amenity,shop,access,leisure,landuse,man_made,"natural",place,tourism,ele,name,ref,military,aeroway,waterway,historic,'yes'::text as point + (select way,amenity,access,name,ref,'yes'::text as point from &prefix;_point where amenity is not null - or shop in ('supermarket','bakery','clothes','fashion','convenience','doityourself','hairdresser','department_store','butcher','car','car_repair','bicycle','florist') - or leisure is not null - or landuse is not null - or tourism is not null - or "natural" is not null - or man_made in ('lighthouse','windmill') - or place='island' - or military='danger_area' - or aeroway='gate' - or waterway='lock' - or historic in ('memorial','archaeological_site') ) as text &datasource-settings; @@ -86,18 +61,9 @@ text - (select way,aeroway,shop,access,amenity,leisure,landuse,man_made,"natural",place,tourism,NULL as ele,name,ref,military,waterway,historic,'no'::text as point + (select way,access,amenity,NULL as ele,name,ref,'no'::text as point from &prefix;_polygon where amenity is not null - or shop in ('supermarket','bakery','clothes','fashion','convenience','doityourself','hairdresser','department_store', 'butcher','car','car_repair','bicycle') - or leisure is not null - or landuse is not null - or tourism is not null - or "natural" is not null - or man_made in ('lighthouse','windmill') - or place='island' - or military='danger_area' - or historic in ('memorial','archaeological_site') ) as text &datasource-settings; -- 2.25.1