I'm working with on a DEM (Geotiff) in Python GDAL, and I'd like to find out the spikes or pits in my terrain.
I have no idea how to proceed, does anyone have good algorithm to help me out?
GDAL doesn't have a ready-made utility for this that I know of. You would probably have to script something.
Spikes pose a different problem and you'll need to consider a median filter and/or Gausian blur. See this thread for more discussion on spikes.