Advertisement
killtdj

Untitled

Jun 13th, 2024
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.74 KB | None | 0 0
  1. """
  2. # Add intersected polygons to the map
  3. for polygon in intersected_polygons:
  4.    geojson = folium.GeoJson(
  5.        polygon.__geo_interface__,
  6.        style_function=lambda x: {
  7.            "fillColor": "red",
  8.            "color": "black",
  9.            "weight": 2,
  10.            "fillOpacity": 0.7,
  11.        },
  12.    )
  13.    geojson.add_to(map)
  14.  
  15. # Add longest lines for intersected polygons to the map
  16. for line in longest_lines:
  17.    if line is not None:
  18.        longest_line_geojson = folium.GeoJson(
  19.            line.__geo_interface__,
  20.            style_function=lambda x: {
  21.                "color": "blue",
  22.                "weight": 3,
  23.                "opacity": 0.7,
  24.            },
  25.        )
  26.        longest_line_geojson.add_to(map)
  27. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement