This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mosquitto: | |
image: eclipse-mosquitto | |
container_name: mosquitto | |
restart: always | |
volumes: | |
- ~/smarthome/mosquitto:/mosquitto/ | |
ports: | |
- 1883:1883 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from shapely.geometry import Point | |
from shapely.geometry.polygon import Polygon | |
def isPolygonInPolygon(poly1,poly2): | |
poly2 = Polygon(poly2) | |
for poi in poly1: | |
poi = Point(poi) | |
if(poly2.contains(poi)): | |
return True |