• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Toblerity / Shapely / 802
85%

Build:
DEFAULT BRANCH: master
Ran 03 May 2019 11:11PM UTC
Jobs 11
Files 38
Run time 391min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
802

push

travis-ci

sgillies
Correct the description of Hausdorff distance (#707)

The manual describes Hausdorff distance as follows:

>.. method:: object.hausdorff_distance(other)
>
>  Returns the Hausdorff distance (``float``) to the `other` geometric object.
>  The Hausdorff distance is the furthest distance from any point on the first
>  geometry to any point on the second geometry.
>
>  `New in Shapely 1.6.0`

Depending on how one interpreted this description, this would suggest that the following code would return either a 4 or a 1 when it fact it returns a 2 (as it should).
```
A = LineString([(0,0),(2,0)])
B = LineString([(1,0),(4,0)])
A.hausdorff_distance(B)
```
As it is, the documentation implies that Hausdorff distance can be described mathematically as either:
$\sup_{x \in A, y \in B}d(x,y)$
or at a stretch
$\sup_{x \in A}\inf_{y \in B}d(x,y)$
rather than
$\max{\sup_{x \in A}\inf_{y \in B}d(x,y),\sup_{x \in B}\inf_{y \in A}d(x,y)}$
as in the wiki article on [Hausdorff distance](https://en.wikipedia.org/wiki/Hausdorff_distance).

A more accurate description would be something like the following:

> The Hausdorff distance between two objects is the furthest distance that a
> point on either object can be from the nearest point to it on the other object.

2657 of 3291 relevant lines covered (80.74%)

8.61 hits per line

Jobs
ID Job ID Ran Files Coverage
1 802.1 (SPEEDUPS=1 NUMPY=1) 03 May 2019 11:11PM UTC 0
76.18
Travis Job 802.1
2 802.2 (SPEEDUPS=0 NUMPY=1) 03 May 2019 11:12PM UTC 0
79.52
Travis Job 802.2
3 802.3 (SPEEDUPS=0 NUMPY=0) 03 May 2019 11:11PM UTC 0
79.52
Travis Job 802.3
4 802.4 (SPEEDUPS=1 NUMPY=1) 03 May 2019 11:11PM UTC 0
76.03
Travis Job 802.4
5 802.5 (SPEEDUPS=0 NUMPY=1) 03 May 2019 11:11PM UTC 0
79.37
Travis Job 802.5
6 802.6 (SPEEDUPS=1 NUMPY=1) 03 May 2019 11:13PM UTC 0
76.03
Travis Job 802.6
7 802.7 (SPEEDUPS=0 NUMPY=1) 03 May 2019 11:13PM UTC 0
79.37
Travis Job 802.7
8 802.8 (SPEEDUPS=0 NUMPY=0) 03 May 2019 11:13PM UTC 0
79.37
Travis Job 802.8
9 802.9 (SPEEDUPS=1 NUMPY=1) 03 May 2019 11:13PM UTC 0
76.21
Travis Job 802.9
10 802.10 (SPEEDUPS=0 NUMPY=1) 03 May 2019 11:14PM UTC 0
79.55
Travis Job 802.10
11 802.11 (SPEEDUPS=0 NUMPY=0) 03 May 2019 11:15PM UTC 0
79.55
Travis Job 802.11
Source Files on build 802
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #802
  • 467795b1 on github
  • Prev Build on master (#799)
  • Next Build on master (#804)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc