Extract value from a png file with coordinate
Posted: 2015-10-04T01:12:48-07:00
Hi all IM users,
How to explain my problem ?
Well, I've got a png file which contains radar precipitation. The png size in pixel is 1536x1536 pixels.
So I would like to extract :
X Y Value like
1 0 pixelValue
2 0 pixelValue
.
.
.
etc...
In another file I have information of each od these 1536 pixels x 1536 pixels concerning coordinates
I got for this a .prj
ncols 1536
nrows 1536
xllcorner -619652.074056195910
yllcorner -5062818.337687556632
cellsize 999.999999840583
NODATA_value 63
As you can see
- We find the ncols and nrows
- We know the coordinates of the (0,0) pixels
- we know the pixels size which tell me the coordinate of each pixel.
The problem is that I'd like to extract each pixel of the png file and its Value
Do you think that there is a command to do this ?
Thank you very much for your helps.
Best regard
Stefan
How to explain my problem ?
Well, I've got a png file which contains radar precipitation. The png size in pixel is 1536x1536 pixels.
So I would like to extract :
X Y Value like
1 0 pixelValue
2 0 pixelValue
.
.
.
etc...
In another file I have information of each od these 1536 pixels x 1536 pixels concerning coordinates
I got for this a .prj
ncols 1536
nrows 1536
xllcorner -619652.074056195910
yllcorner -5062818.337687556632
cellsize 999.999999840583
NODATA_value 63
As you can see
- We find the ncols and nrows
- We know the coordinates of the (0,0) pixels
- we know the pixels size which tell me the coordinate of each pixel.
The problem is that I'd like to extract each pixel of the png file and its Value
Do you think that there is a command to do this ?
Thank you very much for your helps.
Best regard
Stefan