UMEP-dev / UMEP-processing

7 stars 9 forks source link

Urock prepare: fails when including DEM #54

Closed bweeding closed 6 months ago

bweeding commented 6 months ago

When preparing the building and vegetation files using Urock prepare, the inclusion of a DEM file causes the following error: image This error doesn't occur when just using the DSM and CDSM, and doesn't occur on my linux based server, only my windows laptop. I'm using the latest zipped version of Urock.

urock_source_files_issue.zip

j3r3m1 commented 6 months ago

No problem on my Linux. I have no Windows labtop nearby these days. @biglimp do you also have the problem using Windows with this data ?

biglimp commented 6 months ago

I can have a try but I am missing the input shapefile for the buildings.

j3r3m1 commented 6 months ago

urock_source_files_issue.zip

Don't you have a "mac_point_buildings_sf_a_50mb.shp" file in the zip ?

biglimp commented 6 months ago

Ops. Missed it.

Ok. I have tried on Windows and I can replicate the error, both with your data and the standard tutorial data from our website. Either something has changed from the QGIS side or we have done something. We need to investigate. @j3r3m1 , did you change anything in this tool recently? I see that you are using 3.28. I am using 3.32. Both gives errors. @bweeding , Can you please try the same thing but use the data from our tutorial (https://umep-docs.readthedocs.io/projects/tutorial/en/latest/Tutorials/IntroductionToURock.html#introtourock)

I am actually getting another error compared to to you:

Loading resulting layers
Algorithm 'Urban Wind Field: URock Prepare' finished
QGIS version: 3.32.3-Lima
QGIS code revision: 67d46100b5
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.7.2
GEOS version: 3.12.0-CAPI-1.18.0
PROJ version: Rel. 9.3.0, September 1st, 2023
PDAL version: 2.5.5 (git-version: 24f78d)
Algorithm started at: 2023-12-19T11:39:51
Algorithm 'Urban Wind Field: URock Prepare' starting…
Input parameters:
{ 'BUILDINGS_WITH_HEIGHT' : 'TEMPORARY_OUTPUT', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : None, 'INPUT_BUILD_DSM' : 'C:/Users/xlinfr/Desktop/dataKarzo/ToTutorials/dsm.tif', 'INPUT_BUILD_FOOTPRINT' : 'C:/Users/xlinfr/Desktop/dataKarzo/ToTutorials/buildings.shp', 'INPUT_VEG_CDSM' : None, 'INPUT_VEG_POINTS' : None, 'OUTPUT_BUILD_HEIGHT_FIELD' : 'ROOF_HEIGHT', 'OUTPUT_VEG_HEIGHT_FIELD' : 'VEG_HEIGHT', 'RADIUS_VEG_FIELD' : '', 'VEGETATION_ASPECT' : '0.75', 'VEGETATION_WITH_HEIGHT' : 'TEMPORARY_OUTPUT' }

Could not create layer C:/Users/xlinfr/AppData/Local/Temp/processing_csVXoS/53efa6a718a64160b0c3addf60d1cd6e/BUILDINGS_WITH_HEIGHT.xtf: Creation of data source failed (OGR error: Model file not specified.)
Execution failed after 0.05 seconds
j3r3m1 commented 6 months ago

No change in the URock Prepare tool. The message you get is cryptic. No file is generated ? Even though you specify a file as output (not a temporary folder) ?

biglimp commented 6 months ago

tried both

biglimp commented 6 months ago

Just to be clear, @j3r3m1 , it works on your linux?

biglimp commented 6 months ago

Hold on, someone have added a temporary save of geojson at line 212. THis is probably not good for windows machines...

biglimp commented 6 months ago

@bweeding , as a workaround, do not use temporary output. That works for me.

bweeding commented 6 months ago

I've just been using a linux machine to prepare the files for now.

biglimp commented 6 months ago

Ok, I found the issue. It is actually something related to ogr not being able to write to a .xft. To fix this, either write to another fileformat OR change your default output format for temporary files in QGIS (I changed mine to .shp).

image