Skip to content

Commit

Permalink
Merge pull request #100 from IGNF/capture-all-empty-metadata-tables
Browse files Browse the repository at this point in the history
Be robust to pgsql2shp warnings when dealing with empty tables
  • Loading branch information
CharlesGaydon authored Oct 18, 2023
2 parents c8b59b9 + 01fb966 commit 8824a5b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
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

0 comments on commit 8824a5b

Please sign in to comment.