Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My app is a C# program that takes in an extent from the user, then loads GeoTIFFs from a folder that overlap the extent. It layers them according to a simple number on each GeoTIFF, then exports the result based on the user-supplied extent and saves that cropped version to a new file. I use the Global Mapper SDK for this and it works great.

I want to speed up the app by not loading any GeoTIFF which is already "covered" by other data. I notice that the GeoTIFF format has a mask. For example, I can see in the thumbnails for the GeoTIFF files in Windows Explorer a black background with a white foreground that is the actual data.

Is there a way to read this mask into a .NET image or similar? Then I would be maintain a growing bitmap of all masks ORed together, and able to skip loading any GeoTIFF that did not increase the white area. That would greatly reduce the time taken for the GM SDK to do the export because there would be less total layers loaded.

share|improve this question

The actual root cause as to why my app was slow and lead me down the optimisation rabbit hole was due to a bug in the Global Mapper SDK.

It's now been fixed and exporting GeoTIFFs is now roughly constant time even if there are a lot of layers loaded.

share|improve this answer

Your Answer


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.