Skip to content

Commit

Permalink
feat: transform a shapely linestring
Browse files Browse the repository at this point in the history
别吵,我在思考.jpg
  • Loading branch information
LaoshuBaby committed Feb 23, 2024
1 parent 9067be6 commit 4055ac3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/yuheng/plugin/driver_db_postgresql/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ def get_data(
print(geoproj(geom.x, geom.y))
if count >= 500:
exit(0)
if isinstance(geom, shapely.geometry.LineString):
print(type(geom), geom)
# print(type(geom.xy), geom.xy)
# print(type(geom.xy[0]), geom.xy[0])
# print(type(list(geom.xy[0])), list(geom.xy[0]))
print(list(zip(list(geom.xy[0]), list(geom.xy[1]))))
# for i in geom:
# print(i)
if count >= 2:
exit(0)

return result

Expand Down

0 comments on commit 4055ac3

Please sign in to comment.