Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit e093f46

Browse files
authored
Merge pull request #1218 from cbworden/sta2feature
Sta2feature
2 parents d7345ca + c744c3e commit e093f46

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

code.json

+43
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,49 @@
4545
"date": {
4646
"metadataLastUpdated": "2018-08-23"
4747
}
48+
},
49+
{
50+
"name": "shakemap",
51+
"organization": "U.S. Geological Survey",
52+
"description": "Near-real-time maps of ground motion and shaking intensity",
53+
"version": "4.1.0",
54+
"status": "Production",
55+
56+
"permissions": {
57+
"usageType": "openSource",
58+
"licenses": [
59+
{
60+
"name": "Public Domain, CC0-1.0",
61+
"URL": "https://github.com/usgs/shakemap/blob/master/LICENSE.md"
62+
}
63+
]
64+
},
65+
66+
"homepageURL": "https://usgs.github.io/shakemap/sm4_index.html",
67+
"downloadURL": "https://github.com/usgs/shakemap/archive/master.zip",
68+
"disclaimerURL": "https://github.com/usgs/shakemap/blob/master/LICENSE.md",
69+
"repositoryURL": "https://github.com/usgs/shakemap.git",
70+
"vcs": "git",
71+
72+
"laborHours": null,
73+
74+
"tags": [
75+
"earthquake",
76+
"shakemap"
77+
],
78+
79+
"languages": [
80+
"python"
81+
],
82+
83+
"contact": {
84+
"name": "C. Bruce Worden",
85+
"email": "[email protected] "
86+
},
87+
88+
"date": {
89+
"metadataLastUpdated": "2022-04-28"
90+
}
4891
}
4992
]
5093
}

shakemap/mapping/mapmaker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ def arclen(path):
14181418
props = contour_object["properties"]
14191419
multi_lines = sShape(contour_object["geometry"])
14201420
pmulti_lines = proj.project_geometry(multi_lines, src_crs=geoproj)
1421-
for multi_line in pmulti_lines:
1421+
for multi_line in pmulti_lines.geoms:
14221422
pmulti_line = mapping(multi_line)["coordinates"]
14231423
x, y = zip(*pmulti_line)
14241424
contour_lens[props["value"]].append(arclen(pmulti_line))
@@ -1444,7 +1444,7 @@ def arclen(path):
14441444
# isovalue)
14451445
min_len = np.array(contour_lens[props["value"]]).mean()
14461446

1447-
for multi_line in pmulti_lines:
1447+
for multi_line in pmulti_lines.geoms:
14481448
pmulti_line = mapping(multi_line)["coordinates"]
14491449
x, y = zip(*pmulti_line)
14501450
# color = imt_cmap.getDataColor(props['value'])

0 commit comments

Comments
 (0)