Billy,<br><br>The returned dataset is a virtual dataset handle that has to be closed after it is used.<br>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.<br>
<br><a href="http://gdal.org/java/org/gdal/gdal/gdal.html#AutoCreateWarpedVRT%28org.gdal.gdal.Dataset,%20java.lang.String,%20java.lang.String,%20int,%20double%29">http://gdal.org/java/org/gdal/gdal/gdal.html#AutoCreateWarpedVRT%28org.gdal.gdal.Dataset,%20java.lang.String,%20java.lang.String,%20int,%20double%29</a><br>
<br><div class="gmail_quote">On Sun, May 20, 2012 at 6:39 AM, Billy Newman <span dir="ltr"><<a href="mailto:newmanw10@gmail.com" target="_blank">newmanw10@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>Ex<br><br>Dataset origDataset= gdal.Open("imagefile.ntf");<br>Dataset warpedDataset = gdal.AutoCreateWarpedVRT(origDataset, wkt);<br><br>// do some stuff with the wrapped dataset<br>// .....<br><br>//should i delete both?<br>
origDataset.delete();<br>warpedDataset.delete();<br><br>Thanks!<br><br>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
<br>+91-9494447584<br>17.2416N 80.1426E<br>