-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdalbuildvrt: error on non-integer '-sd' #9672
Comments
I do not see "name" in the documentation https://gdal.org/programs/gdalbuildvrt.html and by the documentation using full subdataset name is supported.
It would be good to check that the value of I guess that |
I know almost nothing about NetCDF, but I would expect that gdalinfo would list the names of the subdatasets if they exist, but these commands do not find subdatasets:
Running your original command prints these messages for me:
If all inputs are skipped then no VRT as a result is expected. |
oh wait, I missed that ambiguity - "full name is supported", I read that as full name == "DRIVER:{dsn}:SUBDATASET" as input to the utility i.e. '<input_raster> [<input_raster>]...' not as input to the "-sd" arg (I'm only being thorough). and that's right, "-sd" is relative to input rasters, not explicit (when submitting this I considered the possibility of "-sd_n" individual to each subdataset, but that even more strongly suggests the need for 'sd_name' and maybe 'sd_name_n' for completeness.
|
then your build must not be suitable for reading such datasets, what output do you get? I still think there was enough information in my original. If 'gdalbuildvrt' doesn't find any input rasters, then a silent outcome to do nothing seems like a bad situation (though as ever maybe I'm missing something). There's nothing special about NetCDF, subdataset-wise. |
This is what I get, just one layer, no subdatasets:
|
ah fair enough, I didn't think of that as a situation, on your system you might try
(I didn't realize that HDF5 didn't present the same way, NetCDF >=4 is a kind of container defined around HDF5 that behaves like NetCDF<4 as needed ...) |
at any rate, happy to be assigned to this as stated above in OP |
I had to download the dataset because I am on Windows and "Opening a /vsi file with the netCDF driver requires Linux userfaultfd to be available" From the local file gdalinfo with the NetCDF driver finds
Now there are two options. Either to use
Or to run the command without
|
I can see that gdalinfo defines
Maybe it would be better to use |
Agreed |
which makes sure that -sd value is an integer (fixes OSGeo#9672)
which makes sure that -sd value is an integer (fixes OSGeo#9672)
which makes sure that -sd value is an integer (fixes OSGeo#9672)
Awesome ty🙏 |
Feature description
Specifying '-sd' as the name of the subdataset is a mistake (it should be an integer), and quietly produces no output file.
This is confusing and should raise an error that 'sd' needs be a number (1-based).
It's also problematic because the order of the subdatasets (even within a dataset like this) is not guaranteed, and could have 'sd_name' as more robust input (like 'vrt://').
New features
The text was updated successfully, but these errors were encountered: