Calculating Zonal Statistics of a Raster using Python

  Рет қаралды 14,456

GeoDelta Labs

GeoDelta Labs

Күн бұрын

Пікірлер: 57
@olssonfilip
@olssonfilip 4 жыл бұрын
Just wanted to thank you for these vids, wish I had them during my time at Uni but now as a GIS professional I’m feeling even more inspired by your work! Looking forward to the next one : )
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Glad you like them!
@kaustavdas5600
@kaustavdas5600 Жыл бұрын
@geodeltalabs: In the same code, if I want to extract the 95th percentile value, what modification in the code do I need to do ?
@muhammadanjum524
@muhammadanjum524 4 жыл бұрын
Dear Sir , Thank you soooooooooooooo much . You are sooo nice and kind . You are sooo expert in GIS . I hope you will continue your help .Its really very very helpful for me . I actually want to do that one . Sir, you solved my problem . Once again THANK YOU soo much .
@moisengwa9904
@moisengwa9904 4 жыл бұрын
Very Good job GeoDelta Labs. I don't have enough words to thank you. Please please kindly post the part 2 tutorial Calculating Zonal Statistics of a Raster using Python. Looking forward to that:
@mulugetaworkuayele6412
@mulugetaworkuayele6412 2 жыл бұрын
I am too late to learn from this interesting and very useful tutorial. Thank you so much!
@geodeltalabs
@geodeltalabs Жыл бұрын
Better late than never :)
@abramswee
@abramswee 11 ай бұрын
Thank you very much for sharing this with us! much appreciated.
@shaileshshrestha9725
@shaileshshrestha9725 4 жыл бұрын
good job bro...more geopandas pls.. one thing you have a good voice
@amitblizer4567
@amitblizer4567 2 жыл бұрын
Thank you. This was very helpful for me in my thesis🙏
@jeffz7310
@jeffz7310 2 жыл бұрын
I didn't need to go to Uni because of these videos, thx
@gmjakirullahnooruddin1734
@gmjakirullahnooruddin1734 4 жыл бұрын
Dear @GeoDelta Labs, Thanks for this great tutorial. Very much appreciable. Waiting for part two with multiple raster data. I have a couple questions. Do I have to project both my vector and raster dataset? If so how could I project multiple raster datasets at once? and the second question is while plotting/showing the raster data how could I show also raster scale right-side on my raster plot? Thanks in advance.
@yaarobmohammad1020
@yaarobmohammad1020 4 жыл бұрын
You are the best
@kaustavdas5600
@kaustavdas5600 Жыл бұрын
Thanks a lot for this! ...just one question, if I want to extract the 95th percentile at any of the districts, wherever the raster is present. What modification in the code do I need to do. Anyone's help is really appreciated
@rafaeltiara9092
@rafaeltiara9092 4 жыл бұрын
Great tutorial. Thank you!
@aakashbhatt3303
@aakashbhatt3303 2 жыл бұрын
Hi @Geo Data Labs, Great Tutorial thanks for this And please can you make tutorials on the liabrary raterio
@DileepGuptagoodman
@DileepGuptagoodman 3 жыл бұрын
Very nice video . I like sir . 👍👍👍
@geodeltalabs
@geodeltalabs 3 жыл бұрын
Thanks!
@reshmaa8818
@reshmaa8818 2 жыл бұрын
How to install rasterio and rasterstats?? Can you provide your video link below
@manuvideos3979
@manuvideos3979 2 жыл бұрын
Hello, Thanks for this great tutorial. I have a question, while calculating the average, are taking in account the nodata pixels? If yes, is there a way to exclude nodata pixels while calculating average? Thanks in advance for your answer.
@sonukumar-cy1fo
@sonukumar-cy1fo 3 жыл бұрын
Sir, I got this error :MemoryError: Unable to allocate 21.4 TiB for an array with shape (2028294, 1449644) and data type float64. please help me
@umairrasool9580
@umairrasool9580 4 жыл бұрын
Very great and clear work you have done. i have a question please, i am working on my raster dataset for prediction like ANN, RF and CNN, i have converted the rasters into numeric and then train and test the data and got very good accuracy. Now i need to convert my test data into raster again as final prediction map but i don't know how to do this, please guide me thanks.
@yaarobmohammad1020
@yaarobmohammad1020 4 жыл бұрын
Can you please make more videos How to extract and compute volumes from raster How to make hydrogeological analysis And so on
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Hi, do you mean to just to do a one time computation of the volume from a raster? If you do not have a specific reason to use scripting to do that, I believe you can do this kind of processes quite easily using qgis
@yaarobmohammad1020
@yaarobmohammad1020 4 жыл бұрын
GeoDelta Labs I think that coding always better than do it with software ; because u can use you’re code always with different situations and faster Thank you so much
@australoitaliano
@australoitaliano 4 жыл бұрын
@GeoDelta Labs, thank you very much for this fantastic tutorial. Just one question: how can I save the "mean" dataset in the shapefile? After I have performed the zonal statistic, I have open the shapefile with QGis but the "mean" column was not present in the attribute table. Thanks
@muhammadanjum524
@muhammadanjum524 4 жыл бұрын
Dear Sir, I am also trying to use QGIs and also python , but I could not my results . Can we discuss Please ?
@DileepGuptagoodman
@DileepGuptagoodman 3 жыл бұрын
Please make the video for mapping of CSV data in geotiff. CSV have lat lon and values
@sonalisharma3421
@sonalisharma3421 2 жыл бұрын
Hello Sir, can you please tell me how to perform zonal statistics on each band of raster stack. Thank you very much for making such useful videos.
@JesusRomero-zw8yw
@JesusRomero-zw8yw 2 жыл бұрын
Thanks for the explanation, but if I want to extract the areal average of each day (that is, the average area of ​​a polygon) from a netcdf file, for example precipitation or temperature, maybe some idea
@geodeltalabs
@geodeltalabs 2 жыл бұрын
Hi, for this I suggest you follow the tutorials that I have done on handling netcdf files using python. You might be able to modify the code in such a way that you would be able to extract the values into a separate set based on their geographical position, and perform the statistical operations on those extracted values.
@raquelzafrir2752
@raquelzafrir2752 4 жыл бұрын
Hi GeoDelta thanks for the video. I have a question. Did you check the values where your raster has no data or zero values? I am getting negative values and I do not know how to correct them. Thanks!
@hugonicolaubarbosadegusmao7824
@hugonicolaubarbosadegusmao7824 4 жыл бұрын
The tutorial was very good, I learned a lot! A question, where did you download this data? I wanted to download to Brazil.
@mohammadbelalalzoubi8102
@mohammadbelalalzoubi8102 3 жыл бұрын
Thank you. It was a great video.
@geodeltalabs
@geodeltalabs 3 жыл бұрын
You are welcome :)
@daanidev
@daanidev 4 жыл бұрын
Hi, Can you please tell me how you prepare tif files? i have tif files and shape file but i am unable to map correctly just as you did in this video. Can you help me with it? Thanks
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Hi, did you check whether both the raster and the vector files are having the same coordinate reference?
@daanidev
@daanidev 4 жыл бұрын
@@geodeltalabs Hi my shape file and raster file has same crs can you please help me to show shape file over raster in python ?
@daanidev
@daanidev 4 жыл бұрын
@@geodeltalabs thanks issue solved (Y)
@rajuahmmad9923
@rajuahmmad9923 4 жыл бұрын
I have converted APHRODITE precipitation data from netcdf to tif file. After that, i followed your tutorial and calculated mean value for each subbasin within my watershed shapefile, But i got NaN value in three of my subbasin. Could you please point out what might be the possible cause of this problem. Thanks in advance.
@slimieboy6264
@slimieboy6264 10 ай бұрын
having the same issue with a tif converted from a netcdf. idk what is wrong tbh
@malaymondal9953
@malaymondal9953 4 жыл бұрын
From which site we can get raster weather data, like wind speed, rainfall, temp etc.
@geodeltalabs
@geodeltalabs 4 жыл бұрын
You can try Aphrodite's portal for rainfall and temp in netCDF format. Windspeed, not so sure.
@andresfiallos7112
@andresfiallos7112 4 жыл бұрын
Hello GeoDeltaLabs, thanks a lot for this great video. I have a question and was hoping someone here can help me. When I run this line "avg_rf = rasterstats.zonal_stats(districts, rainfall_array, affine = affine, stats = ['mean'], geojson_out = True)" I get the following error: "MemoryError: Unable to allocate 3.95 TiB for an array with shape (620193, 874319) and data type float64" I have been trying to resolve this issue but I havent been able to do so. I would really appreciate the help!
@jitutiwari7813
@jitutiwari7813 3 жыл бұрын
Hi, first of all Thank you for this Tutorial. I am a GIS and remote Sensing student and also want to Learn python for geospatial task can you please suggest me how could i learn python. or which books or tutorial can help me. waiting for your response. and please can you tell me how to calculate zonal on bigTiff.
@geodeltalabs
@geodeltalabs 3 жыл бұрын
You are welcome :)
@shakhawathossainshohel5159
@shakhawathossainshohel5159 4 жыл бұрын
Thanks a lot for the video, it was great. But I need to learn zonal statistics for multiple netcdf file like daily TRMM. Would you please help me?
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Better try to convert to raster first.
@eddisonjose
@eddisonjose 4 жыл бұрын
Hola muchas gracias, eso se puede hacer en pycharm? Soy neófito en programación, pero que opinas del programa pycharm? Saludos
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Hello Eddison, pycharm is a good IDE too, however I have always worked with Spyder IDE, as the interface is simple, but sufficient enough to get the job done. You can indeed use pycharm to do all what we are doing here
@eddisonjose
@eddisonjose 4 жыл бұрын
@@geodeltalabs hola muchas gracias por su respuesta y amabilidad
@eddisonjose
@eddisonjose 4 жыл бұрын
GeoDelta Labs Hola una pregunta mas: Que opinas de hacer estos procesos en jupyter notebook? es factible? se pueden hacer allí?🙂
@muhammadanjum524
@muhammadanjum524 4 жыл бұрын
Dear Sir, this is really really an excellent video for zonal statistics . But I followed your method but could not get results . I need to discuss . Sir, Please help me .This is my very very humble request . Please . I need to discuss with you . Please let me know how and where can i discuss with you ? Please my most humble request . Please reply positively as soon as possible . Please
@geodeltalabs
@geodeltalabs 4 жыл бұрын
Hi, kindly send your query to our email. Thank you.
@muhammadanjum524
@muhammadanjum524 4 жыл бұрын
@@geodeltalabs Sir, I have raster , I did calculate average monthly values by using QGIS raster calculator and now I want to calculate Zonal statistics . How can i send you my raster and shape file . Please help me . Sir, its my humble request that how can i send you ? Please
@wonga_masiza
@wonga_masiza 4 жыл бұрын
I wish I could do all this in R. ..I can't install some of these packages as I am not administrator. I have to log calls to our service desk every time I need to install a package. When I try installing them on my laptop I get errors that I must provide a path to GDAL.. Last time I had to use anything related to GDAL it gave me hell. Its easier to install all these packages in R... my goodness, I have to migrate to python once. I am going to die
Extracting Topographic Elevations using Python
16:49
GeoDelta Labs
Рет қаралды 11 М.
Wall Rebound Challenge 🙈😱
00:34
Celine Dept
Рет қаралды 12 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 13 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 16 МЛН
Automating Raster Data Extraction using Python
21:36
GeoDelta Labs
Рет қаралды 14 М.
How Stellantis Destroyed Jeep
14:12
More Perfect Union
Рет қаралды 957 М.
Derailed: Germany's $60BN Railway Rescue Plan
13:48
The B1M
Рет қаралды 530 М.
10 Geoprocessing Applications of GeoPandas Library
51:33
GeoDelta Labs
Рет қаралды 31 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
Wall Rebound Challenge 🙈😱
00:34
Celine Dept
Рет қаралды 12 МЛН