Skip to content

Commit 9a67970

Browse files
author
robertd99
authored
Merge pull request #27 from OpenHistoricalDataMap/RobertDreyer
Robert dreyer
2 parents a794c4e + 7c94ed9 commit 9a67970

File tree

6 files changed

+301
-94
lines changed

6 files changed

+301
-94
lines changed
3.16 KB
Binary file not shown.

out/production/OSMImportUpdate/ohdm2geoserverrendering/resources/sqls/landusages.sql

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -78,61 +78,6 @@ OR subclassname = 'village_green') as c
7878
WHERE gg.type_target = 3 AND g.id = gg.id_target AND o.id = gg.id_geoobject_source AND c.id = gg.classification_id;
7979

8080
/* LINES */
81-
INSERT INTO
82-
83-
my_test_schema.my_landusages(geometry, object_id, geom_id, classid, type, name, valid_since, valid_until, tags, user_id, religion, area, layer, z_order)
84-
85-
SELECT
86-
87-
g.geometry, o.id as object_id, g.id as geom_id, c.id as classid, c.subclassname, o.name, gg.valid_since,
88-
gg.valid_until, gg.tags, gg.user_id, gg.religion, St_Area(g.geometry,true), CAST(gg.layer as integer), CAST(gg.z_order as integer)
89-
90-
FROM
91-
92-
(SELECT id, name from ohdm.geoobject) as o,
93-
94-
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id,
95-
tags -> 'religion' as religion,
96-
tags -> 'layer' as layer,
97-
tags -> 'z_order' as z_order FROM ohdm.geoobject_geometry) as gg,
98-
99-
(SELECT id, line as geometry FROM ohdm.lines) as g,
100-
101-
/* hier jeweils ohdm.polygons, lines, points*/
102-
103-
(SELECT id, subclassname FROM ohdm.classification WHERE subclassname = 'commercial'
104-
OR subclassname = 'construction'
105-
OR subclassname = 'industrial'
106-
OR subclassname = 'residential'
107-
OR subclassname = 'retail'
108-
OR subclassname = 'allotments'
109-
OR subclassname = 'farmland'
110-
OR subclassname = 'farmyard'
111-
OR subclassname = 'forest'
112-
OR subclassname = 'meadow'
113-
OR subclassname = 'orchard'
114-
OR subclassname = 'vineyard'
115-
OR subclassname = 'basin'
116-
OR subclassname = 'brownfied'
117-
OR subclassname = 'cementry'
118-
OR subclassname = 'depot'
119-
OR subclassname = 'garages'
120-
OR subclassname = 'grass'
121-
OR subclassname = 'greenfield'
122-
OR subclassname = 'greenhous_horticulture'
123-
OR subclassname = 'landfill'
124-
OR subclassname = 'military'
125-
OR subclassname = 'plant_nursery'
126-
OR subclassname = 'port'
127-
OR subclassname = 'quarry'
128-
OR subclassname = 'railway'
129-
OR subclassname = 'recreation_ground'
130-
OR subclassname = 'religious'
131-
OR subclassname = 'reservoir'
132-
OR subclassname = 'salt_pond'
133-
OR subclassname = 'village_green') as c
134-
135-
WHERE gg.type_target = 2 AND g.id = gg.id_target AND o.id = gg.id_geoobject_source AND c.id = gg.classification_id;
13681

13782

13883
/* POINTS */

out/production/OSMImportUpdate/ohdm2geoserverrendering/resources/sqls/waterarea.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ FROM
2424

2525
(SELECT id, name from ohdm.geoobject) as o,
2626

27-
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 672) as gg,
27+
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 839) as gg,
2828

2929
(SELECT id, polygon as geometry FROM ohdm.polygons WHERE ST_IsValid(polygon) = '1') as g,
3030

3131
/* hier jeweils ohdm.polygons, lines, points*/
3232

33-
(SELECT id, subclassname FROM ohdm.classification where id = 672) as c
33+
(SELECT id, subclassname FROM ohdm.classification where id = 839) as c
3434

3535
WHERE gg.type_target = 3 AND g.id = gg.id_target AND o.id = gg.id_geoobject_source AND c.id = gg.classification_id;
3636

@@ -49,13 +49,13 @@ FROM
4949

5050
(SELECT id, name from ohdm.geoobject) as o,
5151

52-
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 672) as gg,
52+
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 839) as gg,
5353

5454
(SELECT id, line as geometry FROM ohdm.lines) as g,
5555

5656
/* hier jeweils ohdm.polygons, lines, points*/
5757

58-
(SELECT id, subclassname FROM ohdm.classification where id = 672) as c
58+
(SELECT id, subclassname FROM ohdm.classification where id = 839) as c
5959

6060
WHERE gg.type_target = 2 AND g.id = gg.id_target AND o.id = gg.id_geoobject_source AND c.id = gg.classification_id;
6161

@@ -75,13 +75,13 @@ FROM
7575

7676
(SELECT id, name from ohdm.geoobject) as o,
7777

78-
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 672) as gg,
78+
(SELECT id_target, classification_id, type_target, id_geoobject_source, valid_since, valid_until, tags, source_user_id as user_id FROM ohdm.geoobject_geometry where classification_id = 839) as gg,
7979

8080
(SELECT id, point as geometry FROM ohdm.points) as g,
8181

8282
/* hier jeweils ohdm.polygons, lines, points*/
8383

84-
(SELECT id, subclassname FROM ohdm.classification where id = 672) as c
84+
(SELECT id, subclassname FROM ohdm.classification where id = 839) as c
8585

8686
WHERE gg.type_target = 1 AND g.id = gg.id_target AND o.id = gg.id_geoobject_source AND c.id = gg.classification_id;
8787

0 commit comments

Comments
 (0)