aboutsummaryrefslogtreecommitdiffstats
path: root/export_mvt.py
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2026-03-05 16:00:08 +0100
committerGuilhem Moulin <guilhem@fripost.org>2026-03-05 22:56:29 +0100
commit4bb4d381f193f14260fc9f56679588d8e455dc93 (patch)
tree5e695654382cda35e3f7bc4786f209ece80e72fb /export_mvt.py
parent05ac5b52a224d6eddb23d748a9d8e3ee5571341b (diff)
Use PostgreSQL schemas to partition layers.
Rather than putting everything in the 'postgis' schema using ':' as hierarchy separator. When the destination dataset is not PostgreSQL, the layers names are prefixed using '$SCHEMA.' instead of '$SCHEMA:'
Diffstat (limited to 'export_mvt.py')
-rw-r--r--export_mvt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/export_mvt.py b/export_mvt.py
index de4a351..b893d79 100644
--- a/export_mvt.py
+++ b/export_mvt.py
@@ -35,7 +35,7 @@ import brotli
from osgeo import gdal, ogr, osr
from common import BadConfiguration, escape_identifier, format_bytes, format_time
-from common_gdal import getExtent, getSRS, getSpatialFilterFromGeometry
+from common_gdal import getExtent, getSRS, getSpatialFilterFromGeometry, getEscapedTableName
from rename_exchange import rename_exchange
def parseTilingScheme(scheme : list[Any]) -> tuple[osr.SpatialReference, ogr.Geometry|None]:
@@ -177,7 +177,7 @@ def exportSourceLayer(lyr_src : ogr.Layer,
else:
raise BadConfiguration(f'Unsupported geometry transformation: {transform_geometry}')
- query = 'SELECT ' + ', '.join(columns) + ' FROM ' + escape_identifier(layername) + ' m'
+ query = 'SELECT ' + ', '.join(columns) + ' FROM ' + getEscapedTableName(lyr_src) + ' m'
cond = layerdef.get('where', None)
if cond is not None: