UMEP-dev / UMEP-processing

GNU General Public License v3.0
7 stars 9 forks source link

URock Prepare doesn't create BUILDINGS_WITH_HEIGHT #66

Closed Jolysro closed 8 months ago

Jolysro commented 8 months ago

Hi! I cannot run URock Prepare to create BUILDINGS_WITH_HEIGHT. It works for the vegetation. I have used the Goteborg data as an example. But it also does not work with my own data.

I would be very happy to receive any help or suggestions. Best

QGIS version: 3.36.0-Maidenhead QGIS code revision: 09951dc0acf Qt version: 5.15.3 Python version: 3.10.12 GDAL version: 3.4.3 GEOS version: 3.12.1-CAPI-1.18.1 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.5.0 (git-version: Release) Algorithm started at: 2024-03-05T12:25:58 Algorithm 'Urban Wind Field: URock Prepare' starting… Input parameters: { 'BUILDINGS_WITH_HEIGHT' : 'TEMPORARY_OUTPUT', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : None, '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' }

Execution completed in 0.09 seconds Results: BUILDINGS_WITH_HEIGHT: /tmp/processing_EkAUzF/5ce51e4cd57849129d090b5533579f25/BUILDINGS_WITH_HEIGHT.gpkg VEGETATION_WITH_HEIGHT: /tmp/processing_EkAUzF/6dee754468764c1e87166823e37d6b04/VEGETATION_WITH_HEIGHT.gpkg

Loading resulting layers The following layers were not correctly generated. • /tmp/processing_EkAUzF/5ce51e4cd57849129d090b5533579f25/BUILDINGS_WITH_HEIGHT.gpkg You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm. QGIS version: 3.36.0-Maidenhead QGIS code revision: 09951dc0acf Qt version: 5.15.3 Python version: 3.10.12 GDAL version: 3.4.3 GEOS version: 3.12.1-CAPI-1.18.1 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.5.0 (git-version: Release) Algorithm started at: 2024-03-05T12:31:31 Algorithm 'Urban Wind Field: URock Prepare' starting… Input parameters: { 'BUILDINGS_WITH_HEIGHT' : 'TEMPORARY_OUTPUT', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : None, 'INPUT_VEG_CDSM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/CDSM_KRbig.asc', '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' }

Execution completed in 1.39 seconds Results: BUILDINGS_WITH_HEIGHT: /tmp/processing_EkAUzF/6351da129e9f4d358b01396c0ad04fd9/BUILDINGS_WITH_HEIGHT.gpkg VEGETATION_WITH_HEIGHT: /tmp/processing_EkAUzF/972c4acb5bd445b2922361e631f80dfc/VEGETATION_WITH_HEIGHT.gpkg

Loading resulting layers The following layers were not correctly generated. • /tmp/processing_EkAUzF/6351da129e9f4d358b01396c0ad04fd9/BUILDINGS_WITH_HEIGHT.gpkg You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

j3r3m1 commented 8 months ago

You are right, by default a .gpkg file is created. I have made a trick to avoid it, it should be solved in the last snapshot version (cf. https://github.com/UMEP-dev/UMEP/discussions/535#discussioncomment-6475477 for more explanation about how to use it)

Jolysro commented 8 months ago

Thanks for your help!

I still cannot create BUILDINGS_WITH_HEIGHT:

_QGIS version: 3.36.0-Maidenhead QGIS code revision: 09951dc0acf Qt version: 5.15.3 Python version: 3.10.12 GDAL version: 3.4.3 GEOS version: 3.12.1-CAPI-1.18.1 PROJ version: Rel. 8.2.1, January 1st, 2022 PDAL version: 2.5.0 (git-version: Release) Algorithm started at: 2024-03-14T14:40:57 Algorithm 'Urban Wind Field: URock Prepare' starting… Input parameters: { 'BUILDINGS_WITH_HEIGHT' : '/tmp/build_vector.GeoJSON', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : None, 'INPUT_VEG_CDSM' : '/home/UMEP/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/Goteborg_SWEREF99_1200/CDSM_KRbig.asc', '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' : '/tmp/veg_vector.GeoJSON' }

Execution completed in 1.36 seconds Results: BUILDINGS_WITH_HEIGHT: /tmp/build_vector.GeoJSON VEGETATION_WITH_HEIGHT: /tmp/veg_vector.GeoJSON

Loading resulting layers The following layers were not correctly generated. • /tmp/buildvector.GeoJSON You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

I even tested the process on a another PC. Best

j3r3m1 commented 8 months ago

The process says that outputs have been created. Is it not the case ? You do not have any vector file in the tmp or the output is not loaded ? Have you tried choosing yourself the path where to save the output ?

Jolysro commented 8 months ago

/tmp/buildvector.GeoJSON is not created or even opened in QGIS ("The following layers were not correctly generated._"). Same for absolute paths.

It works fine for the vegetation vector.

j3r3m1 commented 8 months ago

Well it is very strange, I do not meet the problem, everything works fine for me with the last version, both for vegetation and building.

QGIS version: 3.28.3-Firenze Qt version: 5.15.8 Python version: 3.10.9 GDAL version: 3.6.2 GEOS version: 3.11.1-CAPI-1.17.1 PROJ version: Rel. 9.1.1, December 1st, 2022 PDAL version: 2.5.1 (git-version: c27d71) Algorithm started at: 2024-03-14T16:28:32 Algorithm 'Urban Wind Field: URock Prepare' starting… Input parameters: { 'BUILDINGS_WITH_HEIGHT' : '/tmp/build_vector.GeoJSON', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : '/home/decide/Data/TestsUMEP/Goteborg_SWEREF99_1200/Inputs/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : '/home/decide/Data/TestsUMEP/Goteborg_SWEREF99_1200/Inputs/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : '/home/decide/Data/TestsUMEP/Goteborg_SWEREF99_1200/Inputs/buildings.shp', 'INPUT_VEG_CDSM' : '/home/decide/Data/TestsUMEP/Goteborg_SWEREF99_1200/Inputs/CDSM_KRbig.asc', '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' : '/tmp/veg_vector.GeoJSON' }

Note that your vegetation layer has no SRID, thus the output has also no SRID Execution completed in 3.25 seconds Results: {'BUILDINGS_WITH_HEIGHT': '/tmp/build_vector.GeoJSON', 'VEGETATION_WITH_HEIGHT': '/tmp/veg_vector.GeoJSON'}

Loading resulting layers Algorithm 'Urban Wind Field: URock Prepare' finished

The most strange is why only the vegetation works ? Are you sure you are running the last UMEP version ? Did you restarted your QGIS session ?

@biglimp can you have a try to see if the problem is the same for other users ? The test case is the Göteborg one and the output should be left default.

biglimp commented 8 months ago

Mine works fine but are saved as shapefiles. I think we changed from GeoJSON to shp cos of some issues we hade. Are you running latest version?

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: 2024-03-14T16:35:53
Algorithm 'Urban Wind Field: URock Prepare' starting…
Input parameters:
{ 'BUILDINGS_WITH_HEIGHT' : 'C:/temp/build.shp', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/buildingsOSM_KR.shp', 'INPUT_VEG_CDSM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/CDSM_KRbig.asc', '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' : 'C:/temp/veg.shp' }

URock Prepare: Operation successful! Building and vegetation height file generated
Execution completed in 2.23 seconds
Results:
{'BUILDINGS_WITH_HEIGHT': 'C:/temp/build.shp',
'VEGETATION_WITH_HEIGHT': 'C:/temp/veg.shp'}

Loading resulting layers
Algorithm 'Urban Wind Field: URock Prepare' finished
Jolysro commented 8 months ago

On two separate computers, one running Windows and the other Ubuntu, I installed the latest version of zip_umep. After installing, I restarted both computers. However, upon using the software with my own data, it only generated a vegetation vector file and nothing else.

j3r3m1 commented 8 months ago

OK so you have tried to use an other dataset than your own data ? But did it work with the Göteborg test case data ?

Jolysro commented 8 months ago

" I have used the Goteborg data as an example. But it also does not work with my own data."

biglimp commented 8 months ago

Try go to your setting and chage so that default vector layer extension is shp.

image

Jolysro commented 8 months ago

biglimp uses a version which creates shp-files. Your j3r3m1 updated version (the version I use) is suppossed to create GeoJSON-files.

I tested the processing with "default vector layer extension" selection shp format and another time with GeoJSON as default. Negative -> Same error for building vector. I even restarted QGIS each time.

biglimp commented 8 months ago

Tried running and saving as GEOjson. Worked fine.

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: 2024-03-14T16:57:01
Algorithm 'Urban Wind Field: URock Prepare' starting…
Input parameters:
{ 'BUILDINGS_WITH_HEIGHT' : 'C:/temp/build.geojson', 'HEIGHT_VEG_FIELD' : '', 'INPUT_BUILD_DEM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/DEM_KRbig.tif', 'INPUT_BUILD_DSM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/DSM_KRbig.tif', 'INPUT_BUILD_FOOTPRINT' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/buildingsOSM_KR.shp', 'INPUT_VEG_CDSM' : 'C:/Users/xlinfr/Documents/PythonScripts/SOLWEIG/SOLWEIGdata/CDSM_KRbig.asc', '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' : 'C:/temp/veg.geojson' }

URock Prepare: Operation successful! Building and vegetation height file generated
Execution completed in 2.31 seconds
Results:
{'BUILDINGS_WITH_HEIGHT': 'C:/temp/build.geojson',
'VEGETATION_WITH_HEIGHT': 'C:/temp/veg.geojson'}

Loading resulting layers
Algorithm 'Urban Wind Field: URock Prepare' finished
j3r3m1 commented 8 months ago

If you select an other folder (other than temp) you also have the same problem ? For both computer you tested, did you have the same QGIS version ?

Jolysro commented 8 months ago

Yes.

Thanks a lot, for the prompt support. I will come back to the problem in the next few days and check everything again. Best