summaryrefslogtreecommitdiff
path: root/ishtar_common/models_common.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-07-10 11:53:19 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-07-10 11:53:19 +0200
commitbc1b7a4b69c0b01d65435ab9d829a270e3f79a56 (patch)
tree5dff192333dc23d8aee1fd22294b35121967eb62 /ishtar_common/models_common.py
parent66b3cea223c42c140eed3844b62fadeb6d53f30b (diff)
downloadIshtar-bc1b7a4b69c0b01d65435ab9d829a270e3f79a56.tar.bz2
Ishtar-bc1b7a4b69c0b01d65435ab9d829a270e3f79a56.zip
🐛 sheet - prevent crash when geodata are corrupted
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r--ishtar_common/models_common.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index adc6ca9eb..0b34400a1 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -2433,8 +2433,12 @@ class GeoVectorData(Imported, OwnPerms):
rounded_z = spatial_reference_system.round_z
else:
rounded_z = 3
- return self.get_coordinates(rounded=rounded, rounded_z=rounded_z, srid=srid, dim=dim,
- cache=cache)
+ try:
+ return self.get_coordinates(rounded=rounded, rounded_z=rounded_z, srid=srid, dim=dim,
+ cache=cache)
+ except GDALException:
+ # bad conversion
+ return
def get_coordinates(self, rounded=5, rounded_z=3, srid: int = None, dim=2, cache=False):
if dim not in (2, 3):