Make shapefile processing script pick up all shapefiles and fix order of bbox coordinate

This commit is contained in:
TheFGFSEagle
2022-07-30 20:33:29 +02:00
parent dc25bce9b2
commit 016d268c07
3 changed files with 21 additions and 23 deletions

View File

@@ -34,7 +34,7 @@ def filter_airports_list(airports_count, airports_list, icaos, bbox):
if icaos and any(icao in (airport.get("AirportCode", None), airport_metadata.get("icao_code", None)) for icao in icaos):
airports_list_filtered.append(airport)
elif bbox:
if bbox[0] < airport["Latitude"] < bbox[2] and bbox[1] < airport["Longitude"] < bbox[3]:
if bbox[1] < airport["Latitude"] < bbox[3] and bbox[0] < airport["Longitude"] < bbox[2]:
airports_list_filtered.append(airport)
print("Filtering airports … done ")