|
POST
|
Hi Jayanta Poddar, Thank you very much. Your command on the topic is very helpful.
... View more
08-07-2017
12:10 AM
|
1
|
1
|
332
|
|
POST
|
Hi Xander Bakker, Thank you very much. Really very interesting script. And yes the step described by Dan Patterson and Jayanta Poddar is very easier to understand. And This script is one more step ahead rather than producing two different rasters for Negative and positive and then count the pixel numbers by doing Zonal Statistics. So this script may save the time. Instead of GDB file extension, can it be just file path (e.g r'D:\Raster_Statisctics\Count_Pixel\Zones). And it can be possible to use direct Shapefile instead of raster for extracting the zone information. I ran the script, but I am getting an error. I think the problem with my Zone's raster. I had a zone vector file (Attached below), which I converted it to a raster format in same spatial resolution as values_ras. I have attached my file which I am using for counting the negative and positive pixel for each zones. Please have a look. And the error message is : Input path: import numpy as np
zones_ras = r'D:\Raster_Statistics\Count_Pixel.gdb\Zones'
values_ras = r'D:\Raster_Statistics\Count_Pixel.gdb\NPP' Error message: load modules...
create numpy rasters...
Traceback (most recent call last):
File "<module1>", line 70, in <module>
File "<module1>", line 12, in main
File "C:\Program Files\ArcGIS\Desktop10.3\ArcPy\arcpy\__init__.py", line 2244, in RasterToNumPyArray
return _RasterToNumPyArray(*args, **kwargs)
RuntimeError: ERROR 000732: Input Raster: Dataset D:\Raster_Statistics\Count_Pixel.gdb\Zones does not exist or is not supported
... View more
08-07-2017
12:06 AM
|
0
|
13
|
3665
|
|
POST
|
Hi Dan Patterson , Jayanta Poddar, Thanks. I followed the suggestion given by you and I stuck here, I have attached an image, I want to count the pixel for Negative and positive classes for each zones. After classification < 0 and >0, I got the 0 and 1 value raster, after that i used Zonal statistics to get the pixel number for each zones. but its shows the total number of pixel in each zones, but I want it to count of the positive and Negative pixel for each zones. You can see above screenshot, For zone4 shows 571922 numbers of the pixel, but how to get the number of the pixel under to category of positive and negative for each zones. How to do it . Thank you Regards Shouvik Jha
... View more
08-05-2017
05:02 AM
|
0
|
18
|
3665
|
|
POST
|
Hi Xander Bakker, Thanks for sharing. Really very good idea to solve the pixel shifting error. And now everything is working perfectly.
... View more
08-05-2017
01:36 AM
|
0
|
1
|
1857
|
|
POST
|
Hi, Xander Bakker, Thanks for sharing the output raster. Really it's quite interesting result. I have cross checked the output raster which is attached by you, the output correlation raster is matched exactly with pixel wise calculation. Here-with i have attached the comparison between manual Vs Script result. But how you corrected the output raster, i did not understand the line by you "the georeferencing toolbar and used map algebra after setting the environment settings to match the NPP raster(s)" Please explain how you use the georeferencing toolbar and map algebra. Once again hearty gratitude for such wonderful script. Thanks & regards Shouvik Jha
... View more
08-03-2017
12:53 PM
|
0
|
4
|
1857
|
|
POST
|
Hi Xander Bakker, Thank you so much. Really a very wonderful script. please, can you attach the output raster which you got. I ran the script but the same issue with me also, it's producing one more row. After reading your comments, I USE the clip function in ArcGIS to bring the same extent as the parameter1 have. But the same issue persisting. Please tell me, how you manually correct that. Once again thanks for the interesting and very useful script. Thanks & regards Shouvik Jha
... View more
08-03-2017
11:07 AM
|
0
|
6
|
4835
|
|
POST
|
Hi All, I have a raster which contains value range from -20 to +20. I am trying to calculate the zone wise percentage of negative and positive pixel count within the zone. Somewhere I read TABULAR option can work, but it supported only the Vector data and Zonal statistics also can't that. So how to calculate the percentage of pixel count with in the zone. I have zone's shape file.
... View more
08-03-2017
02:56 AM
|
0
|
21
|
6769
|
|
POST
|
Hi Bakker , i have attached the data link for the reference purpose. Kindly have a look. Data link : Dropbox - Data.zip Thanks & regards Shouvik Jha
... View more
08-02-2017
01:16 PM
|
0
|
12
|
4835
|
|
POST
|
I am attaching my data, for your reference purpose.
... View more
08-02-2017
12:56 PM
|
0
|
13
|
4835
|
|
POST
|
Hi Xander Bakker, Yes i was talking about that thread only, but presently what I am talking is something different. lets we have two parameters. one just assumes Temperature and precipitation raster for 13 years. For calculating correlation we need some data points from both parameters. So this time we have two parameters, each parameter has 13 raster maps.one is WUE (Already we worked on that data) and another one vegetation density. So it will just calculate pixel basis correlation, value comes from 2 different. parameters over 13 rasters. If we take single pixel from both parameters of 13 rasters, so value would be like All value comes from single grid point. WUE raster Vegetation density raster raster1 200 100 raster2 250 120 raster3 300 130 raster4 350 150 raster5 250 120 raster6 150 100 raster7 120 140 raster8 130 150 raster9 so on 50 100 based on this value correlation coefficient is 0.36. Calculated in Excel "CORREL" command. I want similar calculation on the different grid basis and correlation value will be in raster format. Hope I explained properly. If you want some data, I can share with you. thanks
... View more
08-02-2017
12:28 PM
|
0
|
16
|
4835
|
|
POST
|
Xander Bakker, Heartly thanks for the Trendline script. It will help you many of GIS users. One more query since long I have, Just a few months back I posted one query regarding Correlation between two different rasters (Example: for X parameter 13 rasters and for Y parameter also the same numbers of raster) and output correlation would be raster format and spatial map of correlation raster will indicate the how two parameters are correlated, value of output -1 to +1. I got the response from you, but that code performs based on randomly generated point data over the raster and its created the correlation graph. As we know the spatial map of correlation can be easy and much better to understand and explain the relationship while we talking about the how X and Y correlated and variation over any region. I searched it, and many of Python user has been asked but not come out with a proper solution yet. Please, can you share your opinion, how it could be done in python? Thanks & regards Shouvik Jha
... View more
08-02-2017
10:27 AM
|
0
|
18
|
9247
|
|
POST
|
Hi Xander Bakker Thank you very much. Really this code helps us in many ways to do the statistical calculation. When I use the whole area that time also produced the same error (Increasing the row number) as earlier error, then i check it using another raster and I got the exact right result. Then I realized the Problem was not with the code, the problem was with data. After that, i just use the same data (WUE) but this time i used some tricky, First, i fill no data value as a Zero then extract the area of interest using my shape file, then I use the raster as an input of trend line analysis and got the exact result. What I realized, If the raster data contain any no data value that time the problem may occur. And you and Dan_Patterson grateful thanks to you people behalf of our team for your kind cooperation.
... View more
08-02-2017
05:59 AM
|
0
|
10
|
2704
|
|
POST
|
Hi Xander Bakker, Thank you very much. really a wonderful work has been done by you. I cross checked the output and it matched exactly with pixel wise manual calculation.
... View more
08-01-2017
06:46 AM
|
0
|
13
|
2704
|
|
POST
|
Hi Xander Bakker Really a speechless gratitude for such wonderful work. And it is appreciated by our team. I ran the script, after that, i cross check the output pixel values with manual calculation in excel corresponding to the same pixel. The output values are not matching with manual pixel wise calculation. It is slightly different. Our kind request please have a look on the matter. I have attached my Excel calculation sheet, where both values are assigned, from manual and script output value. Once again thanks for your such cooperation. Thanks & regards Shouvik Jha
... View more
07-31-2017
11:57 AM
|
1
|
16
|
2704
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-01-2017 09:56 PM | |
| 1 | 01-19-2017 08:03 AM | |
| 1 | 07-31-2017 11:57 AM | |
| 1 | 08-25-2016 09:38 AM | |
| 1 | 08-17-2016 11:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:25 AM
|