Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion import-automation/executor/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ gspread
gunicorn
legacy-cgi
lxml
numpy<=2.0.0
numpy
openpyxl
pandas
omegaconf
Expand Down
5 changes: 4 additions & 1 deletion scripts/us_census/geojsons_low_res/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def simplify(self, input=None, epsilon=0.01):
assert len(coords[i]) == 1
c = coords[i][0]
original_size += len(c)
new_c = rdp.rdp(c, epsilon=epsilon)
# Pad to 3D to avoid NumPy 2.0+ deprecation/error on np.cross(2D) in rdp library
c_3d = [[p[0], p[1], 0.0] for p in c]
new_c_3d = rdp.rdp(c_3d, epsilon=epsilon)
new_c = [[p[0], p[1]] for p in new_c_3d]
Comment thread
SandeepTuniki marked this conversation as resolved.
simplified_size += len(new_c)
if len(new_c) >= 3:
# Simplify the polygon succeeded, not yielding a line
Expand Down
Loading