Refine
This commit is contained in:
@@ -69,13 +69,11 @@ def get_pipe_risk_probability_geometries(name: str) -> dict[str, Any]:
|
|||||||
|
|
||||||
with conn[name].cursor(row_factory=dict_row) as cur:
|
with conn[name].cursor(row_factory=dict_row) as cur:
|
||||||
cur.execute(f"select {key_pipeId}, ST_AsGeoJSON(geometry) AS {key_geometry} from gis_pipe")
|
cur.execute(f"select {key_pipeId}, ST_AsGeoJSON(geometry) AS {key_geometry} from gis_pipe")
|
||||||
columns = [desc[0] for desc in cur.description]
|
|
||||||
columns.remove(key_pipeId)
|
|
||||||
columns.remove(key_geometry)
|
|
||||||
print("Columns")
|
|
||||||
print(columns)
|
|
||||||
|
|
||||||
for record in cur:
|
for record in cur:
|
||||||
|
for col in record:
|
||||||
|
print(col)
|
||||||
|
|
||||||
id = record[key_pipeId]
|
id = record[key_pipeId]
|
||||||
geom = json.loads(record[key_geometry])
|
geom = json.loads(record[key_geometry])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user