cleaning terminal log

This commit is contained in:
DmsAnhr 2026-02-10 10:17:13 +07:00
parent d1f3450c2a
commit 5a4f430599
2 changed files with 0 additions and 9 deletions

View File

@ -100,8 +100,6 @@ async def process_data(df: pd.DataFrame, ext: str, filename: str, fileDesc: str)
geom_type = geom_types[0] if len(geom_types) > 0 else "None"
null_geom = result.geometry.isna().sum()
print(f"[INFO] Tipe Geometry: {geom_type}")
print(f"[INFO] Jumlah geometry kosong: {null_geom}")
else:
res = {
"message": "Tidak menemukan tabel yang relevan.",
@ -206,7 +204,6 @@ async def handle_upload_file(file: UploadFile = File(...), page: Optional[str] =
f.write(contents)
try:
df = None
print('ext', ext)
if ext == ".csv":
df = read_csv(str(tmp_path))
@ -236,11 +233,9 @@ async def handle_upload_file(file: UploadFile = File(...), page: Optional[str] =
zip_type = detect_zip_type(str(tmp_path))
if zip_type == "shp":
print("[INFO] ZIP terdeteksi sebagai Shapefile.")
df = read_shp(str(tmp_path))
elif zip_type == "gdb":
print("[INFO] ZIP terdeteksi sebagai Geodatabase (GDB).")
df = read_gdb(str(tmp_path))
else:
@ -374,7 +369,6 @@ async def process_parquet_upload(filename: str, table_name: str):
file_path = os.path.join("tmp", filename)
if not os.path.exists(file_path):
print(f"File {file_path} tidak ditemukan")
return
try:
@ -492,7 +486,6 @@ async def process_parquet_upload(filename: str, table_name: str):
"""
await conn.execute(alter_sql)
print(f"Sukses upload {len(clean_rows)} baris ke {table_name}.")
os.remove(file_path)
except Exception as e:
@ -554,7 +547,6 @@ async def handle_to_postgis(payload: UploadRequest, user_id: int = 2):
detected_crs = payload.author.get("crs")
detected = payload.author.get("crs")
print('crs', detected)
if not detected_crs:
detected_crs = "EPSG:4326"

View File

@ -30,7 +30,6 @@ def process_dataframe_synchronous(df_input, tmp_file):
# =========================================================================
# Hapus baris di mana konversi WKT gagal (None)
export_df = export_df[export_df["geom"].notnull()]
print("df", export_df)
if export_df.empty:
raise ValueError("Tidak ada data spasial valid yang ditemukan.")