kopia lustrzana https://github.com/openmaptiles/openmaptiles
Add roads from NaturalEarth
rodzic
d5b683a0d1
commit
77e6e12821
36
data.yml
36
data.yml
|
@ -89,6 +89,42 @@ Layer:
|
||||||
properties:
|
properties:
|
||||||
"buffer-size": 4
|
"buffer-size": 4
|
||||||
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
|
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
|
||||||
|
- id: road
|
||||||
|
Datasource:
|
||||||
|
dbname: osm
|
||||||
|
extent: -20037508.34,-20037508.34,20037508.34,20037508.34
|
||||||
|
geometry_field: geom
|
||||||
|
geometry_table: ''
|
||||||
|
host: db
|
||||||
|
key_field: ''
|
||||||
|
key_field_as_attribute: ''
|
||||||
|
max_size: 512
|
||||||
|
password: osm
|
||||||
|
port: 5432
|
||||||
|
srid: ''
|
||||||
|
table: |-
|
||||||
|
( SELECT *
|
||||||
|
FROM (
|
||||||
|
SELECT * FROM road_z4 WHERE z(!scale_denominator!) = 4
|
||||||
|
UNION ALL
|
||||||
|
SELECT * FROM road_z5 WHERE z(!scale_denominator!) = 5
|
||||||
|
UNION ALL
|
||||||
|
SELECT * FROM road_z6 WHERE z(!scale_denominator!) = 6
|
||||||
|
UNION ALL
|
||||||
|
SELECT * FROM road_z7 WHERE z(!scale_denominator!) >= 7
|
||||||
|
) AS road
|
||||||
|
WHERE geom && !bbox!
|
||||||
|
) AS data
|
||||||
|
type: postgis
|
||||||
|
user: osm
|
||||||
|
description: Buildings
|
||||||
|
fields:
|
||||||
|
featureclass: String
|
||||||
|
scalerank: Number
|
||||||
|
type: String
|
||||||
|
properties:
|
||||||
|
"buffer-size": 4
|
||||||
|
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
|
||||||
- id: building
|
- id: building
|
||||||
Datasource:
|
Datasource:
|
||||||
dbname: osm
|
dbname: osm
|
||||||
|
|
|
@ -19,6 +19,7 @@ function main() {
|
||||||
exec_psql_file "layers/water.sql"
|
exec_psql_file "layers/water.sql"
|
||||||
exec_psql_file "layers/building.sql"
|
exec_psql_file "layers/building.sql"
|
||||||
exec_psql_file "layers/boundary.sql"
|
exec_psql_file "layers/boundary.sql"
|
||||||
|
exec_psql_file "layers/road.sql"
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
CREATE OR REPLACE VIEW ne_10m_global_roads AS (
|
||||||
|
SELECT geom, scalerank, featurecla as featureclass, type
|
||||||
|
FROM ne_10m_roads WHERE continent <> 'North America'
|
||||||
|
UNION ALL
|
||||||
|
SELECT geom, scalerank, class as featureclass, type
|
||||||
|
FROM ne_10m_roads_north_america
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW road_z4 AS (
|
||||||
|
SELECT *
|
||||||
|
FROM ne_10m_global_roads
|
||||||
|
WHERE scalerank <= 4
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW road_z5 AS (
|
||||||
|
SELECT *
|
||||||
|
FROM ne_10m_global_roads
|
||||||
|
WHERE scalerank <= 5
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW road_z6 AS (
|
||||||
|
SELECT *
|
||||||
|
FROM ne_10m_global_roads
|
||||||
|
WHERE scalerank <= 6
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW road_z7 AS (
|
||||||
|
SELECT *
|
||||||
|
FROM ne_10m_global_roads
|
||||||
|
WHERE scalerank <= 7
|
||||||
|
);
|
Ładowanie…
Reference in New Issue