cogeotiff / www.cogeo.org

Cloud Optimized GeoTIFF website
http://cogeo.org
Apache License 2.0
90 stars 38 forks source link

Instruction in tutorial to prepend /vsicurl/ before your pasted in URL is not accepted in QGIS 3.26.2 and does not work #60

Open pworrall opened 1 year ago

pworrall commented 1 year ago

I've attempted several ways to get the "Build Virtual Raster" tool in QGIS to build a .vrt file using actual virtual files (https:...). It works fine with the same files if I previously download them, but I get the error "Incorrect parameter value for INPUT" when I try to access them on the web. I've tried accessing the files both with and without the /vsiurl/ prepend, and I ger the same error. The Python code below I copied from the tool dialog, then I edited it and ran it in the Python Console. Any guidance would be greatly appreciated!

processing.run("gdal:buildvirtualraster", {'INPUT':[' /vsicurl/https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1m/Projects/IN_Indiana_Statewide_LiDAR_2017_B17/TIFF/USGS_1M_16_x65y432_IN_Indiana_Statewide_LiDAR_2017_B17.tif',' /vsicurl/https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1m/Projects/IN_Indiana_Statewide_LiDAR_2017_B17/TIFF/USGS_1M_16_x64y436_IN_Indiana_Statewide_LiDAR_2017_B17.tif'],'RESOLUTION':0,'SEPARATE':False,'PROJ_DIFFERENCE':False,'ADD_ALPHA':False,'ASSIGN_CRS':None,'RESAMPLING':0,'SRC_NODATA':'','EXTRA':'','OUTPUT':'TEMPORARY_OUTPUT'})

Traceback (most recent call last): File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\tools\general.py", line 108, in run return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context) File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\core\Processing.py", line 181, in runAlgorithm raise QgsProcessingException(msg) _core.QgsProcessingException: Unable to execute algorithm Incorrect parameter value for INPUT

batugane commented 3 months ago

Hi there @pworrall,

I wanted to check if the problem is still persistent. I followed the guide at QGIS Training Manual on Data Manipulation and used the exact same data from the following URLs:

Here is the GDAL output:

Algorithm started at: 2024-05-28T13:53:35

Algorithm 'Build virtual raster' starting… Input parameters: { 'ADD_ALPHA' : False, 'ASSIGN_CRS' : None, 'EXTRA' : '', 'INPUT' : ['/vsicurl/https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1m/Projects/IN_Indiana_Statewide_LiDAR_2017_B17/TIFF/USGS_1M_16_x64y436_IN_Indiana_Statewide_LiDAR_2017_B17.tif','/vsicurl/https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1m/Projects/IN_Indiana_Statewide_LiDAR_2017_B17/TIFF/USGS_1M_16_x65y432_IN_Indiana_Statewide_LiDAR_2017_B17.tif'], 'OUTPUT' : 'TEMPORARY_OUTPUT', 'PROJ_DIFFERENCE' : False, 'RESAMPLING' : 0, 'RESOLUTION' : 0, 'SEPARATE' : False, 'SRC_NODATA' : '' }

GDAL command output:

0...10...20...30...40...50...60...70...80...90...100 - done.
Process completed successfully
Execution completed in 6.63 seconds
Results:
  OUTPUT: C:/****/processing_wnPrXZ/161d25745d1c49de808b6c44d88d7b88/OUTPUT.vrt

Loading resulting layers Algorithm 'Build virtual raster' finished as you can see there are no errors and the algorithm finished successfully.

Let me know if this helps or if you still encounter any issues.

Best regards, Batuhan

pworrall commented 2 months ago

Thanks for the Feedback - I'll try it again!