Skip to content

Handle the exception when the update bbox method fails at managing the SRID for a dataset #13952

@sijandh35

Description

@sijandh35

Description

When working with datasets that use custom coordinate reference systems (CRS) that cannot be managed by PROJ, the Dataset.recalc_bbox_on_geoserver method throws an unhandled exception.

Current Behavior

The assignment of the bbox polygon and SRID inside Dataset.recalc_bbox_on_geoserver does not handle exceptions when the CRS cannot be processed by PROJ, causing the method to fail.

Proposed Solution

The method should implement try/except exception handling as geoserver.helpers.sync_instance_with_geoserver does here.

Moreover, since the two blocks are very similar, the logic can be moved to a common Dataset method with improved logic so that:

  • if the SRID is known and the reprojection can be performed, the bbox_polygon geometry and the srid will be in the original CRS, and
  • otherwise, srid is assigned EPSG:4326 and the bbox_polygon will be the same as ll_bbox_polygon

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions