A method of determining a route between two locations in a navigation device, wherein each path between the two locations is considered to be formed of a plurality of line segments and at least some of said line segments forming the paths have at least a first type of attribute and a second type of attribute associated with them, the method comprising: providing a cost function for each one of the first type of attribute and the second type of attribute, wherein the cost function for the first type of attribute has been derived by dividing a map into a plurality of areas and assigning a first weighting factor to each area, wherein at least some of the areas have different first weighting factors for said first type of attribute so as to indicate that the line segments having said first type of attribute in those different areas have different levels of desirability for the route to travel through them, and wherein the cost function for the second type of attribute has been derived by dividing the same map into a different plurality of areas and assigning a second weighting factor to each area, wherein at least some of the areas have different second weighting factors for said second type of attribute so as to indicate that the line segments having said second type of attribute in those different areas have different levels of desirability for the route to travel through them; and applying said cost function to line segments in paths passing through said areas for use in determining which path should be selected for said route between the two locations; wherein the step of applying said cost function comprises assigning one of said first weighting factors and one of said second weighting factors to each of the line segments having said first and second attributes, the weighting factors assigned to a given line segment being the first and second weighting factors for the corresponding areas in which the line segment is located. providing a cost function for each one of the first type of attribute and the second type of attribute, wherein the cost function for the first type of attribute has been derived by dividing a map into a plurality of areas and assigning a first weighting factor to each area, wherein at least some of the areas have different first weighting factors for said first type of attribute so as to indicate that the line segments having said first type of attribute in those different areas have different levels of desirability for the route to travel through them, and wherein the cost function for the second type of attribute has been derived by dividing the same map into a different plurality of areas and assigning a second weighting factor to each area, wherein at least some of the areas have different second weighting factors for said second type of attribute so as to indicate that the line segments having said second type of attribute in those different areas have different levels of desirability for the route to travel through them; and applying said cost function to line segments in paths passing through said areas for use in determining which path should be selected for said route between the two locations; wherein the step of applying said cost function comprises assigning one of said first weighting factors and one of said second weighting factors to each of the line segments having said first and second attributes, the weighting factors assigned to a given line segment being the first and second weighting factors for the corresponding areas in which the line segment is located.