Skip to content

Instantly share code, notes, and snippets.

View ahmadpoorgholam's full-sized avatar

Ahmad Poorgholam ahmadpoorgholam

View GitHub Profile
@ahmadpoorgholam
ahmadpoorgholam / convet_ploygon_to_multipolygon.py
Created October 20, 2023 14:07
convet_ploygon_to_multipolygon.py
from shapely.geometry import shape, MultiPolygon
# JSON representation of a single Polygon
polygon_json = {
"type": "Polygon",
"coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]
}
# Convert the JSON representation to a Shapely Polygon
polygon = shape(polygon_json)
import argparse
from threading import Thread, Event
from time import sleep
import sys
done = Event()
def work(work_seconds=1):
sleep(1)