<div dir="ltr"><div>Hi Jukka,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 17, 2020 at 2:57 AM jratike80 <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I have done some helpdesk work within the GDAL community and I know well<br>
that the open options and config options are confusing. I also know that<br>
they exists for a reason but simplified and uniform way to use them would be<br>
nice.<br></blockquote><div><br></div><div>I'm glad to read that you're interested! I believe there is tension between simple and uniform and we'll need wide input to find a good balance.<br></div><div><br></div><div>I've been using QGIS today for the first time in a while and I think that application could benefit from this as well. A "URL" for datasets could remove some of the complexity of QGIS dialog boxes for creating or configuring connections.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Some comments on comments:<br>
<br>
>> gdalinfo my.tif -oo GEOREF_SOURCES=WORLDFILE,PAM<br>
>><br>
<br>
> Ideally this would be baked into the format, but, yes, I think we've got a<br>
> bead on dataset open options.<br>
<br>
I don't know how it could be baked into the format. The option gives user an<br>
option to override wrong GeoTIFF georeferencing with wordfile, for example.<br></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>> gdalinfo BAG:"data/test_vr.bag":supergrid:0:1<br>
>><br>
<br>
> DRIVER:"file":something<br>
<br>
> Right. This will require some work because of multiple colons. Though I've<br>
> never seen BAG driver data in the wild. Is this a real live format?<br>
<br>
As far as I know BAG is the hdf of bathymetry and widely used in that<br>
context.<br>
<br>
>> gdalinfo data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo SUPERGRIDS_MASK=YES<br>
>> gdalinfo HDF5:"d:\foo.he5"://HDFEOS/SWATHS/foo/bar<br>
>><br>
<br>
> HDF5 driver, filename using Windows drive, and UNC path within it. This is<br>
> marginal, right?<br>
<br>
The part beginning with // is not UNC path but the name of the subdataset<br>
within hdf5 file <a href="https://gdal.org/drivers/raster/hdf5.html" rel="noreferrer" target="_blank">https://gdal.org/drivers/raster/hdf5.html</a>. Not more<br>
marginal than HDF5 itself.<br>
<br></blockquote><div><br></div><div>Thank you for explaining.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>> ogrinfo OCI:warmerda/password@.dreadfest<br>
<br>
>Wat?<br>
<br>
Text has just been formatted into email link because of the @ sign that<br>
belongs to the Oracle connection string "username" / "password" @ "the name<br>
of the Oracle database as it appears in the tnsnames.ora file". Let's see if<br>
formatting happens again when I send this from Nabble:<br>
<br>
OCI:warmerda/<a href="mailto:password@gdal800.dreadfest.com" target="_blank">password@gdal800.dreadfest.com</a> abc.shp<br></blockquote><div><br></div><div>Thanks.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
<br>
Sean Gillies-3 wrote<br>
> Hi Even,<br>
> <br>
> On Wed, Nov 4, 2020 at 9:01 AM Even Rouault &lt;<br>
<br>
> even.rouault@<br>
<br>
> &gt;<br>
> wrote:<br>
> <br>
>> > > Another particularity we have in GDAL is that the dataset name might<br>
>> be<br>
>> > > almost<br>
>> > > anything. Most of the time, it is a regular file path, or some /vsi<br>
>> path.<br>
>> > > But<br>
>> > > sometimes, it can be JSON content (the GeoJSON driver accepts the<br>
>> content<br>
>> > > to<br>
>> > > be directly provided as the dataset name), or XML (VRT, WMS drivers).<br>
>> > > We have also the subdataset syntax "HDF5:foo.hdf:my_variable"<br>
>> ><br>
>> > Could VRT XML and JSON be exempted? We already have a way to embed open<br>
>> > options in the XML.<br>
>><br>
>> If the gdn: mechanism is a new possibility offered that doesn't exclude<br>
>> existing ones (otherwise that would be a pretty big breaking change), we<br>
>> could<br>
>> possibly exempt the odd cases I mentioned (or have some quoting/escaping<br>
>> rules<br>
>> to enable that payload to be seen as a file), which generally don't need<br>
>> a<br>
>> "permanent" way of refering to the dataset like gdn: would offer, since<br>
>> this<br>
>> is content often generated programatically or retrieved dynamically.<br>
>><br>
>> Covering subdataset would be a more important use case. Something that<br>
>> would<br>
>> have to be decided if the way we express subdatasets would be somehow<br>
>> standardized or if it would be a black-box string for the gdn:<br>
>> encapsulation.<br>
>> For a black-box approach, we would have to define some escaping/quoting<br>
>> rules<br>
>> to avoid any potential issue with separators of the gdn syntax. If we<br>
>> decide<br>
>> that the subdataset syntax is part of what is standardized by GDN that<br>
>> would<br>
>> be a more challenging exercice, because the subdataset syntax varies from<br>
>> driver to driver.<br>
>><br>
> <br>
> The variation of subdataset syntax among drivers is a bug, let's try to<br>
> fix<br>
> this.<br>
> <br>
> It seems to me that the internet way to address subdatasets would be to<br>
> use<br>
> a # URL fragment. But since most of our formats and the servers that serve<br>
> files of these formats are not aware, we may have to come up with<br>
> something<br>
> different. We may need to consider making subdatasets a layer opening<br>
> option?<br>
> <br>
> pending on how we design things, that might impact between:<br>
>> - just GDALOpen() generic code if GDALOpen() decodes the gdn: string to<br>
>> decompose it into 'classic' dataset names and open options<br>
>> - all drivers if the gdn: string would be passed to each<br>
>> GDALDriver::pfnOpen()<br>
>> implementation<br>
>> - intermediate situation if we decide to drop (at least for future<br>
>> drivers)<br>
>> per-driver subdataset syntax (which has deficiencies has the quoting<br>
>> rules<br>
>> to<br>
>> separate the filename from the non-filename component vary from driver to<br>
>> driver, and are most of the time not defined) to come up with something<br>
>> more<br>
>> standardized<br>
>><br>
>> To help brainstorming, a non-exhaustive overview of a few situations<br>
>> mixing<br>
>> driver prefixing, subdataset syntax and open options:<br>
>><br>
>> gdalinfo my.tif<br>
>><br>
> <br>
> Yes. We have to handle bare paths to local dataset files.<br>
> <br>
> <br>
>> gdalinfo my.tif -oo GEOREF_SOURCES=WORLDFILE,PAM<br>
>><br>
> <br>
> Ideally this would be baked into the format, but, yes, I think we've got a<br>
> bead on dataset open options.<br>
> <br>
> <br>
>> gdalinfo GTIFF_DIR:0:d:\my.tif<br>
>><br>
> <br>
> WTF is this? :)<br>
> <br>
> <br>
>> gdalinfo EEDAI:my/asset<br>
>> gdalinfo EEDAI: -oo ASSET=my/asset<br>
>> gdalinfo EEDAI:my/asset:band1, band2<br>
>> gdalinfo EEDAI: -oo ASSET=my/asset -oo BANDS=band1,band2<br>
>><br>
> <br>
> Never seen these.<br>
> <br>
> <br>
>> gdalinfo BAG:"data/test_vr.bag":supergrid:0:1<br>
>><br>
> <br>
> DRIVER:"file":something<br>
> <br>
> Right. This will require some work because of multiple colons. Though I've<br>
> never seen BAG driver data in the wild. Is this a real live format?<br>
> <br>
> <br>
>> gdalinfo data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo SUPERGRIDS_MASK=YES<br>
>> gdalinfo HDF5:"d:\foo.he5"://HDFEOS/SWATHS/foo/bar<br>
>><br>
> <br>
> HDF5 driver, filename using Windows drive, and UNC path within it. This is<br>
> marginal, right?<br>
> <br>
> <br>
>> gdalinfo netCDF:"/vsicurl/<a href="http://example.com/my.nc" rel="noreferrer" target="_blank">http://example.com/my.nc</a>":my_var<br>
>><br>
> <br>
> This looks less complicated than some of the examples above.<br>
> <br>
> <br>
>> ogrinfo "PG:dbname=testdb user=foo"<br>
>> ogrinfo "mySQL:testdb,user=foo"<br>
>><br>
> <br>
> These seem like they could be driver specific, but generalized key-value<br>
> parameters.<br>
> <br>
> <br>
>> ogrinfo OCI:warmerda/<br>
<br>
> password@.dreadfest<br>
<br>
> <br>
> <br>
> Wat?<br>
> <br>
> <br>
>> GDALOpen() is not even aware that HDF5:bla means that the dataset will be<br>
>> recognized by the HDF5 driver<br>
>><br>
>><br>
> Wait what?<br>
> <br>
> -- <br>
> Sean Gillies<br>
> <br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
<br>
> gdal-dev@.osgeo<br>
<br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.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="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Sean Gillies</div></div></div>