source: subversion/applications/rendering/mapnik/setup_z_order.sql @ 8229

Last change on this file since 8229 was 2698, checked in by artem, 13 years ago

fixed layering problem with parking symbols
NOTE: requires running new setup_z_order.sql

File size: 1.8 KB
Line 
1begin;
2delete from planet_osm_polygon where "natural" = 'coastline';
3update planet_osm_line set layer=0 where layer is null;
4update planet_osm_line set layer=0 where layer is null or layer !~ '^[0-9+-]+$';
5Update planet_osm_line set z_order= 10*int4(layer) + 9 where highway='motorway' or highway='motorway_link';
6update planet_osm_line set z_order= 10*int4(layer) + 8 where highway='trunk' or highway='trunk_link';
7update planet_osm_line set z_order= 10*int4(layer) + 7 where highway='primary' or highway='primary_link';
8update planet_osm_line set z_order= 10*int4(layer) + 6 where highway='secondary' or highway='secondary_link';
9update planet_osm_line set z_order= 10*int4(layer) + 5 where char_length(railway) > 0;
10update planet_osm_line set z_order= 10*int4(layer) + 4 where highway='tertiary' or highway='tertiary_link';
11update planet_osm_line set z_order= 10*int4(layer) + 3 where highway='residential' or highway='minor' or highway='unclassified';
12update planet_osm_line set z_order= z_order + 10  where bridge = 'true';
13update planet_osm_line set z_order= z_order + 10  where bridge = 'yes';
14commit;
15begin;
16insert into planet_osm_point(osm_id,name,amenity,way) select osm_id,name,amenity,centroid(way) from planet_osm_polygon where amenity='parking';
17end;
18delete from geometry_columns where f_table_name='planet_osm_roads';
19drop table planet_osm_roads ;
20create table planet_osm_roads as select * from planet_osm_line where highway='motorway' or highway='motorway_link' or highway='trunk' or highway='trunk_link' or highway='primary' or highway='primary_link' or highway='secondary' or highway='secondary_trunk' or char_length(railway) > 0;
21insert into geometry_columns values('','public','planet_osm_roads','way',2,4326,'LINESTRING');
22create index planet_osm_roads_spidx on planet_osm_roads using GIST (way GIST_GEOMETRY_OPS);
23vacuum analyze planet_osm_roads;
Note: See TracBrowser for help on using the repository browser.