Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be robust to pgsql2shp warnings when dealing with empty tables #100

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# main

# 1.9.13
### 1.9.14
- Be robust to pgsql2shp warnings when dealing with empty tables (i;e. no buildings).

### 1.9.13
- Run CICD operations for all branches prefixed with "staging-"

# 1.9.12
### 1.9.12
- Instantiate bd_uni_connection_params externally to fix BV optimization.

# 1.9.11
### 1.9.11
- Hide credentials to the BD Uni.

# 1.9.10
### 1.9.10
- Add missing "reservoir" category to the BD uni request, alongside buildings.

# 1.9.9
### 1.9.9
- Update PDAL version to V2.5.1.

# 1.9.8
### 1.9.8
- Keep confidence channel in the "reliability" LAS channel.

# 1.9.7
### 1.9.7
- Update PDAL version to V2.5.0.

# 1.9.6
### 1.9.6
- Deal with cases where there are no building over the cloud, by creating an empty shapefile.


2 changes: 1 addition & 1 deletion lidar_prod/tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def request_bd_uni_for_building_shapefile(
subprocess.check_output(cmd, stderr=subprocess.STDOUT, timeout=120)
except subprocess.CalledProcessError as e:
# In empty zones, pgsql2shp does not create a shapefile
if e.output == b"Initializing... \nERROR: Could not determine table metadata (empty table)\n":
if b"Initializing... \nERROR: Could not determine table metadata (empty table)\n" in e.output:

# write empty shapefile
df = geopandas.GeoDataFrame(columns=["id", "geometry"], geometry="geometry", crs=f"EPSG:{Lambert_93_SRID}")
Expand Down
2 changes: 1 addition & 1 deletion package_metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__: "V1.9.13"
__version__: "V1.9.14"
__name__: "lidar_prod"
__url__: "https://github.com/IGNF/lidar-prod-quality-control"
__description__: "A 3D semantic segmentation production tool to augment rule- based Lidar classification with AI and databases."
Expand Down
Loading