* adds another validity check to SimpleGeomForm (is_size_valid) to make sure the area of the entered geometry is somehow rational (>= 1m²)
* optimizes performance of django command sanitize_db
* extends Geometry model with two new attributes, holding timestamps when a parcel calculation has been started and ended
* finally drops unused update_parcel_wfs in favor of update_parcels in Geometry model
* refactors update_parcel method
* adds geometry buffer fallback in schneider/fetcher.py to avoid emptying of geometries when parcels shall be fetched
* finally removes utils/wfs/spatial.py
* extends GeomParcelsView according to #381
* updates translations
* removes redundant psycopg2-binary requirement
This commit is contained in:
2024-01-09 13:11:04 +01:00
parent d911f4a3a3
commit 50bd6feb89
11 changed files with 431 additions and 1869 deletions

View File

@@ -28,7 +28,11 @@ class ParcelFetcher:
self.geometry = geometry
# Reduce size of geometry to avoid "intersections" because of exact border matching
geom = geometry.geom.buffer(-0.001)
buffer_threshold = 0.001
geom = geometry.geom.buffer(-buffer_threshold)
if geom.area < buffer_threshold:
# Fallback for malicious geometries which are way too small but would disappear on buffering
geom = geometry.geom
self.geojson = geom.ewkt
self.results = []