source: subversion/utils/mapnik/setup_z_order.sql @ 2262

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

added secondary and secondary_trunk to planet_osm_roads table

File size: 1.7 KB
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';
16delete from geometry_columns where f_table_name='planet_osm_roads';
17drop table planet_osm_roads ;
18create 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;
19insert into geometry_columns values('','public','planet_osm_roads','way',2,4326,'LINESTRING');
20create index planet_osm_roads_spidx on planet_osm_roads using GIST (way GIST_GEOMETRY_OPS);
21vacuum analyze planet_osm_roads;
Note: See TracBrowser for help on using the repository browser.