zuerst bekommen ich ein Beispiel, was istprüft Punkt innerhalb eines Polygons ist, das ist eine CSV-Datei
poly = [190, 50, 500, 310]
bbPath = mplPath.Path(np.array([[poly[0], poly[1]],
[poly[1], poly[2]],
[poly[2], poly[3]],
[poly[3], poly[0]]]))
bbPath.contains_point((200, 100))
die coordinate.csv Datei zwei Spalte, erste Spalte ‚Länge 190 50 500 310‘, zweite Spalte ‚nördliche Breite 50 500 310 190‘
was habe ich versucht
with open('coordinate.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
print(row)
ist, ich weiß nicht, wie cSV-Daten in den Weg zu importieren und überprüfen, ob Punkt innerhalb eines Polygons ist
Können Sie Ihre Datei 'coordinate.csv' oder zumindest einen Teil davon bitte teilen. –
Die Datei "coordinate.csv" hat zwei Spalten, die erste Spalte "Länge 190 50 500 310", die zweite Spalte "Breite 50 500 310 190". – Trux