Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using OSGeo.GDAL;
- namespace GDALBug {
- class Program {
- static void Main(string[] args) {
- GdalConfiguration.ConfigureGdal();
- try {
- using (var sourceDataSet = Gdal.Open(args[0], Access.GA_ReadOnly)) {
- using (var driver = Gdal.GetDriverByName("GTiff")) {
- using (driver.CreateCopy(args[1], sourceDataSet, 0, new string[] { }, null, string.Empty)) {
- }
- }
- }
- }
- catch (Exception) {
- // heap exceptions cannot be caught from managed code ...
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement