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

Toblerity / Shapely / 802 / 2
85%
master: 85%

Build:
DEFAULT BRANCH: master
Ran 03 May 2019 11:12PM UTC
Files 38
Run time 377min
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

03 May 2019 11:09PM UTC coverage: 79.52%. Remained the same
SPEEDUPS=0 NUMPY=1

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.

2617 of 3291 relevant lines covered (79.52%)

0.8 hits per line

Source Files on job 802.2 (SPEEDUPS=0 NUMPY=1)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 773
  • Travis Job 802.2
  • 467795b1 on github
  • Prev Job for SPEEDUPS=0 NUMPY=1 on master (#799.2)
  • Next Job for SPEEDUPS=0 NUMPY=1 on master (#804.2)
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