[gdal-dev] Java binding gdal.AutoCreateWarpedVRT question

Chaitanya kumar CH chaitanya.ch at gmail.com
Sun May 20 03:57:05 EDT 2012


Billy,

The returned dataset is a virtual dataset handle that has to be closed
after it is used.
But keep in mind that the returned dataset will acquire one or more
references of the original dataset. So, unless it is opened with
GDALOpenShared(), it's not a good idea to close the original dataset before
closing the warped dataset.

http://gdal.org/java/org/gdal/gdal/gdal.html#AutoCreateWarpedVRT%28org.gdal.gdal.Dataset,%20java.lang.String,%20java.lang.String,%20int,%20double%29

On Sun, May 20, 2012 at 6:39 AM, Billy Newman <newmanw10 at gmail.com> wrote:

> When get a Dataset Object back from the gdal.AutoCreateWarpedVRT(dataset)
> call do I need to call delete on the warped dataset and the original
> dataset, or just the original when I am done using the warped dataset?
> Sorry I did not understand the javadocs.
>
> Ex
>
> Dataset origDataset= gdal.Open("imagefile.ntf");
> Dataset warpedDataset = gdal.AutoCreateWarpedVRT(origDataset, wkt);
>
> // do some stuff with the wrapped dataset
> // .....
>
> //should i delete both?
> origDataset.delete();
> warpedDataset.delete();
>
> Thanks!
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120520/06f9e2f7/attachment.html


More information about the gdal-dev mailing list