Is there a managed library for reading the coordinates from a geotiff file in .NET ?

I know it can be done thru GDAL, but I am looking for a managed alternative.

  • You could use Manifold: manifold.net, but you would need at least their runtime to distribute with your application. You would have to read the GeoTIFF as a Manifold component before querying from it though, which may be a no go for you. It's all managed VC++ under the hood, and their GeoTIFF reader is written by them. You can test with VBScript or C# scripts inside the application, and then port to an external app in C# or whatever. – mdsumner Feb 24 '11 at 7:57
  • otherwise the mapwindow api might be useful, I'm sure there's others too which I'll post if I remember – mdsumner Feb 24 '11 at 8:01

How bout libtiff.net

| improve this answer | |

You can use the GDAL included .NET wrappers. This allows you to access any of the GDAL functionality from within managed code.

| improve this answer | |
  • I agree...best to stick with the battle-tested code in this case – WolfOdrade Feb 23 '11 at 18:27
  • This is still unmanaged GDAL under the hood. In this particular case I am looking for managed only. – BjartN Feb 24 '11 at 6:35
  • 1
    @BjartN: You can always use System.Drawing.Bitmap.PropertyItems, then handle processing the GeoTiff tags yourself: remotesensing.org/geotiff/spec/geotiff2.6.html#2.6.1 However, I'd rather use a managed wrapper around a native library... – Reed Copsey Feb 24 '11 at 6:43
  • Thx this might be what I am looking for. I will investigate :) Also, I might end up with a managed wrapper, but I'm not very keen on taking a dependency on GDAL. Would prefer something more lightweight. – BjartN Feb 25 '11 at 5:27

You won't see many in managed C#, due to the performance and memory usage limitation imposed by the .NET Framework memory management layer. Don't get me wrong -- I love C# and .NET. However, native C++ is much faster and (in my opinion) less frustrating to write, in this case.

Surveys typically contain many GeoTIFF files, which requires a lot of memory and manipulation of data, when performing geotransforms (i.e. WGS82 to UTMM to TIFF X-Y coordinate, and then back again.) Demand for memory performance and management efficiency increases further, when you involve things like compiling results of linear, radial, and area surveys.

You probably don;t want to hear this, but writing a parser in native C++ and then wrapping it into C# is going to greatly increase performance and eliminate memory limitations. Writing a parser is actually pretty easy, and will be very lightweight, as you can tailor it to your needs. You will find this particularly true, when integrating more advanced features, such as automatic selection and spanning of GeoTIFF files.

| improve this answer | |
  • I give you a point for the value add :) – BjartN Mar 22 '11 at 5:54
  • Much appreciated! ;) – Mike Christian Mar 23 '11 at 22:27

How about this bit of code?

| improve this answer | |
  • This is unmanaged GDAL under the hood as well – BjartN Feb 24 '11 at 6:36
  • The link is now no longer accessible – Graviton Dec 10 '18 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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