[FWTools] Latest build of GDAL and FWTools

andyNEXT andrea.pistoni at next.it
Thu Jan 31 10:13:25 EST 2008


Hello Brian!

I'm working with the gdal_csharp.dll using the callback mechanism in
CreateCopy method. With the release 2.0.4 i've had problems but now with the
rel 2.0.5, that uses GdalDelegate, the code is succesfully compiled :))

My task is to read a HDF5 Dataset and convert it in GeoTiff format.ù

The problem arises when i launch my application at the CreateCopy(...)
method with the error message more or less like the following (translating
from italian....sorry): 

"You are trying to read/write on protected memory. Often this condition
means that other parts of memory are damaged."

Have you had such kind of problems with your code? Maybe, Am I using wrongly
the "CreateCopy" method? 

Below part of my code:

Thanks in advance

Andrea Pistoni
Italy

 
 
class Class1

{
  .....
  .....

       public static int SampleDelegateMethod1(double Complete, IntPtr
Message, IntPtr Data)
        { 
         ... // Manage the progress bar of the MMI
         ... //  
         return 1;
        }

        public static void Main (string[] args)

        {
         .....
         .....
         try
        {
                Gdal.AllRegister();
                Dataset ds = Gdal.Open(args[0], Access.GA_ReadOnly);
                Driver Geotiff = Gdal.GetDriverByName("Gtiff");
                ....
                ....
                string[] papOptions;
                papOptions = new string[1];
                papOptions[0] = "TILED=YES";

               Gdal.GDALProgressFuncDelegate d3 = new
Gdal.GDALProgressFuncDelegate(SampleDelegateMethod1);
                string callbk_data= "Sample Data";
                Dataset GTiffImage =
Geotiff.CreateCopy("d:\\andrea_test.tif", ds, 0, papOptions, 
                    d3, callbk_data);
              .....
        }
        catch {}
        .....
        .....
      } // Main

} // Class1


####################################################



Brian Trautman wrote:
> 
> Hello,
> 
> I'm working with the GDAL Library in C#.  It seems that a recent fix was
> checked in for GDAL on 12/28/2007 http://trac.osgeo.org/gdal/ticket/2122 
> that I need.  The date of the build for FWTools that I see on the
> gdal_csharp.dll is the 21st of December.
> 
> I was wondering if a build could be made available with the latest fixes
> in it?  Thank you very much for your help, being able to use GDAL from C#
> is really useful!
> 
> If there is a way I can take the latest GDAL build myself and make it work
> in C# I would do that, I just don't know how at this point.
> 
> Thanks,
> Brian
> 
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Latest-build-of-GDAL-and-FWTools-tp15153991p15203178.html
Sent from the FWTools mailing list archive at Nabble.com.




More information about the FWTools mailing list