< Previous | Next | Content >

City Block Distance

It is also known as Manhattan distance, boxcar distance, absolute value distance. It represents distance between points in a city road grid. It examines the absolute differences between coordinates of a pair of objects.

Formula: City Block Distance

For example:

Features City Block Distance





Object A





Object B





Point A has coordinate (0, 3, 4, 5) and point B has coordinate (7, 6, 3, -1).

The City Block Distance between point A and B is

City Block Distance

Try the interactive program below. Suppose you walk to the North 3 meters and then to the East 4 meters, what is the city block distance to the origin location? Put A = (0, 0) to indicate the origin and B = (3, 4) as the current location, the City Block distance represents the length of walking distance.

Input coordinate values of Object-A and Object-B (the coordinate are numbers only), then press "Get City Block Distance" button. The program will directly calculate when you type the input.

Features Object A Object B

City block distance is a special case of Minkowski distance with City Block Distance

The pattern of City block distance in 2-dimension is diamond. When the sink is on the center, it forms concentric diamonds around the center.

2D Cityblock distance

< Previous | Next | Content >

Rate this tutorial

This tutorial is copyrighted.

Preferable reference for this tutorial is

Teknomo, Kardi (2015) Similarity Measurement. http:\people.revoledu.comkardi tutorialSimilarity