zoran-cuckovic / QGIS-visibility-analysis

Quantum GIS plugin for visibility analysis
GNU General Public License v3.0
72 stars 17 forks source link

Python issue? #37

Closed Skimkat closed 3 years ago

Skimkat commented 4 years ago

Im using QGIS3.10. in Window 8.1 OS Created viewpoints using the plugin Use a DEM created from Vector contour line with IDW interpolation Get the following errors -

"C:/Users/Sarien/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ViewshedAnalysis\algorithms\viewshed_raster.py", line 233, in processAlgorithm refraction = refraction ) File "C:/Users/Sarien/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ViewshedAnalysis\algorithms\modules\Raster.py", line 147, in set_master_window self.window = np.zeros((full_size, full_size)) MemoryError: Unable to allocate array with shape (1998403, 1998403) and data type float64

zoran-cuckovic commented 4 years ago

Hello! This seems to be an issue of Lat/Lon data format. I've implemented a check-up in the code for this, but apparently they don't work as they should... The viewshed model is 2 milion by 2 milion pixels large, I assume because your DEM data is in degrees and not in meters. You should reproject the DEM in a metric coordinate system (regardless of the analysis you're up to). Or, better, you should create the DEM using the correct coordinate system for your contours. Regards, Zoran

Skimkat commented 4 years ago

Hi Zoran,

Thank you, I'll try again. The DEM was projected in WGS84/UTM (southern Hemisphere).

Regards,

Sarien

On 2020-01-27 16:22, Zoran Čučković wrote:

Hello! This seems to be an issue of Lat/Lon data format. I've implemented a check-up in the code for this, but apparently they don't work as they should... The viewshed model is 2 milion by 2 milion pixels large, I assume because your DEM data is in degrees and not in meters. You should reproject the DEM in a metric coordinate system (regardless of the analysis you're up to). Or, better, you should create the DEM using the correct coordinate system for your contours. Regards, Zoran

-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/zoran-cuckovic/QGIS-visibility-analysis/issues/37?email_source=notifications&email_token=AOMLUECSPKLGZJODGTWZOR3Q73U2FA5CNFSM4KL5QU52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ7VKTA#issuecomment-578770252 [2] https://github.com/notifications/unsubscribe-auth/AOMLUECJVJXC6T7UWN5XCZDQ73U2FANCNFSM4KL5QU5Q