meliharvey/sidewalkwidths-nyc

An issue on df_exploded['centerlines'] = df_exploded.progress_apply(lambda row: Centerline(row.geometry), axis=1)

Opened this issue · 0 comments

Dear Meliharvey,
Thanks for such great notebook firstly.
i'm writing to ask for help on an issue i met when i run df_exploded['centerlines'] = df_exploded.progress_apply(lambda row: Centerline(row.geometry), axis=1).
It said QhullError: QH6154 Qhull precision error: Initial simplex is flat (facet 1 is coplanar with the interior point)

While executing: | qhull v Qz Qbb Qc
Options selected for Qhull 2019.1.r 2019/06/21:
run-id 1552709729 voronoi Qz-infinity-point Qbbound-last Qcoplanar-keep
_pre-merge _zero-centrum Qinterior-keep Pgood _max-width 0.0013
Error-roundoff 1e-15 _one-merge 7e-15 Visible-distance 2e-15
U-max-coplanar 2e-15 Width-outside 4e-15 _wide-facet 1.2e-14
_maxoutside 8e-15

precision problems (corrected unless 'Q0' or an error)
2 degenerate hyperplanes recomputed with gaussian elimination
2 nearly singular or axis-parallel hyperplanes
2 zero divisors during back substitute
2 zero divisors during gaussian elimination
Qhull could not construct a clearly convex simplex from points:

  • p1(v4): -0.0021 0.72 0.025
  • p4(v3): -0.0023 0.72 0.72
  • p0(v2): -0.0021 0.72 0.025
  • p2(v1): -0.0024 0.72 0

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet. The maximum round off error for
computing distances is 1e-15. The center point, facets and distances
to the center point are as follows:

center point -0.002223 0.721 0.193

facet p4 p0 p2 distance= 0
facet p1 p0 p2 distance= 0
facet p1 p4 p2 distance= 0
facet p1 p4 p0 distance= 0

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates. Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
0: -0.002436 -2.225e-308 difference= 0.002436
1: 0.7202 0.7215 difference= 0.001306
2: 0 0.7215 difference= 0.7215

If the input should be full dimensional, you have several options that
may determine an initial simplex:

  • use 'QJ' to joggle the input and make it full dimensional
  • use 'QbB' to scale the points to the unit cube
  • use 'QR0' to randomly rotate the input for different maximum points
  • use 'Qs' to search all points for the initial simplex
  • use 'En' to specify a maximum roundoff error less than 1e-15.
  • trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:

  • use 'QJ' to joggle the input and make it full dimensional
  • use 'Qbk:0Bk:0' to delete coordinate k from the input. You should
    pick the coordinate with the least range. The hull will have the
    correct topology.
  • determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  • add one or more points to make the input full dimensional.

it'd be highly appreciated if you could help me out of this. look forward to your reply.
Best,
Yi Man