From 59e48fea4a177d28c06e77bb56942d9f57a93859 Mon Sep 17 00:00:00 2001 From: DmsAnhr Date: Mon, 1 Dec 2025 10:02:48 +0700 Subject: [PATCH] update folder --- core/config.py => config.py | 0 full_cleansing_service.py | 14 +++++++------- main.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) rename core/config.py => config.py (100%) diff --git a/core/config.py b/config.py similarity index 100% rename from core/config.py rename to config.py diff --git a/full_cleansing_service.py b/full_cleansing_service.py index 2c64633..fad6b7b 100644 --- a/full_cleansing_service.py +++ b/full_cleansing_service.py @@ -8,7 +8,7 @@ from qgis.core import ( ) import processing from typing import Dict -from core.config import HOST,PORT,DB,USER,PWD,SCHEMA,GEOM_COL +from config import HOST,PORT,DB,USER,PWD,SCHEMA,GEOM_COL def load_layer(table_name: str): uri = QgsDataSourceUri() @@ -85,17 +85,17 @@ def cleansing_layer(layer: QgsVectorLayer) -> Dict: print("\nStep 3: Ensure MULTIPOLYGON (LTR-safe method)") # Step 3.1: Pecah multiparts → single (agar bersih) - singleparts = processing.run( - "native:multiparttosingleparts", - {"INPUT": fixed, "OUTPUT": "memory:"} - )["OUTPUT"] + # singleparts = processing.run( + # "native:multiparttosingleparts", + # {"INPUT": fixed, "OUTPUT": "memory:"} + # )["OUTPUT"] - print(" - After multiparttosingleparts:", singleparts.featureCount()) + # print(" - After multiparttosingleparts:", singleparts.featureCount()) # Step 3.2: Promote semua polygon → multipolygon multipolygon = processing.run( "native:promotetomulti", - {"INPUT": singleparts, "OUTPUT": "memory:"} + {"INPUT": fixed, "OUTPUT": "memory:"} )["OUTPUT"] print(" - After promotetomulti:", multipolygon.featureCount()) diff --git a/main.py b/main.py index 30493f2..a629226 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,7 @@ from qgis.core import ( QgsCoordinateReferenceSystem ) from qgis.PyQt.QtCore import QByteArray -from core.config import HOST,PORT,DB,USER,PWD,SCHEMA,GEOM_COL +from config import HOST,PORT,DB,USER,PWD,SCHEMA,GEOM_COL app = FastAPI() @@ -75,7 +75,7 @@ def run_clean_table(table_name: str, job_id: str): callback_payload = { "job_id": job_id, "table": table_name, - "summary": summary, + # "summary": summary, "status": "FINISHED" }