@@ -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