Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix SHAPE_ENCODING argument should not always get escaped
- Loading branch information
|
@@ -260,7 +260,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True): |
|
|
if len(shapeEncoding) > 0: |
|
|
arguments.append('--config') |
|
|
arguments.append('SHAPE_ENCODING') |
|
|
arguments.append('"' + shapeEncoding + '"') |
|
|
arguments.append(shapeEncoding) |
|
|
arguments.append('-f') |
|
|
arguments.append('PostgreSQL') |
|
|
arguments.append('PG:' + self.getConnectionString(parameters, context)) |
|
|
|
@@ -646,7 +646,7 @@ def testOgr2PostGis(self): |
|
|
alg.getConsoleCommands({'INPUT': source, |
|
|
'SHAPE_ENCODING': 'blah'}, context, feedback), |
|
|
['ogr2ogr', |
|
|
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING "blah" -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" ' |
|
|
'-progress --config PG_USE_COPY YES --config SHAPE_ENCODING blah -f PostgreSQL "PG:host=localhost port=5432 active_schema=public" ' |
|
|
'-lco DIM=2 ' + source + ' polys2 ' |
|
|
'-overwrite -lco GEOMETRY_NAME=geom -lco FID=id -nln public.polys2 -nlt PROMOTE_TO_MULTI']) |
|
|
|
|
|