Skip to content

Commit

Permalink
Now comparing earthquake location to nearest point on shape rather th…
Browse files Browse the repository at this point in the history
…an the exterior of the shape.
  • Loading branch information
mhearne-usgs committed Sep 25, 2018
1 parent a243923 commit c1ef10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strec/gmreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _get_nearest_point(point, shape):
mindist = 99999999999999999999
for pshape in shapelist:
pshape_string = LineString(pshape.exterior)
point_nearest, shape_nearest = nearest_points(ppoint, pshape_string)
point_nearest, shape_nearest = nearest_points(ppoint, pshape)
distance = np.sqrt(shape_nearest.x**2 + shape_nearest.y**2) / 1000
if distance < mindist:
mindist = distance
Expand Down

0 comments on commit c1ef10c

Please sign in to comment.