3

Given a topographic raster image.

How to iterate through all pixels of this raster image ?

Solution preferably with gdal, in console. Some other libraries/script could be installed.


Related: Gdal: How to get a pixel's value from raster image?, How to conditionnally assign a new value to pixels of a raster image?.

Hugolpz
  • 2,653
  • 3
  • 26
  • 51
  • 1
    Why? The answer will depend on what you are trying to do as it may not be necessary to loop through all pixels individually... Also, please edit your question to include what software you want to use/have access to (i.e gdal utilities, gdal python bindings etc...) – user2856 Aug 20 '13 at 02:26
  • Iterate though all pixels of an image is a central question for image processing, it would be good to have an how to here. 2. My own need is How to conditionnally assign a new value to pixels of a raster image? (http://gis.stackexchange.com/questions/69129/), in this other question, looping through all is not necessary.
  • – Hugolpz Aug 20 '13 at 02:32
  • 2
    Iterating through pixels (as an end user) is rarely, if ever required, especially in a console script. There is plenty of image processing software available where the iteration happens in a low level compiled language and is optimised to be fast. – user2856 Aug 20 '13 at 03:20