bollards are ignored if access=yes tag is set at the node.
This commit is contained in:
		
							parent
							
								
									c45e2cbb82
								
							
						
					
					
						commit
						6a9b05e126
					
				| @ -224,7 +224,8 @@ private: | |||||||
|                 denseTagIndex += 2; |                 denseTagIndex += 2; | ||||||
|             } |             } | ||||||
|             std::string barrierValue = keyVals.Find("barrier"); |             std::string barrierValue = keyVals.Find("barrier"); | ||||||
|             if(0 < barrierValue.length() && "border_control" != barrierValue && "toll_booth" != barrierValue && "no" != barrierValue) |             std::string access = keyVals.Find("access"); | ||||||
|  |             if(access != "yes" && 0 < barrierValue.length() && "border_control" != barrierValue && "toll_booth" != barrierValue && "no" != barrierValue) | ||||||
|                 n.bollard = true; |                 n.bollard = true; | ||||||
| 
 | 
 | ||||||
|             if("traffic_signals" == keyVals.Find("highway")) |             if("traffic_signals" == keyVals.Find("highway")) | ||||||
|  | |||||||
| @ -246,17 +246,23 @@ private: | |||||||
|                     continue; |                     continue; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|  |                 bool accessYes = false; | ||||||
|                 if ( xmlStrEqual( childName, ( const xmlChar* ) "tag" ) == 1 ) { |                 if ( xmlStrEqual( childName, ( const xmlChar* ) "tag" ) == 1 ) { | ||||||
|                     xmlChar* k = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "k" ); |                     xmlChar* k = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "k" ); | ||||||
|                     xmlChar* value = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "v" ); |                     xmlChar* value = xmlTextReaderGetAttribute( inputReader, ( const xmlChar* ) "v" ); | ||||||
|                     if ( k != NULL && value != NULL ) { |                     if ( k != NULL && value != NULL ) { | ||||||
|  |                         if ( xmlStrEqual( k, ( const xmlChar* ) "access" ) == 1 ) { | ||||||
|  |                             if ( xmlStrEqual( value, ( const xmlChar* ) "yes" ) == 1 ){ | ||||||
|  |                                 accessYes = true; | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|                         if ( xmlStrEqual( k, ( const xmlChar* ) "highway" ) == 1 ) { |                         if ( xmlStrEqual( k, ( const xmlChar* ) "highway" ) == 1 ) { | ||||||
|                             if ( xmlStrEqual( value, ( const xmlChar* ) "traffic_signals" ) == 1 ){ |                             if ( xmlStrEqual( value, ( const xmlChar* ) "traffic_signals" ) == 1 ){ | ||||||
|                                 node.trafficLight = true; |                                 node.trafficLight = true; | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|                         if ( xmlStrEqual( k, ( const xmlChar* ) "barrier" ) == 1 ) { |                         if ( xmlStrEqual( k, ( const xmlChar* ) "barrier" ) == 1 ) { | ||||||
|                             if ( xmlStrEqual( value, ( const xmlChar* ) "" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "border_control" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "toll_booth" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "no" ) != 1){ |                             if (!accessYes && xmlStrEqual( value, ( const xmlChar* ) "" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "border_control" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "toll_booth" ) != 1 && xmlStrEqual( value, ( const xmlChar* ) "no" ) != 1){ | ||||||
|                                 node.bollard = true; |                                 node.bollard = true; | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
| @ -271,6 +277,8 @@ private: | |||||||
|                     if ( value != NULL ) |                     if ( value != NULL ) | ||||||
|                         xmlFree( value ); |                         xmlFree( value ); | ||||||
|                 } |                 } | ||||||
|  |                 if(accessYes) | ||||||
|  |                     node.bollard = false; | ||||||
| 
 | 
 | ||||||
|                 xmlFree( childName ); |                 xmlFree( childName ); | ||||||
|             } |             } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user