Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm new here and I'm new at programing with GDAL C#.

My question is how I can get the value of SRTM GEOTIFF pixel to compare with it's neighbors, and how can I get the values of Geotiff tags.

share|improve this question
    
With the Python bindings, I would read the GeoTiff pixel values into a numpy array. Is there equivalent large array access in C#? –  DavidF Oct 24 '12 at 14:50
    
Hi DavidF, probably it will work, but in my program I need to use a mask 3x3 who will use to get the image pixels values to compare (or it is what I'm thinking for my porpose). –  José Roberto Ribeiro Filho Oct 24 '12 at 19:01

1 Answer 1

You have two questions:

  1. Reading pixel data from the Geotiff: Here you find a C# GDAL Read Raster Code Sample. The final reading method is called Band.ReadRaster!

  2. Reading Geotiff-Tags: Depends which Tags you mean...

    • If you want to read the GeoTransform-Parameters (Georeference-Info), you would do that with the method Dataset.GetGeoTransform.
    • If you want to read the Projection-Parameters, you would do that with Dataset.GetProjectionRef.
    • If you want to read any other Geotiff Tags, forget GDAL and use any other lib, like LibTiff.Net.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.