<div dir="ltr">With this RFC, you could achieve this using GDALOpenEx()<div><br></div><div>e.g. GDALOpenEx( "ASDFG", GDAL_OF_ALL, "QWERTY")</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, May 16, 2014 at 11:01 AM, Ivan Lucena <span dir="ltr"><<a href="mailto:lucena_ivan@hotmail.com" target="_blank">lucena_ivan@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Even,<br><br>Yes, it is hard to measure the impact of probing in a single file or any interactive command line operations.<br><br>In the current API the class Driver doesn't expose the Open method:<br>
<br><blockquote><b>Driver drv = gdal.GetDriverByName("QWERTY");</b><br><b>Dataset dst = drv.Open("ASDFG");</b><br></blockquote><br>IMHO that is a <b>missing functionality</b> in GDAL API. <br><br>GDAL API is a library to support Geospatial Data Abastration not just a format conversion tool. You should be able the use it even if your sole intention is do deal with the fictitious "QWERTY" format. IMHO. Yes, you can delete all the driver or put then all on the black list but that may not be the best solution.<br>
<br>The frustration of some user/programmer could be that they know what driver they want to use and they don't want to waste time probing; they don't want GDAL to get confused by files that can be supported by driver A and B; and most important they want to process a very very large number of files (ETL) or repeated times (WEB).<br>
<br>The RFC 36 is just a band-aid solution. It starts from the fact that some drivers already haven a prefix like "HDF4:" and use it to select the driver. As you can see, the suggested code is not that pretty [<a href="http://trac.osgeo.org/gdal/ticket/3043" target="_blank">http://trac.osgeo.org/gdal/ticket/3043</a>] since there is no Driver::Open method available.<br>
<br>Regards,<br><br>Ivan<br><br><div>> Date: Fri, 16 May 2014 13:36:08 +0200<br>> From: <a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a><br>> To: <a href="mailto:lucena_ivan@hotmail.com" target="_blank">lucena_ivan@hotmail.com</a><br>
> CC: <a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>; <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>> Subject: RE: [gdal-dev] Call for discussion on RFC 46: GDAL/OGR unification<div>
<div class="h5"><br>> <br>> Ivan,<br>> <br>> yes indeed, I missed that one. I'll update the RFC with it.<br>> I think that the intent of RFC36 is covered by what is already proposed in RFC46<br>> with the papszAllowedDrivers of GDALOpenEx().<br>
> <br>> I do not think that specifying the candidate driver(s) is that usefull in<br>> utilities since the time to launch them will be generally higher than the<br>> probing time. But that could be easily implemented later with an option if that<br>
> was really needed (e.g. gdalinfo foo.tif -driver gtiff or possibly gdalinfo<br>> foo.jp2 -driver jp2ecw,jp2openjpeg).<br>> Due to the work I did in OGR drivers to avoid repeated file access by using<br>> GDALOpenInfo*, I don't think that GDAL drivers should be affected. And the OGR<br>
> drivers are registered after the GDAL ones. So if the file being opened is<br>> really a GDAL dataset, the OGR drivers should have 0 impact on the opening time.<br>> I did try to benchmark a bit that, but it is difficult to come to a firm<br>
> conclusion since there are many factors: hot/cold runs, whether you spawn a new<br>> process or use an existing one, etc.. And the time being measured are a few tens<br>> of milliseconds, so very sensitive to task scheduling.<br>
> <br>> Even<br>> <br>> > Even,<br>> ><br>> > I think that RFC 36 should be included in your list of<br>> > related RFCs and should be reconsider for adoption since the unification<br>> > would make the probing even more expensive.<br>
> ><br>> > Regards,<br>> ><br>> > Ivan<br>> ><br>> > > From: <a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a><br>> > > To: <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
> > > Date: Thu, 15 May 2014 20:47:32 +0200<br>> > > Subject: Re: [gdal-dev] Call for discussion on RFC 46: GDAL/OGR unification<br>> > ><br>> > > Le jeudi 08 mai 2014 00:13:22, Even Rouault a écrit :<br>
> > > > Hi,<br>> > > ><br>> > > > This is a call for discussion on "RFC 46: GDAL/OGR unification"<br>> > > ><br>> > > > <a href="http://trac.osgeo.org/gdal/wiki/rfc46_gdal_ogr_unification" target="_blank">http://trac.osgeo.org/gdal/wiki/rfc46_gdal_ogr_unification</a><br>
> > > ><br>> > ><br>> > > No reaction : no interest or no time to review yet ?<br>> > > Or should I move that forward ?<br>> > > But I'd prefer if such architectural changes could be a bit reviewed...<br>
> > ><br>> > > > Best regards,<br>> > > ><br>> > > > Even<br>> > ><br>> > > --<br>> > > Geospatial professional services<br>> > > <a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
> > > _______________________________________________<br>> > > gdal-dev mailing list<br>> > > <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">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>
> ><br>> <br>> <br></div></div></div> </div></div>
<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></div>