Skip to content

Commit

Permalink
Remove shapefile rewrite as the BDUni request has been made more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed Apr 4, 2024
1 parent e689603 commit e4b3489
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lidar_prod/tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def request_bd_uni_for_building_shapefile(
sql_select_list = [sql_batiment, sql_reservoir]
sql_request = sql_territoire + " UNION ".join(sql_select_list)

print(sql_request)
cmd = [
"pgsql2shp",
"-f",
Expand Down Expand Up @@ -267,9 +266,4 @@ def request_bd_uni_for_building_shapefile(
log.error("Time out when requesting BDUni.")
raise e

# read & write to avoid unnacepted 3D shapefile format.
# Dissolve to avoid invalid shapefile that would make pdal hang in overlay filter.
gdf = geopandas.read_file(shapefile_path)
gdf[["PRESENCE", "geometry"]].dissolve().to_file(shapefile_path)

return True

0 comments on commit e4b3489

Please sign in to comment.