Skip to content
Permalink
Browse files

[processing] Define Layer Projection tool should write .prj files

using WKT1 ESRI format, not GDAL

Fixes #34007

(cherry picked from commit f41dd11)
  • Loading branch information
nyalldawson committed Feb 4, 2020
1 parent 3640c65 commit 4e3be1b40bb6212758d534f5272def743b416e0b
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/processing/algs/qgis/DefineProjection.py
@@ -28,7 +28,8 @@
QgsProcessingAlgorithm,
QgsProcessingParameterVectorLayer,
QgsProcessingParameterCrs,
QgsProcessingOutputVectorLayer)
QgsProcessingOutputVectorLayer,
QgsCoordinateReferenceSystem)

from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm

@@ -77,7 +78,7 @@ def processAlgorithm(self, parameters, context, feedback):
if dsPath.lower().endswith('.shp'):
dsPath = dsPath[:-4]

wkt = crs.toWkt()
wkt = crs.toWkt(QgsCoordinateReferenceSystem.WKT1_ESRI)
with open(dsPath + '.prj', 'w') as f:
f.write(wkt)

0 comments on commit 4e3be1b

Please sign in to comment.
You can’t perform that action at this time.