From 39658412ab12f332446f1ca8acad37a8255b0009 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 27 Oct 2024 23:14:54 +0100 Subject: PostgreSQL: Add NOT NULL constraints on the geometry columns. Among other things this allows CLUSTERing on the GIST indices, cf. https://postgis.net/docs/manual-3.3/performance_tips.html#database_clustering --- webmap-import | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webmap-import') diff --git a/webmap-import b/webmap-import index 00c4756..8311c26 100755 --- a/webmap-import +++ b/webmap-import @@ -593,6 +593,9 @@ def createOutputLayer(ds, layername, srs=None, options=None): lyr = dso.CreateLayer(layername, **kwargs) if lyr is None: raise Exception(f'Could not create destination layer "{layername}"') + # TODO use CreateLayerFromGeomFieldDefn() from ≥v3.9 as it's not + # possible to toggle the geomfield's nullable property after fact + # otherwise fields = options['fields'] if len(fields) > 0 and not lyr.TestCapability(ogr.OLCCreateField): -- cgit v1.2.3