map dropdown
This commit is contained in:
Binary file not shown.
@@ -21,7 +21,9 @@ def swap_latlon(coords):
|
||||
def swap_latlon2(coords):
|
||||
try:
|
||||
sample = coords[0][0][0]
|
||||
if not (-180 <= sample[0] <= 180 and -90 <= sample[1] <= 90):
|
||||
lat, lon = sample
|
||||
# if not (-180 <= sample[0] <= 180 and -90 <= sample[1] <= 90):
|
||||
if -90 <= lat <= 90 and -180 <= lon <= 180:
|
||||
return [
|
||||
[
|
||||
[
|
||||
@@ -30,7 +32,6 @@ def swap_latlon2(coords):
|
||||
] for polygon in coords
|
||||
]
|
||||
else:
|
||||
# Sudah benar [lon, lat]
|
||||
return coords
|
||||
except Exception as e:
|
||||
print(f"[swap_latlon] Error during coordinate swap: {e}")
|
||||
|
||||
Reference in New Issue
Block a user