From d8701a7e41cd7257af673a6c9f7bdb6e5c0a580a Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Fri, 13 Aug 2010 09:21:58 +0000 Subject: [PATCH] fixed a strange behaviour on OSM data covering the US. --- DataStructures/extractorStructs.h | 36 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/DataStructures/extractorStructs.h b/DataStructures/extractorStructs.h index 4da9a316b..2725e7754 100644 --- a/DataStructures/extractorStructs.h +++ b/DataStructures/extractorStructs.h @@ -221,7 +221,7 @@ _Way _ReadXMLWay( xmlTextReaderPtr& inputReader, Settings& settings ) { string route( (const char* ) value ); if (route == "ferry") { for ( int i = 0; i < settings.speedProfile.names.size(); i++ ) { - way.maximumSpeed = 25; + way.maximumSpeed = 5; way.usefull = true; way.direction == _Way::oneway; } @@ -293,23 +293,27 @@ _Way _ReadXMLWay( xmlTextReaderPtr& inputReader, Settings& settings ) { } } } else { - if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "no" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "agricultural" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "forestry" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "delivery" ) == 1 - ) { - way.access = false; - } - else if ( xmlStrEqual( value, ( const xmlChar* ) "yes" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "designated" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "official" ) == 1 - || xmlStrEqual( value, ( const xmlChar* ) "permissive" ) == 1 - ) { - way.access = true; + if ( xmlStrEqual( k, (const xmlChar*) "access" )) + { + if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1) + + if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "no" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "agricultural" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "forestry" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "delivery" ) == 1 + ) { + way.access = false; + } + else if ( xmlStrEqual( value, ( const xmlChar* ) "yes" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "designated" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "official" ) == 1 + || xmlStrEqual( value, ( const xmlChar* ) "permissive" ) == 1 + ) { + way.access = true; + } } } - if ( k != NULL ) xmlFree( k ); if ( value != NULL )