master #172

Merged
mpeltriaux merged 35 commits from master into Docker 2022-06-02 08:53:33 +02:00
Showing only changes of commit 0b4b664265 - Show all commits

View File

@ -11,7 +11,7 @@ from json import JSONDecodeError
from time import sleep
import requests
from django.contrib.gis.db.models.functions import AsGML, Transform
from django.contrib.gis.db.models.functions import AsGML, Transform, MakeValid
from requests.auth import HTTPDigestAuth
from konova.settings import DEFAULT_SRID_RLP, PARCEL_WFS_USER, PARCEL_WFS_PW, PROXIES
@ -91,7 +91,7 @@ class ParcelWFSFetcher(AbstractWFSFetcher):
).annotate(
transformed=Transform(srid=filter_srid, expression="geom")
).annotate(
gml=AsGML('transformed')
gml=AsGML(MakeValid('transformed'))
).first().gml
spatial_filter = f"<Filter><{geometry_operation}><PropertyName>{self.geometry_property_name}</PropertyName>{geom_gml}</{geometry_operation}></Filter>"
return spatial_filter