Re: [QGIS-Developer] Changes to processing gdal:translate?
Thanks again, Nyall. I'm not confident enough to log these on Redmine, as I've not looked into the Processing code before. Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
On 30 January 2018 at 04:26, Tom Chadwinwrote: > Next issue... translate.py uses QgsRasterFileWriter.driverForExtension(). > Perhaps I'm using this wrong, but is it outputting empty strings? Confirmed - fixed by https://github.com/qgis/QGIS/pull/6216. Currently it's only working for gdal drivers with the GDAL_DCAP_RASTER capability, which excludes common ones like JPEG. Nyall ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
Next issue... translate.py uses QgsRasterFileWriter.driverForExtension(). Perhaps I'm using this wrong, but is it outputting empty strings? Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
Possible attempted fix: https://github.com/qgis/QGIS/pull/6208 Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
I'm still having problems. In warp.py, line 198, the following is added as an argument: extentCrs.authid() I've confirmed that extentCrs is a QgsCoordinateReferenceSystem. However, authid() seems to be returning an empty string. I don't understand why. Can anyone confirm? Thanks Tom PS Code in question is at https://github.com/qgis/QGIS/blob/891ca3cd11a1c192df937ffd49418f21f9956eaa/python/plugins/processing/algs/gdal/warp.py#L198 - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
Ah, thanks so much! Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
On 27 January 2018 at 02:58, Tom Chadwinwrote: > No, my mistake. I think there might be an issue with the processing wrapper > for gdal:warp. It takes the argument TARGET_EXTENT, and uses that for the > GDAL arg "-te". However, it then tries to add in extent details, and I think > there might be an incorrect variable name. In warp.py from line 190: > > arguments.append(rasterExtent.xMinimum()) > arguments.append(rasterExtent.yMinimum()) > arguments.append(rasterExtent.xMaximum()) > arguments.append(rasterExtent.yMaximum()) > > I'm not sure "rasterExtents" is defined, but substituting the more plausible > "extent" gets no extent value out. > > Is this an issue, or are the Python bindings for Processing's > gdal:warpreproject working for others? > Fixed by Alex in https://github.com/qgis/QGIS/commit/891ca3cd11a1c192df937ffd49418f21f9956eaa Nyall ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Changes to processing gdal:translate?
No, my mistake. I think there might be an issue with the processing wrapper for gdal:warp. It takes the argument TARGET_EXTENT, and uses that for the GDAL arg "-te". However, it then tries to add in extent details, and I think there might be an incorrect variable name. In warp.py from line 190: arguments.append(rasterExtent.xMinimum()) arguments.append(rasterExtent.yMinimum()) arguments.append(rasterExtent.xMaximum()) arguments.append(rasterExtent.yMaximum()) I'm not sure "rasterExtents" is defined, but substituting the more plausible "extent" gets no extent value out. Is this an issue, or are the Python bindings for Processing's gdal:warpreproject working for others? Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Changes to processing gdal:translate?
Hello all I'm trying to migrate the raster processing parts of qgis2web, and I'm finding it hard working out all the processing changes. I think I've made progress, but I'm now getting the following when I do "processing.run("gdal:translate", {params})": Incorrect parameter value for INPUT In QGIS2, running translate without params gives the list of params and types, including: INPUT So I've set INPUT to the path to a raster file.In QGIS3, algorithmHelp now says: INPUT: What is a QgsProcessingParameterRasterLayer? Is a raster file (path) no longer what is required? Or is my error elsewhere? Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer