UMEP-dev / UMEP

Urban Multi-scale Environmental Predictor
https://umep-docs.readthedocs.io/
62 stars 15 forks source link

shadow generator not gives all files results for a full day calculation #346

Closed shovals123 closed 2 years ago

shovals123 commented 2 years ago

hi, I'm using umep version 3.18 and Qgis version 3.16.14. I have an error with shadow generator when creating a daily shadow pattern. I get the following message (for a full day calculation): warning:C:/Users/Shoval/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\ShadowGenerator\shadow_generator.py:262: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations dsm = gdal_dsm.ReadAsArray().astype(np.float)

         traceback: File "C:/Users/Shoval/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\UMEP.py", line 388, in SH
          sg.run()
          File "C:/Users/Shoval/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\ShadowGenerator\shadow_generator.py", line 464, in run
          self.dlg.exec_()
          File "C:/Users/Shoval/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\ShadowGenerator\shadow_generator.py", line 262, in start_progress
          dsm = gdal_dsm.ReadAsArray().astype(np.float)
          File "C:\Users\Shoval\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 297, in __getattr__
          warnings.warn(msg, DeprecationWarning, stacklevel=2)

Description When I run the daily shadow pattern I am attempting to produce a shadow raster every 2 minutes instead of casting the shadow only once. However, the model produces shadow raster files with random intervals, for example no images are produced from 02:00 until 13:00. Whilst some shadow raster files are produced, there are large time gaps.

To Reproduce Steps to reproduce the behavior:

  1. Go to UMEP --> Processor --> Daily Shadow Pattern.
  2. Upload the DSM attached below with no vegetation information.
  3. De-select "cast shadow only once", instead selecting a 2 minute interval for shadow raster to be produced.
  4. Add a UTC +2 hours
  5. Select the date 21-12-20XX (the year isn't specifically important for our analysis)
  6. Select a file on the desktop to save the images to.
  7. Run
  8. Check the raster files -- > problem.

Desktop (please complete the following information):

Screenshots problemo

Data GOVA_MIVNIM_MUZA.zip

Additional context Add any other context about the problem here.

biglimp commented 2 years ago

What CRS are you using? We are about to update the tool very soon. Then your issue with numpy float should be fixed.

shovals123 commented 2 years ago

@.***

From: biglimp @.> Sent: Tuesday, December 21, 2021 3:52 PM To: UMEP-dev/UMEP @.> Cc: Shoval Simon @.>; Author @.> Subject: Re: [UMEP-dev/UMEP] shadow generator not gives all files results for a full day calculation (Issue #346)

What CRS are you using? We are about to update the tool very soon. Then your issue with numpy float should be fixed.

— Reply to this email directly, view it on GitHubhttps://github.com/UMEP-dev/UMEP/issues/346#issuecomment-998796155, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXACTP2ARAWBMDPJWOTBEF3USCA7LANCNFSM5KQG2JOA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.**@.>>

biglimp commented 2 years ago

? CRS means Coordinate Reference System. You find it in lower right corner of your QGIS project.

shovals123 commented 2 years ago

I have changed the CRS to the local projection. This solved the problem. Thank you.