Skip to content

Commit 7323cc5

Browse files
authored
CWS Translation fixes (#2200)
* CWS Changes refs: #2019 * Fixed DA010 refs: #2019
1 parent bba03c0 commit 7323cc5

File tree

9 files changed

+20940
-20570
lines changed

9 files changed

+20940
-20570
lines changed

plugins/fcode_common.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fcodeCommon = {
147147
['F_CODE','AL175','man_made','courtyard'], // Courtyard
148148
['F_CODE','AL180','shop','kiosk'], // Retail Stand
149149
['F_CODE','AL195','ramp','yes'], // Ramp
150-
['F_CODE','AL200','ruins','yes'], // Ruins
150+
['F_CODE','AL200','historic','ruins'], // Ruins
151151
['F_CODE','AL201','tourism','attraction'], // Interest Site
152152
['F_CODE','AL208','place','shanty_town'], // Shanty Town
153153
['F_CODE','AL211','route:protection','yes'], // Transportation Route Protection Structure
@@ -299,7 +299,6 @@ fcodeCommon = {
299299
['F_CODE','BH077','natural','hummock'], // Hummock
300300
['F_CODE','BH082','water','lake'], // Inland Waterbody
301301
['F_CODE','BH090','water','intermittent'], // Land Subject to Inundation
302-
['F_CODE','BH095','natural','wetland'], // Wetland - In NFDD & NAS but not TDS
303302
['F_CODE','BH100','water','moat'], // Moat
304303
['F_CODE','BH110','pipeline:type','penstock'], // Penstock
305304
['F_CODE','BH116','natural','aquifer'], // Aquifer

plugins/ggdm30.js

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ ggdm30 = {
11101110
["t.landuse == 'grass'","t.natural = 'grassland'; t['grassland:type'] = 'grassland';"],
11111111
["t.landuse == 'meadow'","t.natural = 'grassland'; t['grassland:type'] = 'meadow';"],
11121112
["t.landuse == 'military'","t.military = 'installation'; delete t.landuse"],
1113+
["t.landuse == 'railway' && t['railway:yard'] == 'marshalling_yard'","a.F_CODE = 'AN060'"],
11131114
["t.leisure == 'recreation_ground'","t.landuse = 'recreation_ground'; delete t.leisure"],
11141115
["t.landuse == 'reservoir'","t.water = 'reservoir'; delete t.landuse"],
11151116
["t.landuse == 'retail'","t.landuse = 'built_up_area'; t.use = 'commercial'"],
@@ -1212,6 +1213,24 @@ ggdm30 = {
12121213
}
12131214
}
12141215

1216+
// Churches etc
1217+
if (tags.building && ! tags.amenity)
1218+
{
1219+
var how = [ 'church','chapel','cathedral','mosque','pagoda','shrine','temple',
1220+
'synagogue','tabernacle','stupa']
1221+
if (how.indexOf(tags.building) > -1)
1222+
{
1223+
tags.amenity = 'place_of_worship';
1224+
}
1225+
1226+
var rc = [ 'mission','religious_community','seminary','convent','monastry',
1227+
'noviciate','hermitage','retrest','marabout']
1228+
if (rc.indexOf(tags.building) > -1)
1229+
{
1230+
tags.use = 'religious_activities';
1231+
}
1232+
}
1233+
12151234
// Fix up water features from OSM
12161235
if (tags.natural == 'water' && !(tags.water))
12171236
{
@@ -1523,6 +1542,43 @@ ggdm30 = {
15231542
delete tags.vertical_obstruction_identifier;
15241543
}
15251544

1545+
// Railway loading things
1546+
if (tags.railway == 'loading')
1547+
{
1548+
if (tags.facility == 'gantry_crane')
1549+
{
1550+
delete tags.railway;
1551+
delete tags.facility;
1552+
attrs.F_CODE = 'AF040'; // Crane
1553+
tags['crane:type'] = 'bridge';
1554+
}
1555+
1556+
if (tags.facility == 'container_terminal')
1557+
{
1558+
delete tags.railway;
1559+
delete tags.facility;
1560+
attrs.F_CODE = 'AL010'; // Facility
1561+
attrs.FFN = '480'; // Transportation
1562+
}
1563+
} // End loading
1564+
1565+
switch (tags.man_made)
1566+
{
1567+
case undefined: // Break early if no value
1568+
break;
1569+
1570+
case 'reservoir_covered':
1571+
delete tags.man_made;
1572+
attrs.F_CODE = 'AM070'; // Storage Tank
1573+
tags.product = 'water';
1574+
break;
1575+
1576+
case 'gasometer':
1577+
delete tags.man_made;
1578+
attrs.F_CODE = 'AM070'; // Storage Tank
1579+
tags.product = 'gas';
1580+
break;
1581+
}
15261582
}, // End applyToOgrPreProcessing
15271583

15281584
// #####################################################################################################
@@ -1791,6 +1847,7 @@ ggdm30 = {
17911847
// delete notUsedTags['source:geometry:date'];
17921848
}
17931849
}
1850+
17941851
}, // End applyToOgrPostProcessing
17951852

17961853
// #####################################################################################################
@@ -2231,7 +2288,8 @@ ggdm30 = {
22312288
print('TableName ' + i + ': ' + returnData[i]['tableName'] + ' FCode: ' + returnData[i]['attrs']['F_CODE'] + ' Geom: ' + geometryType);
22322289
//for (var j in returnData[i]['attrs']) print('Out Attrs:' + j + ': :' + returnData[i]['attrs'][j] + ':');
22332290
var kList = Object.keys(returnData[i]['attrs']).sort()
2234-
for (var j = 0, kLen = kList.length; j < kLen; j++) print('Out Attrs:' + kList[j] + ': :' + returnData[i]['attrs'][kList[j]] + ':');
2291+
for (var j = 0, kLen = kList.length; j < kLen; j++)
2292+
if (returnData[i]['attrs'][kList[j]]) print('Out Attrs:' + kList[j] + ': :' + returnData[i]['attrs'][kList[j]] + ':');
22352293
}
22362294
print('');
22372295
}

0 commit comments

Comments
 (0)